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

Function func

imperative/python/test/unit/xla/module/test_elemwise.py:28–33  ·  view source on GitHub ↗
(mod, inp, doup)

Source from the content-addressed store, hash-verified

26
27 @jit.xla_trace(without_host=True)
28 def func(mod, inp, doup):
29 gm.attach(inp)
30 with gm:
31 oup = mod(inp)
32 gm.backward(oup, doup)
33 return oup, inp.grad
34
35 mge_rsts = func(mod, inp, doup)
36 xla_rsts = func(mod, inp, doup)

Callers 1

testerFunction · 0.70

Calls 3

modFunction · 0.50
attachMethod · 0.45
backwardMethod · 0.45

Tested by

no test coverage detected