MCPcopy Create free account
hub / github.com/apache/singa / _ceil_helper

Method _ceil_helper

test/python/test_tensor.py:386–396  ·  view source on GitHub ↗
(self, dev)

Source from the content-addressed store, hash-verified

384 self._subscription_helper(gpu_dev)
385
386 def _ceil_helper(self, dev):
387
388 np1 = np.random.random([5, 6, 7, 8]).astype(np.float32)
389 np1 = np1 * 10
390 np2 = np.ceil(np1)
391
392 t1 = tensor.Tensor(device=dev, data=np1)
393
394 t2 = tensor.ceil(t1)
395
396 np.testing.assert_array_almost_equal(tensor.to_numpy(t2), np2)
397
398 def test_ceil_cpu(self):
399 self._ceil_helper(cpu_dev)

Callers 2

test_ceil_cpuMethod · 0.95
test_ceil_gpuMethod · 0.95

Calls 1

TensorMethod · 0.80

Tested by

no test coverage detected