()
| 1882 | |
| 1883 | |
| 1884 | def test_global_var_sinfo(): |
| 1885 | @I.ir_module(s_tir=True) |
| 1886 | class Module: |
| 1887 | @R.function |
| 1888 | def foo(x: R.Tensor((128, 128), "float32")): |
| 1889 | gv0 = R.emit_te(topi.add, x, x) |
| 1890 | return gv0 |
| 1891 | |
| 1892 | target_sinfo = R.Callable( |
| 1893 | (R.Tensor((128, 128), dtype="float32"),), R.Tensor((128, 128), dtype="float32") |
| 1894 | ) |
| 1895 | gv = Module.get_global_var("foo") |
| 1896 | tvm.ir.assert_structural_equal(gv.struct_info, target_sinfo) |
| 1897 | tvm.ir.assert_structural_equal(Module["foo"].struct_info, target_sinfo) |
| 1898 | _check(Module) |
| 1899 | |
| 1900 | |
| 1901 | def test_assert_op(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…