Repository navigation
Guard unsupported layouts in unary operator dispatch - #5742
UD-mmcminn wants to merge 1 commit into
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags & labels: |
|
No activity for 15 days, so this is now labelled |
|
@aiter-bot review |
|
aiter-bot — queued behind 1 review(s); expect to start in about 50 min. The box reviews one PR at a time. |
[ROCm/aiter] PR #5742 — Guard unsupported layouts in unary operator dispatchRestricts aiter.sigmoid/aiter.tanh's native tile kernel to contiguous, non-empty 2-D/3-D fp16/bf16/fp32 CUDA tensors (routing everything else to the torch op) and replaces the profiler-based test with a routing-plus-correctness test. Review (advisory): 📝 [verified] op_tests/test_aiter_sigmoid.py defaults to |
| expected = torch_op(x) | ||
| actual = aiter_op(x) | ||
| tolerance = 1e-2 if dtype in (torch.float16, torch.bfloat16) else 1e-4 | ||
| torch.testing.assert_close( |
There was a problem hiding this comment.
Please uniformly use "checkAllclose"
| choices=("all", "native", "fallback"), | ||
| default="all", | ||
| ) | ||
| args = parser.parse_args() |
There was a problem hiding this comment.
The shape/stride cannot be specified through the command line.
| f"noncontiguous={case.noncontiguous}: expected native={case.native}, got {native}" | ||
| ) | ||
|
|
||
| expected = torch_op(x) |
There was a problem hiding this comment.
The performance test has been removed.
|
No activity for 15 days, so this is now labelled |
WAITING ON AUTHORPR Self-ReviewRevision Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision. Questions to answer in the PR description
Edit the Missing or invalid answers
Shadow mode reports what would block but keeps the status successful. Set |
Summary
Motivation
The native unary dispatcher assumed a contiguous 2-D or 3-D supported tensor. Other inputs could access nonexistent dimensions or dispatch an unsupported native kernel instead of using the existing fallback.
This is a general correctness fix and is not specific to gfx908.
Testing
Tested on AMD Instinct MI100 (
gfx908):