Dims

Volume

tensorrt_rtx.volume(iterable)

Computes the volume of an iterable.

Parameters:

iterable – Any python iterable, including a Dims object.

Returns:

The volume of the iterable. This will return 1 for empty iterables, as a scalar has an empty shape and the volume of a tensor with empty shape is 1.

Dims

class tensorrt_rtx.Dims(*args, **kwargs)

Structure to define the dimensions of a tensor. Dims and all derived classes behave like Python tuple s. Furthermore, the TensorRT-RTX API can implicitly convert Python iterables to Dims objects, so tuple or list can be used in place of this class.

Overloaded function.

  1. __init__(self: tensorrt_rtx.tensorrt_rtx.Dims) -> None

  2. __init__(self: tensorrt_rtx.tensorrt_rtx.Dims, shape: collections.abc.Sequence[typing.SupportsInt]) -> None

Dims2

class tensorrt_rtx.Dims2(*args, **kwargs)

Structure to define 2D shape.

Overloaded function.

  1. __init__(self: tensorrt_rtx.tensorrt_rtx.Dims2) -> None

  2. __init__(self: tensorrt_rtx.tensorrt_rtx.Dims2, dim0: typing.SupportsInt, dim1: typing.SupportsInt) -> None

  3. __init__(self: tensorrt_rtx.tensorrt_rtx.Dims2, shape: collections.abc.Sequence[typing.SupportsInt]) -> None

DimsHW

class tensorrt_rtx.DimsHW(*args, **kwargs)

Structure to define 2D shape with height and width.

Variables:
  • hint The first dimension (height).

  • wint The second dimension (width).

Overloaded function.

  1. __init__(self: tensorrt_rtx.tensorrt_rtx.DimsHW) -> None

  2. __init__(self: tensorrt_rtx.tensorrt_rtx.DimsHW, h: typing.SupportsInt, w: typing.SupportsInt) -> None

  3. __init__(self: tensorrt_rtx.tensorrt_rtx.DimsHW, shape: collections.abc.Sequence[typing.SupportsInt]) -> None

Dims3

class tensorrt_rtx.Dims3(*args, **kwargs)

Structure to define 3D shape.

Overloaded function.

  1. __init__(self: tensorrt_rtx.tensorrt_rtx.Dims3) -> None

  2. __init__(self: tensorrt_rtx.tensorrt_rtx.Dims3, dim0: typing.SupportsInt, dim1: typing.SupportsInt, dim2: typing.SupportsInt) -> None

  3. __init__(self: tensorrt_rtx.tensorrt_rtx.Dims3, shape: collections.abc.Sequence[typing.SupportsInt]) -> None

Dims4

class tensorrt_rtx.Dims4(*args, **kwargs)

Structure to define 4D tensor.

Overloaded function.

  1. __init__(self: tensorrt_rtx.tensorrt_rtx.Dims4) -> None

  2. __init__(self: tensorrt_rtx.tensorrt_rtx.Dims4, dim0: typing.SupportsInt, dim1: typing.SupportsInt, dim2: typing.SupportsInt, dim3: typing.SupportsInt) -> None

  3. __init__(self: tensorrt_rtx.tensorrt_rtx.Dims4, shape: collections.abc.Sequence[typing.SupportsInt]) -> None