MCPcopy Create free account
hub / github.com/pytorch/executorch / test_add

Method test_add

runtime/test/test_runtime.py:61–64  ·  view source on GitHub ↗
(program)

Source from the content-addressed store, hash-verified

59 runtime = Runtime.get()
60
61 def test_add(program):
62 method = program.load_method("forward")
63 outputs = method.execute(inputs)
64 self.assertTrue(torch.allclose(outputs[0], inputs[0] + inputs[1]))
65
66 with tempfile.NamedTemporaryFile() as f:
67 f.write(ep.buffer)

Callers

nothing calls this directly

Calls 2

load_methodMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected