Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Fangjun Kuang <[email protected]>
  • Loading branch information
manickavela29 and csukuangfj authored Jun 27, 2024
1 parent fa001b7 commit be3aa27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sherpa-onnx/csrc/provider-config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void CudaConfig::Register(ParseOptions *po) {
}

bool CudaConfig::Validate() const {
if (cudnn_conv_algo_search < 1 && cudnn_conv_algo_search > 3) {
if (cudnn_conv_algo_search < 1 || cudnn_conv_algo_search > 3) {
SHERPA_ONNX_LOGE("cudnn_conv_algo_search: '%d' is not a valid option."
"Options : [1,3]. Check OnnxRT docs",
cudnn_conv_algo_search);
Expand All @@ -30,7 +30,7 @@ std::string CudaConfig::ToString() const {
std::ostringstream os;

os << "CudaConfig(";
os << "cudnn_conv_algo_search=\"" << cudnn_conv_algo_search << ")";
os << "cudnn_conv_algo_search=" << cudnn_conv_algo_search << ")";

return os.str();
}
Expand Down Expand Up @@ -60,7 +60,7 @@ void TensorrtConfig::Register(ParseOptions *po) {

bool TensorrtConfig::Validate() const {
if (trt_max_workspace_size > 0) {
SHERPA_ONNX_LOGE("trt_max_workspace_size: '%d' is not valid.",
SHERPA_ONNX_LOGE("trt_max_workspace_size: '%u' is not valid.",
trt_max_workspace_size);
return false;
}
Expand Down

0 comments on commit be3aa27

Please sign in to comment.