test(miopen): add Softmax numel>INT_MAX and beta=0 regression coverage (ALMIOPEN-2147) - #10258
Open
peymanr wants to merge 1 commit into
Open
test(miopen): add Softmax numel>INT_MAX and beta=0 regression coverage (ALMIOPEN-2147)#10258peymanr wants to merge 1 commit into
peymanr wants to merge 1 commit into
Conversation
…e (ALMIOPEN-2147)
Add two new test groups to projects/miopen/test/gtest/soft_max.cpp:
1. GPU_Softmax_LargeNumel_FP32 (Standard/DISABLED_ForwardLargeNumel)
Shape {2, 1024, 1024, 1024} = 2^31 elements, exceeding INT_MAX.
A prior probe on gfx942 triggered an HSA illegal-access fault
(ALMIOPEN-2151), so the test is disabled until 64-bit index arithmetic
is fixed in the kernel. The test includes a device-memory guard
(GTEST_SKIP when < 16 GiB VRAM) and a spot-check of the first 1 KiB
of output.
2. GPU_Softmax_BetaZeroNaN_FP32 (Smoke/ForwardTest, Smoke/BackwardTest)
Already present in the file — no new code needed for concern (2).
These tests pre-poison the output/dinput buffer with NaN and assert
that beta=0 suppresses the read, preventing NaN propagation.
JIRA ID: ALMIOPEN-2147
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
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
Add two Softmax test groups to
projects/miopen/test/gtest/soft_max.cpptoaddress the two concerns raised in ALMIOPEN-2147:
1. numel > INT_MAX —
GPU_Softmax_LargeNumel_FP32(Standard tier, DISABLED){2, 1024, 1024, 1024}= 2,147,483,648 elements (exactly 2^31, exceeds INT_MAX)DISABLED_ForwardLargeNumel— a prior probe on gfx942 produced an HSAillegal-access fault (tracked in ALMIOPEN-2151), indicating the kernel uses 32-bit
index arithmetic. The test is disabled until ALMIOPEN-2151 is resolved; at that point
remove the
DISABLED_prefix.Standardso it appears inStandard/*CI runs once re-enabled.first 1 KiB of output for finite values in (0, 1].
FAST,ACCURATE,LOGinCHANNELmode.2. beta=0 NaN regression —
GPU_Softmax_BetaZeroNaN_FP32(Smoke tier)Already present in
soft_max.cppondevelop— no new code added for this concern.The existing
Smoke/{Forward,Backward}Testcases pre-poison the output buffer with NaNand assert that
beta=0fully suppresses the read, preventingNaN * 0.0 == NaNfrom propagating into the result.
Test plan
Smoke/GPU_Softmax_BetaZeroNaN_FP32.*(existing, should pass)Standard/GPU_Softmax_LargeNumel_FP32/DISABLED_ForwardLargeNumel/*(disabled by design; see ALMIOPEN-2151)
DISABLED_prefix and verify the testpasses on gfx942 hardware with >= 16 GiB VRAM
JIRA ID: ALMIOPEN-2147
🤖 Assisted by PR Pundit