Function torch_tensorrt::executorch_backend::profile_fits#
Defined in File OptimizationProfileSelection.h
Function Documentation#
-
inline bool torch_tensorrt::executorch_backend::profile_fits(const ProfileTable &table, int32_t profile, const std::vector<nvinfer1::Dims> &input_dims)#
Whether one profile accepts every input shape of an execution.
A profile index or bounds row that cannot describe these inputs answers “does
not fit” rather than indexing past the end of the table. Neither is reachable from the backend, which builds one row of num_inputs bounds per profile and only ever stores an index this function approved
— but this is installed public API, and on the auto path the answer also happens to be the useful one: a ProfileTable carrying a stale ProfileTable::active rescans from 0 instead of crashing.- Parameters:
table – The engine’s profile bounds.
profile – Index of the profile to test.
input_dims – Runtime shape of each input, in binding order.
- Returns:
true when the profile accepts all of them.