Class CompileSpec::TensorFormat

Nested Relationships

This class is a nested type of Struct CompileSpec .

Class Documentation

class trtorch:: CompileSpec :: TensorFormat

Public Types

enum Value

Underlying enum class to support the TensorFormat Class

In the case that you need to use the TensorFormat class itself, interface using this enum vs. normal instatination

ex. trtorch::TensorFormat type = TensorFormat::kContiguous ;

Values:

enumerator kContiguous

Contiguous / NCHW / Linear.

enumerator kChannelsLast

Channel Last / NHWC.

enumerator kUnknown

Sentinel value.

Public Functions

TensorFormat ( ) = default

Construct a new TensorFormat object.

constexpr TensorFormat ( Value t )

TensorFormat constructor from enum.

TensorFormat ( at::MemoryFormat t )

Construct a new TensorFormat object from torch type enums.

Parameters
  • t :

operator Value ( ) const

Get the enum value of the TensorFormat object.

Return

Value

operator bool ( ) = delete
constexpr bool operator== ( TensorFormat other ) const

Comparision operator for TensorFormat .

Return

true

Return

false

Parameters
  • other :

constexpr bool operator== ( TensorFormat :: Value other ) const

Comparision operator for TensorFormat .

Return

true

Return

false

Parameters
  • other :

constexpr bool operator!= ( TensorFormat other ) const

Comparision operator for TensorFormat .

Return

true

Return

false

Parameters
  • other :

constexpr bool operator!= ( TensorFormat :: Value other ) const

Comparision operator for TensorFormat .

Return

true

Return

false

Parameters
  • other :