Skip to content

Commit 96c9fcb

Browse files
committed
update signature
1 parent 7c8b436 commit 96c9fcb

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

py/torch_tensorrt/dynamo/conversion/aten_ops_converters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2672,7 +2672,7 @@ def aten_ops_flip(
26722672
)
26732673

26742674

2675-
@dynamo_tensorrt_converter(torch.log2)
2675+
@dynamo_tensorrt_converter(torch.ops.aten.log2.default)
26762676
def log2(
26772677
ctx: ConversionContext,
26782678
target: Target,

tests/py/dynamo/conversion/test_log2.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ class TestLogConverter(DispatchTestCase):
1616
]
1717
)
1818
def test_log_float(self, input_shape, dtype):
19-
class log(nn.Module):
19+
class log2(nn.Module):
2020
def forward(self, input):
21-
return torch.log2(input)
21+
return torch.ops.aten.log2.default(input)
2222

2323
inputs = [torch.randn(input_shape, dtype=dtype)]
2424
self.run_test(
25-
log(),
25+
log2(),
2626
inputs,
2727
)
2828

@@ -34,13 +34,13 @@ def forward(self, input):
3434
]
3535
)
3636
def test_log_int(self, input_shape, dtype, low, high):
37-
class log(nn.Module):
37+
class log2(nn.Module):
3838
def forward(self, input):
39-
return torch.log2(input)
39+
return torch.ops.aten.log2.default(input)
4040

4141
inputs = [torch.randint(low, high, input_shape, dtype=dtype)]
4242
self.run_test(
43-
log(),
43+
log2(),
4444
inputs,
4545
)
4646

0 commit comments

Comments
 (0)