test(miopen): add Pooling numel>INT_MAX scale coverage (ALMIOPEN-2145) - #10257
Open
peymanr wants to merge 3 commits into
Open
test(miopen): add Pooling numel>INT_MAX scale coverage (ALMIOPEN-2145)#10257peymanr wants to merge 3 commits into
peymanr wants to merge 3 commits into
Conversation
JIRA ID: ALMIOPEN-2145 Add max/avg 2D pooling test cases at numel > INT_MAX as regression guards. Shape 1×1×46342×46342 (numel = 2 147 580 964 > INT_MAX) with a 2×2 window, stride 2, pad 0 exercises the 64-bit index paths in MIOpen's pooling kernel. Existing tests top out at ~40 M elements; this fills the gap at the INT_MAX boundary. A probe confirmed correct, finite output at this scale on gfx942 (xnack-). The test asserts a sample of output elements is finite: NaN or Inf signals INT_MAX index overflow. - pooling2d_large.cpp: new gtest, INSTANTIATE_TEST_SUITE_P(Standard, ...) for max-pool and avg-pool modes; GTEST_SKIP() if < 16 GiB free GPU RAM - test_categories.yaml: add GPU_Pooling2d_Large* to positive_patterns; add gtest/pooling2d_large.cpp to standard/comprehensive test_files
✅ 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. |
- Add #include <miopen/tensor.hpp> to provide full definition of miopen::TensorDescriptor (pooling.hpp only has a forward declaration) - Wrap hipMemset/hipMemcpy/hipFree return values to silence -Werror,-Wunused-value: use (void) for cleanup/helper calls and ASSERT_EQ for the output-zero hipMemset inside the test body Fixes 7 compiler errors seen in MIOpen Build Hip Package CI job.
… for hipMemset fill
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.
JIRA ID: ALMIOPEN-2145
What
Adds
projects/miopen/test/gtest/pooling2d_large.cpp— a new gtest file with Max and Avg 2D pooling test cases at numel > INT_MAX as regression guards.Also updates
test_categories.yamlto includeGPU_Pooling2d_Large*inpositive_patternsand register the file instandardandcomprehensivetiers.Why
Existing pooling tests top out at approximately 40 M elements (e.g.
{1,19,1024,2048}). A probe on gfx942 (xnack-) confirmed that MaxPool and AvgPool with a 2×2 window produce correct, finite output at numel > INT_MAX. These test cases close the gap at the INT_MAX boundary and guard against any future regression in 64-bit index handling.Shape
Test design
INSTANTIATE_TEST_SUITE_P(Standard, GPU_Pooling2d_Large_FP32, ...)for max-pool and avg-pool modes — runs on every PR.SetUp()querieshipMemGetInfoand callsGTEST_SKIP()when free GPU memory < 16 GiB, so it is safe to run on smaller devices.static_assertconfirms numel > INT_MAX at compile time.MIOpenDriver equivalent (manual verification on gfx942)
Both commands exit 0 with correct results on gfx942 (xnack-).
🤖 Assisted by PR Pundit