Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions python/tvm/topi/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,6 @@ def log2(x):
return te.compute(x.shape, lambda *i: te.log2(x(*i)))


@tvm.te.tag_scope(tag=tag.ELEMWISE)
def log10(x):
"""Take logarithm to the base 10 of input x.

Expand All @@ -498,7 +497,9 @@ def log10(x):
y : tvm.te.Tensor
The result.
"""
return te.compute(x.shape, lambda *i: te.log10(x(*i)))
if x.dtype.startswith("int"):
x = te.compute(x.shape, lambda *i: x(*i).astype("float32"))
return te.compute(x.shape, lambda *i: te.log10(x(*i)), tag=tag.ELEMWISE)


@tvm.te.tag_scope(tag=tag.ELEMWISE)
Expand Down