(session_kind)
| 175 | |
| 176 | @pytest.mark.parametrize("session_kind", _all_session_kinds) |
| 177 | def test_tensor(session_kind): |
| 178 | num_workers = 4 |
| 179 | sess = session_kind(num_workers=num_workers) |
| 180 | device = tvm.cpu(0) |
| 181 | x_np = np.arange(6).astype("float32").reshape([2, 3]) |
| 182 | y_np = np.arange(6).astype("float32").reshape([2, 3]) + 1 |
| 183 | x_disc = _numpy_to_worker_0(sess, x_np, device=device) |
| 184 | y_disc = sess.get_global_func("tests.disco.add_one_tensor")(x_disc) |
| 185 | y_nd = _numpy_from_worker_0(sess, y_disc, shape=y_np.shape, dtype=y_np.dtype) |
| 186 | np.testing.assert_equal(y_nd, y_np) |
| 187 | |
| 188 | |
| 189 | @pytest.mark.parametrize("session_kind", _all_session_kinds) |
nothing calls this directly
no test coverage detected
searching dependent graphs…