MCPcopy Index your code
hub / github.com/apache/tvm / modify

Function modify

python/tvm/testing/utils.py:171–174  ·  view source on GitHub ↗
(val, j, a_delta)

Source from the content-addressed store, hash-verified

169
170 # a helper to modify j-th element of val by a_delta
171 def modify(val, j, a_delta):
172 val = val.copy()
173 val.reshape(-1)[j] = val.reshape(-1)[j] + a_delta
174 return val
175
176 # numerically compute a partial derivative with respect to j-th element of the var `name`
177 def derivative(x_name, j, a_delta):

Callers 1

derivativeFunction · 0.85

Calls 2

copyMethod · 0.45
reshapeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…