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

Function test_unary

tests/python/nightly/test_nnapi/test_ops.py:75–96  ·  view source on GitHub ↗
(op, input_shape=(1, 2, 8, 5))

Source from the content-addressed store, hash-verified

73 ],
74)
75def test_unary(op, input_shape=(1, 2, 8, 5)):
76 remote_obj, tracker = remote()
77
78 def create_model() -> tvm.IRModule:
79 @tvm.script.ir_module
80 class Module:
81 @R.function
82 def main(i0: R.Tensor((1, 2, 8, 5), "float32")) -> R.Tensor((1, 2, 8, 5), "float32"):
83 with R.dataflow():
84 t0 = op(i0)
85 R.output(t0)
86 return t0
87
88 return Module
89
90 mod = create_model()
91 verify(
92 remote_obj,
93 tracker,
94 mod,
95 inputs=[np.random.uniform(size=(1, 2, 8, 5)).astype("float32")],
96 )
97
98
99@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 5

remoteFunction · 0.90
uniformMethod · 0.80
create_modelFunction · 0.70
verifyFunction · 0.70
astypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…