Skip to content

Commit ed24659

Browse files
peri044narendasan
authored andcommitted
BREAKING CHANGE: Change EngineCapability enum to use the new values introduced in TRT 8.0
Signed-off-by: Dheeraj Peri <[email protected]>
1 parent 6d9ae99 commit ed24659

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
@@ -262,9 +262,9 @@ struct TRTORCH_API CompileSpec {
262262
* Emum for selecting engine capability
263263
*/
264264
enum class EngineCapability : int8_t {
265-
kDEFAULT,
266-
kSAFE_GPU,
267-
kSAFE_DLA,
265+
kSTANDARD,
266+
kSAFETY,
267+
kDLA_STANDALONE,
268268
};
269269

270270
class TRTORCH_API TensorFormat {
@@ -721,7 +721,7 @@ struct TRTORCH_API CompileSpec {
721721
/**
722722
* Sets the restrictions for the engine (CUDA Safety)
723723
*/
724-
EngineCapability capability = EngineCapability::kDEFAULT;
724+
EngineCapability capability = EngineCapability::kSTANDARD;
725725

726726
/**
727727
* 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
@@ -385,13 +385,13 @@ core::CompileSpec to_internal_compile_spec(CompileSpec external) {
385385
}
386386

387387
switch (external.capability) {
388-
case CompileSpec::EngineCapability::kSAFE_GPU:
388+
case CompileSpec::EngineCapability::kSAFETY:
389389
internal.convert_info.engine_settings.capability = nvinfer1::EngineCapability::kSAFETY;
390390
break;
391-
case CompileSpec::EngineCapability::kSAFE_DLA:
391+
case CompileSpec::EngineCapability::kDLA_STANDALONE:
392392
internal.convert_info.engine_settings.capability = nvinfer1::EngineCapability::kDLA_STANDALONE;
393393
break;
394-
case CompileSpec::EngineCapability::kDEFAULT:
394+
case CompileSpec::EngineCapability::kSTANDARD:
395395
default:
396396
internal.convert_info.engine_settings.capability = nvinfer1::EngineCapability::kSTANDARD;
397397
}

0 commit comments

Comments
 (0)