Template Function torch_tensorrt::executorch_backend::to_profile_index#
Defined in File OptimizationProfileSelection.h
Function Documentation#
-
template<typename T>
constexpr int32_t torch_tensorrt::executorch_backend::to_profile_index(T index)# Narrows any integer spelling of a profile index to int32_t.
An index outside the int32_t range becomes -1, which no engine has, so it is rejected like any other missing index instead of wrapping onto a real profile (int64_t{1} << 32 would otherwise pin profile 0).
- Parameters:
index – The index as the caller computed it.
- Returns:
The same index, or -1 when it does not fit.