(server)
| 129 | return |
| 130 | |
| 131 | def check_remote(server): |
| 132 | remote = rpc.connect(server.host, server.port) |
| 133 | value = tvm.runtime.empty((512, 512), dtype, remote.cpu()) |
| 134 | random_fill = remote.get_function("tvm.contrib.random.random_fill") |
| 135 | random_fill(value) |
| 136 | |
| 137 | assert np.count_nonzero(value.numpy()) == 512 * 512 |
| 138 | |
| 139 | # make sure arithmentic doesn't overflow too |
| 140 | np_values = value.numpy() |
| 141 | assert np.isfinite(np_values * np_values + np_values).any() |
| 142 | |
| 143 | check_remote(rpc.Server("127.0.0.1")) |
| 144 |