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

Function prod

python/tvm/topi/utils.py:86–104  ·  view source on GitHub ↗

Get the product of every items in the tuple. Parameters ---------- x: tuple Input tuple Returns ------- value : Expr The result value

(x)

Source from the content-addressed store, hash-verified

84
85
86def prod(x):
87 """Get the product of every items in the tuple.
88
89 Parameters
90 ----------
91 x: tuple
92 Input tuple
93
94 Returns
95 -------
96 value : Expr
97 The result value
98 """
99 if not x:
100 return tvm.tirx.const(1, "int32")
101 res = x[0]
102 for i in range(1, len(x)):
103 res = res * x[i]
104 return res
105
106
107def get_const_int(expr):

Callers 5

_emitFunction · 0.50
exclusive_scan_irFunction · 0.50
irFunction · 0.50
scanopFunction · 0.50
irFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…