This is an automated email from the ASF dual-hosted git repository.
masahi pushed a commit to branch unity
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/unity by this push:
new c9a73789e7 [Unity] fix masked_fill operation (#15617)
c9a73789e7 is described below
commit c9a73789e7759f980e128801e5c488ef2824b62c
Author: Valery Chernov <[email protected]>
AuthorDate: Sat Aug 26 11:06:05 2023 +0400
[Unity] fix masked_fill operation (#15617)
* fix masked_fill
* fix pylint
---
python/tvm/relax/op/mask.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/python/tvm/relax/op/mask.py b/python/tvm/relax/op/mask.py
index 148e6937ab..50fcbf8825 100644
--- a/python/tvm/relax/op/mask.py
+++ b/python/tvm/relax/op/mask.py
@@ -16,7 +16,6 @@
# under the License.
"""Operators with mask."""
from . import _ffi_api
-from .create import full_like
from ..expr import Expr
@@ -35,5 +34,5 @@ def masked_fill(x: Expr, mask: Expr, value: Expr):
result : relax.Expr
The filled tensor.
"""
- values = full_like(x, value) # type: ignore
+ values = _ffi_api.full_like(x, value, value.struct_info.dtype) # type:
ignore
return _ffi_api.where(mask, values, x) # type: ignore