Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
e0b638c to
06b41ab
Compare
e0dbc89 to
6102171
Compare
shwetagkhatri
left a comment
There was a problem hiding this comment.
New tests (HotswapRewriteDecision., HotswapRewrite.RuntimeLoadRequired*) are not registered in rocrtst/suites/test_common/test_categories.yaml. Please take a note before adding any tests to rocrtsts next time.
|
Do you want the strict mode to work even in the B0 -> A0 path ? |
|
These tests are built as the standalone |
So far we haven't found a need for this. The D# WA is always required on A0, while it can be avoided on B0. Hence currently we only have strict mode for B0 -> B0. |
I see it now. Yes the existing CTest labels are the correct for standalone tests. |
2e2f418 to
16e4fdc
Compare
## Motivation #8387 made gfx1250 B0-to-A0 HotSwap rewrites mandatory. COMGR still rejects several valid production code objects, so those pre-existing rewrite failures changed from loading the original object to HSA_STATUS_ERROR_INVALID_CODE_OBJECT. The Jul-17 quick suite consequently regressed in hiptensor, rocPRIM, rocThrust, hipSPARSE, rocSPARSE, rocSOLVER, and hipBLASLt. A controlled A/B used the same Jul-18 compiler, libraries, tests, GPU, and ROCr revision, changing only the A0 rewrite-required policy. The failing COMGR return codes remained identical, but restoring optional fallback made the affected tests execute successfully. ## Technical Details - Keep legacy gfx1250 B0-to-A0 retargeting best-effort when COMGR cannot emit a rewrite. - Fall back to the original code object if an optional A0 rewrite fails or if its rewritten object fails to load. - Preserve fail-closed behavior for opt-in non-A0 strict-mode rewrites. - Update decision and runtime-load tests for both A0 failure paths. This restores the behavior before commit 8b9a6bf. Mandatory A0 enforcement can be reconsidered after COMGR supports the production code-object population or exposes a result that distinguishes a proven-safe no-rewrite case from an unsupported required rewrite. ## Issue Tracking JIRA ID: ROCM-28260 ## Test Plan - Build libhsa-runtime64 from current develop with this change. - Build and run hotswap_gfx_query and hotswap_rewrite. - Run the original affected quick-suite matrix on mi400 GPU 2 with AMD_COMGR_HOTSWAP_ENTRY_TRAMPOLINES=1. - Verify the exact production cases that previously terminated on COMGR rewrite failure. ## Test Result - ROCr HotSwap tests: 2/2 passed. - hiptensor: 108/108 CTest entries passed. - rocPRIM: 172/172 CTest entries passed. - rocThrust: 336/336 CTest entries passed. - hipSPARSE: 4/4 CTest entries passed. - rocSPARSE: three shorter CTest entries passed; the native quick executable passed 18,124/18,124 tests in 318.9 seconds. Its existing CTest entry has a 300-second timeout. - rocSOLVER: ffm-quick passed; the native quick executable passed 6,188/6,188 tests in 331.3 seconds. Its existing CTest entry has a 300-second timeout. - hipBLASLt: 1/1 quick entry passed, with zero out-of-range register diagnostics. - No GPU fault or hang occurred. The rocSPARSE and rocSOLVER timeout budgets are separate harness issues exposed because the formerly crashing cases now complete. ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.
Summary
HSA_HOTSWAP_STRICT_MODE, default off, to request COMGRAMD_COMGR_HOTSWAP_REWRITE_FLAG_STRICT_MODEfor non-A0gfx1250HotSwap rewrites.HSA_STATUS_ERROR_INVALID_CODE_OBJECTif COMGR cannot produce the rewrite or the rewritten code object cannot be loaded.AMD_COMGR_HOTSWAP_ENTRY_TRAMPOLINES=0only disables entry trampolines.HSA_HOTSWAP_STRICT_MODEin the runtime environment variable table.JIRA ID
JIRA ID : ROCM-27304
JIRA ID : PLAT-204339
Testing
cmake --build build-rocrtst-hotswap-review --target hotswap_rewrite -j 8ctest --test-dir build-rocrtst-hotswap-review -R hotswap_rewrite --output-on-failurehotswap_rewrite30/30 passed.