(self)
| 21 | |
| 22 | class RuntimeTest(unittest.TestCase): |
| 23 | def test_smoke(self): |
| 24 | ep, inputs = create_program(ModuleAdd()) |
| 25 | runtime = Runtime.get() |
| 26 | # Demonstrate that get() returns a singleton. |
| 27 | runtime2 = Runtime.get() |
| 28 | self.assertTrue(runtime is runtime2) |
| 29 | program = runtime.load_program(ep.buffer, verification=Verification.Minimal) |
| 30 | method = program.load_method("forward") |
| 31 | outputs = method.execute(inputs) |
| 32 | self.assertTrue(torch.allclose(outputs[0], inputs[0] + inputs[1])) |
| 33 | |
| 34 | def test_module_with_multiple_method_names(self): |
| 35 | ep, inputs = create_program(ModuleMulti()) |
nothing calls this directly
no test coverage detected