-
Notifications
You must be signed in to change notification settings - Fork 75
set inputs value range to avoid false error #5812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Review updated until commit 04bfa16 Description
|
| Relevant files | |||
|---|---|---|---|
| Tests |
|
PR Reviewer Guide
Here are some key observations to aid the review process:
| 🧪 PR contains tests |
| ⚡ Recommended focus areas for review |
Missing constant definitions
|
Test failures
-
(Medium, 2)
NVFuser output validation mismatches in test_repro.test_shared_memory_usageTest Name GB200 Source tests.python.direct.test_repro.test_shared_memory_usage[nvfuser_direct_test=eager] ❌ tests.python.direct.test_repro.test_shared_memory_usage[nvfuser_direct_test=lru_cache] ❌
Greptile SummaryThis PR adds input value range constraints to Key changes:
Impact: Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Test as test_shared_memory_usage
participant Torch as torch.testing.make_tensor
participant Fusion as nvfuser_fusion_id0
participant Exec as exec_nvfuser
Note over Test: Create input tensors with<br/>constrained value range
Test->>Torch: make_tensor(bfloat16, low=-2, high=2)
Torch-->>Test: T0: (16, 24578) bfloat16
Test->>Torch: make_tensor(bfloat16, low=-2, high=2)
Torch-->>Test: T1: (16, 24578) bfloat16
Test->>Torch: make_tensor(bool)
Torch-->>Test: T2: (16, 24578) bool
Test->>Torch: make_tensor(float32, low=-2, high=2)
Torch-->>Test: T3: (16, 1) float32
Test->>Torch: make_tensor(bfloat16, low=-2, high=2)
Torch-->>Test: T4: (16, 24578) bfloat16
Test->>Torch: make_tensor(bfloat16, low=-2, high=2)
Torch-->>Test: T5: (24578,) bfloat16
Note over Test,Fusion: Execute dropout+RMSNorm<br/>backward fusion
Test->>Exec: exec_nvfuser(fusion, inputs, validate=True)
Exec->>Fusion: Run fusion definition
Note over Fusion: Cast, mul, reciprocal,<br/>pow, sum operations
Fusion-->>Exec: T50, T49, T51 outputs
Note over Exec: Validate results against<br/>expected values
Exec-->>Test: Success (no false errors)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No files reviewed, no comments
Greptile OverviewGreptile SummaryAdded value range constraints (
Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Test as test_shared_memory_usage
participant TorchTest as torch.testing.make_tensor
participant Constants as LOW_VAL/HIGH_VAL
participant Fusion as nvfuser_fusion_id0
participant Validator as exec_nvfuser
Test->>Constants: Use LOW_VAL=-2, HIGH_VAL=2
Test->>TorchTest: Create 5 tensors with value range constraints
Note over TorchTest: bfloat16 (16,24578) x3<br/>float32 (16,1) x1<br/>bfloat16 (24578,) x1
Test->>TorchTest: Create 1 boolean tensor (no range needed)
TorchTest-->>Test: Return constrained input tensors
Test->>Fusion: Define dropout+rmsnorm backward fusion
Note over Fusion: Operations: cast, mul, add,<br/>reciprocal, sum, broadcast,<br/>pow, neg
Test->>Validator: Execute fusion with validate_results=True
Validator->>Validator: Run fusion and validate numerics
Note over Validator: Constrained inputs prevent<br/>false numerical errors
Validator-->>Test: Validation passes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No files reviewed, no comments
|
!test |
|
With range [-2, 2] (narrower), Values are concentrated near zero, Much higher probability of getting values like 0.01, 0.001, etc. |
No description provided.