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

Function test_unary

tests/python/relax/test_op_gradient_numeric.py:224–227  ·  view source on GitHub ↗
(target, dev, unary_op_func, can_be_neg)

Source from the content-addressed store, hash-verified

222
223@tvm.testing.parametrize_targets("llvm")
224def test_unary(target, dev, unary_op_func, can_be_neg):
225 (low, high) = (-1, 1) if can_be_neg else (0.1, 1)
226 data_numpy = np.random.uniform(low, high, (3, 3)).astype(np.float32)
227 relax_check_gradients(unary_op_func, [data_numpy], target, dev)
228
229
230##################### Binary #####################

Callers

nothing calls this directly

Calls 3

relax_check_gradientsFunction · 0.85
uniformMethod · 0.80
astypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…