Skip to content

# Struct CompileSpec::InputRange

- Defined in File trtorch.h

## Nested Relationships

This struct is a nested type of Struct CompileSpec .

## Struct Documentation

struct `trtorch:: CompileSpec `::`` `InputRange`

  A struct to hold an input range (used by TensorRT Optimization profile)

  This struct can either hold a single vector representing an input shape, signifying a static input shape or a set of three input shapes representing the min, optiminal and max input shapes allowed for the engine.

  Public Functions

  `InputRange` ( std::vector<int64_t> opt )

    Construct a new Input Range object for static input size from vector.

    Parameters

      - `opt` :

  `InputRange` ( c10::ArrayRef<int64_t> opt )

    Construct a new Input Range object static input size from c10::ArrayRef (the type produced by tensor.sizes())

    Parameters

      - `opt` :

  `InputRange` ( std::vector<int64_t> min , std::vector<int64_t> opt , std::vector<int64_t> max )

    Construct a new Input Range object dynamic input size from vectors for min, opt, and max supported sizes.

    Parameters

      - `min` :

      - `opt` :

      - `max` :

  `InputRange` ( c10::ArrayRef<int64_t> min , c10::ArrayRef<int64_t> opt , c10::ArrayRef<int64_t> max )

    Construct a new Input Range object dynamic input size from c10::ArrayRef (the type produced by tensor.sizes()) for min, opt, and max supported sizes.

    Parameters

      - `min` :

      - `opt` :

      - `max` :

  Public Members

  std::vector<int64_t> `min`

    Minimum acceptable input size into the engine.

  std::vector<int64_t> `opt`

    Optimal input size into the engine (gets best performace)

  std::vector<int64_t> `max`

    Maximum acceptable input size into the engine.