()
| 274 | |
| 275 | |
| 276 | def test_op_attr(): |
| 277 | x = rx.Var("x", R.Tensor("float32")) |
| 278 | y = rx.Var("y", R.Tensor("float32")) |
| 279 | conv2d = rx.op.nn.conv2d(x, y, strides=(3, 3)) |
| 280 | xp = is_var("x") |
| 281 | yp = is_var("y") |
| 282 | assert is_op("relax.nn.conv2d")(xp, yp).has_attr({"strides": [3, 3]}).match(conv2d) |
| 283 | assert not is_op("relax.nn.conv2d")(xp, yp).has_attr({"strides": [4, 3]}).match(conv2d) |
| 284 | |
| 285 | |
| 286 | def test_match_call_attr(): |