Repository navigation
[tensilelite] Skip Python C extensions in devel shared library load test - #5756
Conversation
|
I cherry-picked this commit onto #5731 for testing on CI |
|
Looks like after a few build flakes, the relevant Linux tests are passing on https://github.com/ROCm/TheRock/actions/runs/27296784528/job/80687409265?pr=5731 now. |
Python C extensions (.abi3.so, .cpython-*.so) use symbols resolved at import time by the interpreter, not via dlopen. ctypes.CDLL fails when the extension uses APIs unavailable in the test interpreter version (e.g. nanobind's PyType_FromMetaclass requires Python 3.12+). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
f9eb945 to
9f3ae19
Compare
|
CI results look good enough on this PR. Shall we merge? I'd like to proceed with #5731 expanding our CI test coverage to Python 3.11 (and 3.10 actually, for another issue) |
|
The hipcub test failure was fixed recently, so pulled in those changes to get the tests to pass. |
marbre
left a comment
There was a problem hiding this comment.
CI results look good enough on this PR. Shall we merge? I'd like to proceed with #5731 expanding our CI test coverage to Python 3.11 (and 3.10 actually, for another issue)
Since we landed the same to library_test.py ~2 weeks ago it should be fine to go ahead and merge.
|
Oh, merged right when you both commented 😅 |
I think that is fine 😉 |
Summary
Skip Python C extensions (
.abi3.so,.cpython-*.so) in thedevel_test.pyshared library load test.Technical details
Python C extensions use symbols resolved at import time by the interpreter, not via
dlopen.ctypes.CDLLfails when the extension uses APIs unavailable in the test interpreter version — e.g._rocisa.abi3.souses nanobind'sPyType_FromMetaclasswhich requires Python 3.12+, causingOSError: undefined symbolon Python 3.11.This is a general fix: any
.abi3.soor.cpython-*.sofile should be tested viaimport, notctypes.CDLL.Fixes the regression introduced by #5529 (tensilelite test artifact install with
ROCISA_USE_STABLE_ABI=ON).Test plan
test_rocm_wheels.ymlpasses withrocm[devel]on Python 3.11AIHPBLAS-3508