Enum ProfileSelection#
Defined in File OptimizationProfileSelection.h
Enum Documentation#
-
enum class torch_tensorrt::executorch_backend::ProfileSelection#
The outcome of one profile decision.
Its own enum rather than executorch’s Error so that this header stays independent of executorch and can be tested separately.
Two axes: whether execution continues, and which message the caller prints. The two failure values stay apart rather than being merged and re-derived from the request kind, because the empty-table guard in select_profile() returns kNoProfileMatchesInputs for every request kind — so one merged value would put the message back at the mercy of which branches each request can reach.
Values:
-
enumerator kOk#
The selected profile is usable.
-
enumerator kPinIgnoredSingleProfile#
Succeeded, but the pin could not be honored and profile 0 was used instead.
Distinct from kOk so the caller can warn that the pin did nothing here.
A pinned index this engine does not have and cannot substitute for.
Fatal, on the same split the standard runtime uses in TRTEngine::set_active_profile_with_stream: an engine that had profiles to choose between must not quietly run on one the caller did not ask for. OptimizationProfileGuard cannot validate anything — it never sees an engine, by design — so execute() is the only place an ExecuTorch caller’s bad index can be caught at all.
-
enumerator kNoProfileMatchesInputs#
Auto-selection ran out of profiles.
-
enumerator kOk#