fix(rocr): Return hipErrorNotReady when fabric export not ready#8293
Open
dayatsin-amd wants to merge 6 commits into
Open
fix(rocr): Return hipErrorNotReady when fabric export not ready#8293dayatsin-amd wants to merge 6 commits into
dayatsin-amd wants to merge 6 commits into
Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
This comment was marked as resolved.
This comment was marked as resolved.
cfreeamd
reviewed
Jul 9, 2026
cfreeamd
left a comment
Contributor
There was a problem hiding this comment.
🤖 AI-assisted pre-review (for @cfreeamd) — hsa_ext_amd.h (new status code), amd_gpu_agent.h declaration and constructor initialization, and the VirtIO/XDNA stubs look correct. Raised issues in amd_kfd_driver.cpp, runtime.cpp, amd_gpu_agent.cpp, and topology.c.
Contributor
Author
|
Addressed review feedback in e3f2acc:
Re-tested after rebuild/install to
|
e3f2acc to
5055e7f
Compare
shwetagkhatri
approved these changes
Jul 11, 2026
5055e7f to
789ea27
Compare
3 tasks
Add check for accelerator readiness befor exporting fabric handles.
Add a rocrtst that gates on VMM and fabric-handle support, reads ualink accel_state from sysfs, and verifies export succeeds when the accelerator is ready or active and returns RESOURCE_NOT_READY otherwise. Co-authored-by: Cursor <cursoragent@cursor.com>
Bound sysfs accel_state reads, use static_cast for GpuAgent dispatch, make accelerator_ready_ atomic, document FabricHandleSupported semantics, and remove an extra blank line in amd_gpu_agent.h. Co-authored-by: Cursor <cursoragent@cursor.com>
789ea27 to
b0b4035
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
FabricHandleSupportedonualink/accel_state; advertise fabric handle support when UALink sysfs is present.ualink/accel_stateisreadyoractive) before exporting fabric handles, returningHSA_STATUS_ERROR_RESOURCE_NOT_READY.hipErrorNotReadyand skipUnit_hipMemExportFabricHandleToStdout_Positive_Basicwhen the accelerator is not ready.rocrtstFunc.VirtMemory_FabricExport_Readiness_Testto validate export behavior against sysfsaccel_stateon each GPU.static_castforGpuAgent, atomic readiness cache, and documentFabricHandleSupportedsemantics.This moves the readiness gate from capability reporting at topology time to export time, so tests can distinguish unsupported hardware from supported-but-not-ready fabric.
JIRA ID
JIRA ID : ROCM-27354
Test plan
libhsa-runtime64,libamdhip64, andVirtualMemoryManagementTeston b8-3 (gfx1260,accel_state=unconfigured)Unit_hipMemExportFabricHandleToStdout_Positive_BasicSKIPs withhipErrorNotReady/ "Accelerator not ready for fabric handle export." on b8-3rocrtstFunc.VirtMemory_FabricExport_Readiness_TestPASSED on b8-3 (accel_state=unconfigured, export returnsHSA_STATUS_ERROR_RESOURCE_NOT_READY)accel_state=ready) thatUnit_hipMemExportFabricHandleToStdout_Positive_Basicruns and fabric export succeedsrocrtstFunc.VirtMemory_FabricExport_Readiness_TestPASSED on f05-1 (accel_state=ready, export and import succeed on all GPUs)