Skip to content

test(miopen): add ReduceTensor numel>INT_MAX scale coverage (ALMIOPEN-2150) - #10253

Open
peymanr wants to merge 2 commits into
ROCm:developfrom
peymanr:users/prazaghi/almiopen-2150-reduce-scale
Open

test(miopen): add ReduceTensor numel>INT_MAX scale coverage (ALMIOPEN-2150)#10253
peymanr wants to merge 2 commits into
ROCm:developfrom
peymanr:users/prazaghi/almiopen-2150-reduce-scale

Conversation

@peymanr

@peymanr peymanr commented Jul 31, 2026

Copy link
Copy Markdown

Summary

Add scale-tier coverage for ReduceTensor at numel > INT_MAX
(ALMIOPEN-2150).

What

  • Adds GetCasesReduceScaleLargeNumel() inside the existing
    reduce.cpp anonymous namespace.
  • Shape {1, 1, 46342, 46342} (numel = 46342² = 2,147,580,964 >
    INT_MAX = 2,147,483,647) reduces all four dims to a scalar, targeting
    the int32 index/workspace-size overflow path.
  • Two operators are exercised: MAX and ADD.
  • A new GPU_reduce_scale_large_numel_FP32 fixture and
    DISABLED_Standard test are wired up and instantiated in the
    Standard tier.

Why DISABLED_Standard

A probe confirmed (ALMIOPEN-2152) that ReduceTensor with the MAX op
silently returns all-zero output with miopenStatusSuccess when
numel > INT_MAX. The test is therefore disabled pending the fix;
remove the DISABLED_ prefix once ALMIOPEN-2152 is resolved. The
ADD case is included in the same suite so both ops are unfrozen
together.

JIRA ID: ALMIOPEN-2150

🤖 Assisted by PR Pundit

…-2150)

Add GetCasesReduceScaleLargeNumel() with shape {1,1,46342,46342}
(numel = 46342^2 = 2,147,580,964 > INT_MAX) exercising the MAX and ADD
operators over a full 4-D reduction to a scalar.

The MAX case is registered as DISABLED_Standard pending the fix tracked
in ALMIOPEN-2152: ReduceTensor MAX silently returns all-0.0 output with
status SUCCESS when numel exceeds INT_MAX.  The ADD case is included so
both ops land in the same suite and are unfrozen together once fixed.

JIRA ID: ALMIOPEN-2150
@peymanr
peymanr requested a review from a team as a code owner July 31, 2026 23:20
@therock-pr-bot

therock-pr-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
📝 PR Description ✅ Pass
Forbidden Files ✅ Pass
🧪 Unit Test ✅ Pass PR does not contain code files — Unit Test auto-passed
🔎 pre-commit ✅ Pass
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled
🤖 therock-pr-bot ✅ Pass

🎉 All checks passed! This PR is ready for review.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

Copy link
Copy Markdown

Pre-commit check failed

pre-commit failed

Please run locally:

  • python -m pip install pre-commit
  • pre-commit install
  • pre-commit run --all-files --show-diff-on-failure

This repo uses .pre-commit-config.yaml.

Fix clang-format violations in reduce.cpp flagged by pre-commit CI.
Resolves: ALMIOPEN-2150
@peymanr
peymanr force-pushed the users/prazaghi/almiopen-2150-reduce-scale branch from 035e00f to a36636d Compare August 1, 2026 00:01
@therock-pr-bot

therock-pr-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant