MCPcopy Index your code
hub / github.com/apache/tvm / test_relax_tensor_op

Function test_relax_tensor_op

tests/python/relax/test_tvmscript_parser.py:365–379  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

363
364
365def test_relax_tensor_op():
366 @R.function
367 def foo(x: R.Tensor((4, 4), "float32")) -> R.Tensor((4, 4), "float32"):
368 y = R.add(x, x)
369 z = R.multiply(x, y)
370 return z
371
372 x = relax.Var("x", R.Tensor((4, 4), "float32"))
373 bb = relax.BlockBuilder()
374 with bb.function("foo", (x,)):
375 y = bb.emit(relax.op.add(x, x))
376 z = bb.emit(relax.op.multiply(x, y))
377 bb.emit_func_output(z)
378
379 _check(foo, bb.get()["foo"])
380
381
382def test_relax_base_op():

Callers

nothing calls this directly

Calls 8

functionMethod · 0.95
emitMethod · 0.95
emit_func_outputMethod · 0.95
getMethod · 0.95
TensorMethod · 0.80
_checkFunction · 0.70
addMethod · 0.45
multiplyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…