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

Function func

tests/python/relax/test_tvmscript_parser.py:1230–1236  ·  view source on GitHub ↗
(A: R.Tensor([16, 16]), is_bfloat16: R.Prim("bool"))

Source from the content-addressed store, hash-verified

1228
1229 @R.function
1230 def func(A: R.Tensor([16, 16]), is_bfloat16: R.Prim("bool")):
1231 if is_bfloat16:
1232 A = R.match_cast(A, R.Tensor([16, 16], "bfloat16"))
1233 B = A.astype("float16")
1234 else:
1235 B = R.match_cast(A, R.Tensor([16, 16], "float16"))
1236 return B
1237
1238 A, is_bfloat16 = func.params
1239 (block,) = func.body.blocks

Callers

nothing calls this directly

Calls 8

alloc_and_shapeFunction · 0.85
TensorMethod · 0.80
match_castMethod · 0.80
call_packedMethod · 0.80
add_twoFunction · 0.70
astypeMethod · 0.45
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…