Repository navigation
Conversation
|
The change look reasonable but I am worried we might break support silently in the future if our CI does not test it. I am not very familiar with ROCm. Do you think it would be possible to update one of the CI configs to test this? Are there easily installable conda-forge or pypi packages? Would testing this require specific hardware not available in standard github actions runners? Also we need a changelog entry for this. |
|
Thanks for the suggestion. I found the host libraries in AMD's ROCm SDK wheel, and a smaller Ubuntu package, I updated the existing Ubuntu 24.04 CI job to extract that package and run the two existing by-prefix tests against the real OpenBLAS library. Both passed in my local test without PyTorch, a GPU driver install, or a GPU requirement. I also added the changelog entry and removed the two temporary skip allowances. |
| with: | ||
| name: test_result_${{ github.run_id }}_ubuntu-24.04_rocm_openblas | ||
| path: rocm-test-result/test_result.xml | ||
| retention-days: 1 |
There was a problem hiding this comment.
I would rather not have overspecialized logic in the CI config itself because it makes it hard to interactively debug failures with such complex setups locally.
Instead we could just decompress the the .so file in a test folder (e.g. "extra_dynamic_libraries_for_tests") and then add a pytest fixture in conftest.py that globs all the files under that folder and call ctypes.CDLL() on all of them.
The configure .gitignore to ignore anything under "extra_dynamic_libraries_for_tests" to avoid commiting binaries by mistake.
Then we could run the regular test suite.
This will make it easier to run the same test setup locally for debugging purpose.
There was a problem hiding this comment.
Actually cursor suggested this instead: #318. I think I like it better.
There was a problem hiding this comment.
Thanks for putting #318 together. I took a look, and it fixes the issue I ran into. I’m not very familiar with how best to set up CI for this project, so my approach may not have been the best fit. I appreciate the fix!
I found that threadpoolctl was missing the host OpenBLAS library loaded by
PyTorch in my ROCm environment. threadpool_info() did not list it, and
threadpool_limits() could not control its thread count. I need it to be
recognized so I can manage its threads alongside the other BLAS libraries.
ROCm names these libraries librocm-openblas.so.0 and librocm-openblas64.so.0.
Those filenames do not match the prefixes currently recognized by
OpenBLASController, even though the existing controller can handle them.
Add "librocm-openblas" to OpenBLASController.filename_prefixes and reuse the
existing detection and thread-limit handling.