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

Function abs

python/tvm/topi/math.py:381–394  ·  view source on GitHub ↗

Take absolute value of the input of x, element-wise. Parameters ---------- x : tvm.te.Tensor Input argument. Returns ------- y : tvm.te.Tensor The result.

(x)

Source from the content-addressed store, hash-verified

379
380@tvm.te.tag_scope(tag=tag.ELEMWISE)
381def abs(x):
382 """Take absolute value of the input of x, element-wise.
383
384 Parameters
385 ----------
386 x : tvm.te.Tensor
387 Input argument.
388
389 Returns
390 -------
391 y : tvm.te.Tensor
392 The result.
393 """
394 return te.compute(x.shape, lambda *i: te.abs(x(*i)))
395
396
397@tvm.te.tag_scope(tag=tag.ELEMWISE)

Callers 3

attention_pythonFunction · 0.50
__reflectFunction · 0.50
correlation_nchw_pythonFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected