MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / test_basic

Method test_basic

tools/Polygraphy/tests/cuda/test_cuda.py:26–32  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

24
25class TestDeviceView:
26 def test_basic(self):
27 with DeviceArray(shape=(1, 4, 2), dtype=np.float32) as arr:
28 v = DeviceView(arr.ptr, arr.shape, arr.dtype)
29 assert v.ptr == arr.ptr
30 assert v.shape == arr.shape
31 assert v.dtype == arr.dtype
32 assert v.nbytes == arr.nbytes
33
34 def test_with_int_ptr(self):
35 ptr = 74892

Callers

nothing calls this directly

Calls 2

DeviceArrayClass · 0.90
DeviceViewClass · 0.90

Tested by

no test coverage detected