Skip to content

Commit fce942e

Browse files
factnnclaude
andcommitted
fix: add inplace fmod benchmarks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d78fe00 commit fce942e

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

benchmark/test_fmod_perf.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,25 @@ def test_perf_fmod_scalar():
3737
dtypes=FLOAT_DTYPES,
3838
)
3939
bench.run()
40+
41+
42+
@pytest.mark.fmod
43+
def test_perf_fmod_inplace():
44+
bench = GenericBenchmark(
45+
input_fn=fmod_input_fn,
46+
op_name="fmod_",
47+
torch_op=torch.Tensor.fmod_,
48+
dtypes=FLOAT_DTYPES,
49+
)
50+
bench.run()
51+
52+
53+
@pytest.mark.fmod
54+
def test_perf_fmod_inplace_scalar():
55+
bench = GenericBenchmark(
56+
input_fn=fmod_scalar_input_fn,
57+
op_name="fmod_.Scalar",
58+
torch_op=torch.Tensor.fmod_,
59+
dtypes=FLOAT_DTYPES,
60+
)
61+
bench.run()

0 commit comments

Comments
 (0)