Skip to content

Commit

Permalink
Merge branch 'main' into mqin/add_codespell_ingored_words
Browse files Browse the repository at this point in the history
  • Loading branch information
tbirdso authored Sep 30, 2024
2 parents d3a3fda + b5819c9 commit 7cf1e0b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
7 changes: 4 additions & 3 deletions applications/multiai_endoscopy/cpp/post-proc-cpu/multi_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
__LINE__, \
__FILE__, \
cudaGetErrorString(cuda_status), \
cuda_status); \
static_cast<int>(cuda_status)); \
throw std::runtime_error("Unable to copy device to host"); \
} \
}
Expand Down Expand Up @@ -81,8 +81,9 @@ void print_tensor(const std::shared_ptr<holoscan::Tensor>& tensor,
auto ndim = tensor->ndim();
auto itemsize = tensor->itemsize();

HOLOSCAN_LOG_INFO(
"device.device_type={}, device.device_id={}", device.device_type, device.device_id);
HOLOSCAN_LOG_INFO("device.device_type={}, device.device_id={}",
static_cast<int>(device.device_type),
device.device_id);
HOLOSCAN_LOG_INFO(
"dtype.code={}, dtype.bits={}, dtype.lanes={}", dtype.code, dtype.bits, dtype.lanes);
for (int i = 0; i < shape.size(); ++i) { HOLOSCAN_LOG_INFO("shape[{}]={}", i, shape[i]); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
__LINE__, \
__FILE__, \
cudaGetErrorString(cuda_status), \
cuda_status); \
static_cast<int>(cuda_status)); \
throw std::runtime_error("Unable to copy device to host"); \
} \
}
Expand All @@ -53,8 +53,9 @@ void print_tensor(const std::shared_ptr<holoscan::Tensor>& tensor, size_t n_prin
auto ndim = tensor->ndim();
auto itemsize = tensor->itemsize();

HOLOSCAN_LOG_INFO(
"device.device_type={}, device.device_id={}", device.device_type, device.device_id);
HOLOSCAN_LOG_INFO("device.device_type={}, device.device_id={}",
static_cast<int>(device.device_type),
device.device_id);
HOLOSCAN_LOG_INFO(
"dtype.code={}, dtype.bits={}, dtype.lanes={}", dtype.code, dtype.bits, dtype.lanes);
for (int i = 0; i < shape.size(); ++i) { HOLOSCAN_LOG_INFO("shape[{}]={}", i, shape[i]); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
__LINE__, \
__FILE__, \
cudaGetErrorString(cuda_status), \
cuda_status); \
static_cast<int>(cuda_status)); \
throw std::runtime_error("Unable to copy device to host"); \
} \
}
Expand All @@ -54,8 +54,9 @@ void print_tensor(const std::shared_ptr<holoscan::Tensor>& tensor, size_t n_prin
auto ndim = tensor->ndim();
auto itemsize = tensor->itemsize();

HOLOSCAN_LOG_INFO(
"device.device_type={}, device.device_id={}", device.device_type, device.device_id);
HOLOSCAN_LOG_INFO("device.device_type={}, device.device_id={}",
static_cast<int>(device.device_type),
device.device_id);
HOLOSCAN_LOG_INFO(
"dtype.code={}, dtype.bits={}, dtype.lanes={}", dtype.code, dtype.bits, dtype.lanes);
for (int i = 0; i < shape.size(); ++i) { HOLOSCAN_LOG_INFO("shape[{}]={}", i, shape[i]); }
Expand Down
3 changes: 2 additions & 1 deletion operators/npp_filter/npp_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ void NppFilterOp::compute(InputContext& op_input, OutputContext& op_output,
throw std::runtime_error(fmt::format("Unknown filter {}.", filter_.get()));
}
if (status != NPP_SUCCESS) {
throw std::runtime_error(fmt::format("Filter {} failed with error {}", filter_.get(), status));
throw std::runtime_error(
fmt::format("Filter {} failed with error {}", filter_.get(), static_cast<int>(status)));
}

// pass the CUDA stream to the output message
Expand Down
16 changes: 10 additions & 6 deletions operators/orsi/orsi_format_converter/format_converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,8 +713,8 @@ void FormatConverterOp::convertTensorFormat(const void* in_tensor_data, void* ou
scale_max_,
npp_stream_ctx_);
} else {
throw std::runtime_error(
fmt::format("Failed to convert channel order (NPP error code: {})", status));
throw std::runtime_error(fmt::format("Failed to convert channel order (NPP error code: {})",
static_cast<int>(status)));
}
break;
}
Expand All @@ -737,7 +737,8 @@ void FormatConverterOp::convertTensorFormat(const void* in_tensor_data, void* ou
status = nppiRGBToYUV420_8u_C3P3R(in_tensor_ptr, src_step, out_yuv_ptrs, out_yuv_steps, roi);
if (status != NPP_SUCCESS) {
throw std::runtime_error(
fmt::format("rgb888 to yuv420 conversion failed (NPP error code: {})", status));
fmt::format("rgb888 to yuv420 conversion failed (NPP error code: {})",
static_cast<int>(status)));
}
break;
}
Expand All @@ -759,7 +760,8 @@ void FormatConverterOp::convertTensorFormat(const void* in_tensor_data, void* ou
status = nppiYUV420ToRGB_8u_P3AC4R(in_yuv_ptrs, in_yuv_steps, out_tensor_ptr, dst_step, roi);
if (status != NPP_SUCCESS) {
throw std::runtime_error(
fmt::format("yuv420 to rgba8888 conversion failed (NPP error code: {})", status));
fmt::format("yuv420 to rgba8888 conversion failed (NPP error code: {})",
static_cast<int>(status)));
}
break;
}
Expand All @@ -781,7 +783,8 @@ void FormatConverterOp::convertTensorFormat(const void* in_tensor_data, void* ou
status = nppiYUV420ToRGB_8u_P3C3R(in_yuv_ptrs, in_yuv_steps, out_tensor_ptr, dst_step, roi);
if (status != NPP_SUCCESS) {
throw std::runtime_error(
fmt::format("yuv420 to rgb888 conversion failed (NPP error code: {})", status));
fmt::format("yuv420 to rgb888 conversion failed (NPP error code: {})",
static_cast<int>(status)));
}
break;
}
Expand All @@ -800,7 +803,8 @@ void FormatConverterOp::convertTensorFormat(const void* in_tensor_data, void* ou
nppiNV12ToRGB_709HDTV_8u_P2C3R(in_y_uv_ptrs, in_y_uv_step, out_tensor_ptr, dst_step, roi);
if (status != NPP_SUCCESS) {
throw std::runtime_error(
fmt::format("NV12 to rgb888 conversion failed (NPP error code: {})", status));
fmt::format("NV12 to rgb888 conversion failed (NPP error code: {})",
static_cast<int>(status)));
}
break;
}
Expand Down

0 comments on commit 7cf1e0b

Please sign in to comment.