Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ais-check: Add better HIP detection #216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
ais-check: Add better HIP detection #216
Changes from all commits
f49aca4d9da02bda5b4c0201f97c18383d6a891ab731fa5a9File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find_hip_runtimes()only looks for an unversionedlibamdhip64.soin a small set of locations (/opt/rocm*, LD_LIBRARY_PATH, ROCM_* / HIP_PATH). This drops the previousctypes.util.find_library('amdhip64')behavior and can miss systems where the HIP runtime is discoverable via the default loader paths (e.g., /usr/lib*) or where only a versioned SONAME exists (e.g.,libamdhip64.so.6without the unversioned symlink). Consider adding a fallback candidate fromctypes.util.find_library('amdhip64')and/or globbing forlibamdhip64.so.*in the searched directories to avoid false negatives.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When probing each
libamdhip64.so, the code assumeshipRuntimeGetVersion,hipGetProcAddress, andhipGetErrorStringexist. If a candidate library loads but is missing one of these symbols,ctypeswill raiseAttributeErrorand the script will crash instead of treating that path as “not a HIP runtime”. Wrap the symbol lookups/argtypes setup in atry/except AttributeError(or usegetattrchecks) andcontinueto the next candidate.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AIS symbol check only treats
err != 0as a failure. In this repo’s C++ HIP wrapper (src/amd_detail/hip.cpp),hipGetProcAddresscan succeed yet return a null pointer for an unavailable symbol (the wrapper checks fornullptr). In that case, this script would incorrectly mark the runtime as AIS-supported. AfterhipGetProcAddress, also verify the returned pointer (e.g.,func_ptr.value) and/orsymbol_statusindicates the symbol is found before keepingsupported = True.Uh oh!
There was an error while loading. Please reload this page.