Skip to content

Commit 71be725

Browse files
committed
BREAKING CHANGE: Change EngineCapability enum to use the new values introduced in TRT 8.0
Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com>
1 parent 3776a14 commit 71be725

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

cpp/api/include/trtorch/trtorch.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ struct TRTORCH_API CompileSpec {
191191
* Emum for selecting engine capability
192192
*/
193193
enum class EngineCapability : int8_t {
194-
kDEFAULT,
195-
kSAFE_GPU,
196-
kSAFE_DLA,
194+
kSTANDARD,
195+
kSAFETY,
196+
kDLA_STANDALONE,
197197
};
198198

199199
/**
@@ -420,7 +420,7 @@ struct TRTORCH_API CompileSpec {
420420
/**
421421
* Sets the restrictions for the engine (CUDA Safety)
422422
*/
423-
EngineCapability capability = EngineCapability::kDEFAULT;
423+
EngineCapability capability = EngineCapability::kSTANDARD;
424424

425425
/**
426426
* Number of minimization timing iterations used to select kernels

cpp/api/src/compile_spec.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,13 @@ core::CompileSpec to_internal_compile_spec(CompileSpec external) {
123123
}
124124

125125
switch (external.capability) {
126-
case CompileSpec::EngineCapability::kSAFE_GPU:
126+
case CompileSpec::EngineCapability::kSAFETY:
127127
internal.convert_info.engine_settings.capability = nvinfer1::EngineCapability::kSAFETY;
128128
break;
129-
case CompileSpec::EngineCapability::kSAFE_DLA:
129+
case CompileSpec::EngineCapability::kDLA_STANDALONE:
130130
internal.convert_info.engine_settings.capability = nvinfer1::EngineCapability::kDLA_STANDALONE;
131131
break;
132-
case CompileSpec::EngineCapability::kDEFAULT:
132+
case CompileSpec::EngineCapability::kSTANDARD:
133133
default:
134134
internal.convert_info.engine_settings.capability = nvinfer1::EngineCapability::kSTANDARD;
135135
}

0 commit comments

Comments
 (0)