()
| 1044 | cc.create_shared(path_dso, ["-Wl,--whole-archive", pathA, pathB, "-Wl,--no-whole-archive"]) |
| 1045 | |
| 1046 | def popen_check(): |
| 1047 | # Load dll, will trigger system library registration |
| 1048 | ctypes.CDLL(path_dso) |
| 1049 | # Load the system wide library |
| 1050 | vmA = relax.VirtualMachine(tvm.runtime.system_lib("libA_"), tvm.cpu()) |
| 1051 | vmB = relax.VirtualMachine(tvm.runtime.system_lib("libB_"), tvm.cpu()) |
| 1052 | |
| 1053 | retA = vmA["main"](tvm_ffi.Shape([1])) |
| 1054 | retB = vmB["main"](tvm_ffi.Shape([2])) |
| 1055 | np.testing.assert_equal(retA.numpy(), np.array([0, 0]).astype("float32")) |
| 1056 | np.testing.assert_equal(retB.numpy(), np.array([1, 1]).astype("float32")) |
| 1057 | |
| 1058 | # system lib should be loaded in different process |
| 1059 | worker = popen_pool.PopenWorker() |
nothing calls this directly
no test coverage detected
searching dependent graphs…