()
| 417 | |
| 418 | |
| 419 | def test_op_attrs(): |
| 420 | x = rx.Var("x", R.Tensor((10,), "float32")) |
| 421 | # Manually create a Call with attributes to test printer support for Op attributes |
| 422 | op = tvm.ir.Op.get("relax.add") |
| 423 | attrs = tvm.ir.make_node("ir.DictAttrs", my_attr="my_value") |
| 424 | call_node = rx.Call(op, [x, x], attrs=attrs) |
| 425 | |
| 426 | call_str = dump_ast(call_node, include_call_attrs=True) |
| 427 | assert_fields( |
| 428 | "Call", |
| 429 | { |
| 430 | "op": 'Op(name="relax.add")', |
| 431 | "attrs": '{"my_attr": "my_value"}', |
| 432 | }, |
| 433 | call_str, |
| 434 | ) |
| 435 | |
| 436 | |
| 437 | def test_call_tir(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…