We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5840834 commit 41fe6e9Copy full SHA for 41fe6e9
helion/_testing.py
@@ -150,12 +150,16 @@ def check_example(
150
args,
151
**kwargs,
152
)
153
- skip_accuracy or torch.testing.assert_close(
154
- result.to(torch.float32), # pyright: ignore[reportAttributeAccessIssue]
155
- expected.to(torch.float32),
156
- atol=1e-1,
157
- rtol=1e-2,
158
- ) # pyright: ignore[reportUnusedExpression]
+
+ assert isinstance(result, torch.Tensor)
+ if not skip_accuracy:
+ torch.testing.assert_close(
+ result.to(torch.float32),
159
+ expected.to(torch.float32),
160
+ atol=1e-1,
161
+ rtol=1e-2,
162
+ )
163
return code
164
165
0 commit comments