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

Method raw

tools/Polygraphy/polygraphy/cuda/cuda.py:375–387  ·  view source on GitHub ↗

Creates an untyped device array of the specified shape. Args: shape (Tuple[int]): The initial shape of the buffer, in units of bytes. For example, a shape of ``(4, 4)`` would allocate a 16 byte array. Returns: DeviceA

(shape)

Source from the content-addressed store, hash-verified

373
374 @staticmethod
375 def raw(shape):
376 """
377 Creates an untyped device array of the specified shape.
378
379 Args:
380 shape (Tuple[int]):
381 The initial shape of the buffer, in units of bytes.
382 For example, a shape of ``(4, 4)`` would allocate a 16 byte array.
383
384 Returns:
385 DeviceArray: The raw device array.
386 """
387 return DeviceArray(shape=shape, dtype=np.byte)
388
389 def resize(self, shape):
390 """

Callers 3

reallocate_outputMethod · 0.45
make_buffersMethod · 0.45
test_rawMethod · 0.45

Calls 1

DeviceArrayClass · 0.85

Tested by 1

test_rawMethod · 0.36