Skip to content

Commit

Permalink
refactor: apply linting
Browse files Browse the repository at this point in the history
Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
  • Loading branch information
narendasan committed Jul 22, 2021
1 parent ad52022 commit df87de3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion core/conversion/conversionctx/ConversionCtx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ ConversionCtx::ConversionCtx(BuilderSettings build_settings)
case nvinfer1::DataType::kINT32:
case nvinfer1::DataType::kBOOL:
default:
TRTORCH_THROW_ERROR("Requested kernel precision that is unsupported: " << *p << " options are float, half, int8");
TRTORCH_THROW_ERROR(
"Requested kernel precision that is unsupported: " << *p << " options are float, half, int8");
}
}

Expand Down
6 changes: 4 additions & 2 deletions cpp/api/src/compile_spec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ CompileSpec::DataType::DataType(c10::ScalarType t) {

CompileSpec::TensorFormat::TensorFormat(at::MemoryFormat t) {
TRTORCH_CHECK(
t == at::MemoryFormat::Contiguous || t == at::MemoryFormat::ChannelsLast, "Tensor format is unsupported (" << t << ")");
t == at::MemoryFormat::Contiguous || t == at::MemoryFormat::ChannelsLast,
"Tensor format is unsupported (" << t << ")");

switch (t) {
case at::MemoryFormat::ChannelsLast:
Expand Down Expand Up @@ -328,7 +329,8 @@ core::runtime::CudaDevice to_internal_cuda_device(CompileSpec::Device device) {
core::CompileSpec to_internal_compile_spec(CompileSpec external) {
core::CompileSpec internal(to_vec_internal_inputs(external.inputs));
if (external.input_ranges.size() > 0 && external.inputs.size() > 0) {
TRTORCH_THROW_ERROR("Saw both input specs listed for inputs and input_ranges in CompileSpec. input_ranges is deprecated and will be removed in v0.5.0. Please port forward to using inputs");
TRTORCH_THROW_ERROR(
"Saw both input specs listed for inputs and input_ranges in CompileSpec. input_ranges is deprecated and will be removed in v0.5.0. Please port forward to using inputs");
} else if (external.input_ranges.size() > 0) {
internal = core::CompileSpec(to_vec_internal_inputs(external.input_ranges));
} else {
Expand Down

0 comments on commit df87de3

Please sign in to comment.