(self, dev=gpu_dev)
| 893 | self._round(gpu_dev) |
| 894 | |
| 895 | def _round(self, dev=gpu_dev): |
| 896 | x = tensor.Tensor(shape=(3,4,5), device=dev).gaussian(0, 1) |
| 897 | y = tensor._call_singa_func(singa_api.Round, x.data) |
| 898 | np.testing.assert_array_almost_equal(np.round(tensor.to_numpy(x)), |
| 899 | tensor.to_numpy(y)) |
| 900 | |
| 901 | def test_round_even_cpu(self): |
| 902 | self._round_even(cpu_dev) |
no test coverage detected