This is an automated email from the ASF dual-hosted git repository.

ruihangl 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 9d6e153497 [Unity][BugFix][Op] fix error when calling full_like in 
masked_fill (#15477)
9d6e153497 is described below

commit 9d6e153497c91b1f2a2a8f2756b21076dbe9733e
Author: B. Shen <[email protected]>
AuthorDate: Fri Aug 4 00:33:32 2023 -0700

    [Unity][BugFix][Op] fix error when calling full_like in masked_fill (#15477)
    
    fix error when calling full_like in masked_fill
    using python api of full_like instead of _ffi_api.full_like
---
 python/tvm/relax/op/mask.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/python/tvm/relax/op/mask.py b/python/tvm/relax/op/mask.py
index 4fc94b9cf4..148e6937ab 100644
--- a/python/tvm/relax/op/mask.py
+++ b/python/tvm/relax/op/mask.py
@@ -16,6 +16,7 @@
 # under the License.
 """Operators with mask."""
 from . import _ffi_api
+from .create import full_like
 from ..expr import Expr
 
 
@@ -34,5 +35,5 @@ def masked_fill(x: Expr, mask: Expr, value: Expr):
     result : relax.Expr
         The filled tensor.
     """
-    values = _ffi_api.full_like(x, value)  # type: ignore
+    values = full_like(x, value)  # type: ignore
     return _ffi_api.where(mask, values, x)  # type: ignore

Reply via email to