MCPcopy Create free account
hub / github.com/apache/tvm / test_argmax_keep_dims

Function test_argmax_keep_dims

tests/python/relax/test_tvmscript_parser_op_search.py:88–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86
87
88def test_argmax_keep_dims():
89 @R.function
90 def foo(x: R.Tensor((1, 2, 3, 4), "float32")) -> R.Tensor((1, 1, 3, 4), "int64"):
91 gv: R.Tensor((1, 1, 3, 4), "int64") = R.argmax(x, axis=1, keepdims=True)
92 return gv
93
94 x = relax.Var("x", R.Tensor((1, 2, 3, 4), "float32"))
95 bb = relax.BlockBuilder()
96 with bb.function("foo", [x]):
97 gv = bb.emit(relax.op.argmax(x, axis=1, keepdims=True))
98 bb.emit_func_output(gv)
99
100 _check(foo, bb.get()["foo"])
101
102
103if __name__ == "__main__":

Callers

nothing calls this directly

Calls 7

functionMethod · 0.95
emitMethod · 0.95
emit_func_outputMethod · 0.95
getMethod · 0.95
TensorMethod · 0.80
argmaxMethod · 0.80
_checkFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…