guocju opened a new issue, #18228:
URL: https://github.com/apache/tvm/issues/18228
### Expected behavior
```
import tvm
from tvm.script import tir as T, ir as I
@I.ir_module
class Module:
@T.prim_func
def add_one(A: T.handle, B: T.handle):
A_buf = T.match_buffer(A, (32,), "float32")
B_buf = T.match_buffer(B, (32,), "float32")
for i in range(32):
B_buf[i] = A_buf[i] + T.float32(1.0)
mod = Module
# Expect: no error
tvm.ir.assert_structural_equal(mod, mod)
```
Expect: no error
### Actual behavior
ValueError: StructuralEqual check failed, caused by lhs at
<root>.functions[I.GlobalVar("add_one")].params[0].dtype:
and rhs at <root>.functions[I.GlobalVar("add_one")].params[0].dtype:
```
# from tvm.script import ir as I
# from tvm.script import tir as T
@I.ir_module
class Module:
@T.prim_func
^^^^^^^^^^^^
def add_one(A: T.handle, B: T.handle):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A_buf = T.match_buffer(A, (32,))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
B_buf = T.match_buffer(B, (32,))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
for i in range(32):
^^^^^^^^^^^^^^^^^^^
B_buf[i] = A_buf[i] + T.float32(1.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
### Environment
TVM version: a7a0168be [FFI][REFACTOR] Establish tvm_ffi python module
(#18226)
Python version: 3.10.12
OS: (Linux/Ubuntu 22.04 )
### Triage
Please refer to the list of label tags
[here](https://github.com/apache/tvm/wiki/Issue-Triage-Labels) to find the
relevant tags and add them below in a bullet format (example below).
* needs-triage
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]