Add inference_rocm.json overlay for spleen_deepedit (AMD MI300X)#2
Open
nilapate wants to merge 2 commits into
Open
Add inference_rocm.json overlay for spleen_deepedit (AMD MI300X)#2nilapate wants to merge 2 commits into
nilapate wants to merge 2 commits into
Conversation
Enables the DynUNet GEMM ConvTranspose3d decomposition (use_gemm_transpose) plus channels_last_3d, bf16 amp, and torch.compile for the spleen_deepedit_annotation bundle. Mirrors the vista3d/swin_unetr rocm overlays. Validated end-to-end via real `monai.bundle run` (base vs base+overlay): Dice 0.9999, argmax agreement 1.0000; flag confirmed active in all 5 upsample blocks. Signed-off-by: Patel, Nilaykumar K <nilapate@amd.com>
soumitra-chatterjee-tech
approved these changes
Jul 3, 2026
Add cudnn.deterministic=False to inference_rocm.json overlay after set_determinism(seed=123). Without this, set_determinism sets torch.backends.cudnn.deterministic=True, which on ROCm forces MIOpen to use the deterministic naive convolution solver (ConvDirectNaiveConvFwd) instead of the fast XDLOPS implicit-GEMM solver → 2070 ms forward time (300× slower than the optimized 6.9 ms). This mirrors the pattern already used in vista3d/swinunetr inference_rocm.json overlays on the nilapate/rocm-inference-overlays branch. Verified: bundle forward time drops from 2070 ms to 6.94 ms mean (17 images) with this one-line fix. Dice equivalence: 0.9995 (bundle A/B test). Signed-off-by: Patel, Nilaykumar K <nilapate@amd.com>
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.
Description
Enables fast AMD MI300X inference for spleen_deepedit_annotation via inference_amd.json overlay:
Validation:
End-to-end monai.bundle run (base vs overlay): Dice 0.9999, argmax agreement 1.0000. GEMM flag confirmed active in all 5 upsample blocks.
Usage:
python -m monai.bundle run
--config_file "['configs/inference.json', 'configs/inference_rocm.json']"
--datalist "['<path-to-volume.nii.gz>']"
Status
Ready
Checklist: