Skip to content

# Struct CompileSpec::TorchFallback

- Defined in File trtorch.h

## Nested Relationships

This struct is a nested type of Struct CompileSpec .

## Struct Documentation

struct `trtorch:: CompileSpec `::`` `TorchFallback`

  A struct to hold fallback info.

  Public Functions

  `TorchFallback` ( ) = default

    Construct a default Torch Fallback object, fallback will be off.

  `TorchFallback` ( bool enabled )

    Construct from a bool.

  `TorchFallback` ( bool enabled , uint64_t min_size )

    Constructor for setting min_block_size.

  Public Members

  bool `enabled` = false

    enable the automatic fallback feature

  uint64_t `min_block_size` = 1

    minimum consecutive operation number that needs to be satisfied to convert to TensorRT

  std::vector<std::string> `forced_fallback_ops`

    A list of names of operations that will explicitly run in PyTorch.