MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / func

Function func

imperative/python/test/unit/xla/functional/test_xla_indexing.py:26–31  ·  view source on GitHub ↗
(inp, dout)

Source from the content-addressed store, hash-verified

24
25 @jit.xla_trace(without_host=True, capture_as_const=True)
26 def func(inp, dout):
27 gm.attach([inp])
28 with gm:
29 out = inp[index]
30 gm.backward(out, dout)
31 return out, inp.grad
32
33 mge_rsts = func(inp, dout)
34 xla_rsts = func(inp, dout)

Callers 3

test_xla_traceFunction · 0.70
test_partial_traceFunction · 0.70
testerFunction · 0.70

Calls 6

fwdFunction · 0.70
attachMethod · 0.45
backwardMethod · 0.45
numpyMethod · 0.45
__setitem__Method · 0.45
sumMethod · 0.45

Tested by

no test coverage detected