Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
manickavela29 committed Jul 4, 2024
1 parent 04a9d8d commit 1a84eaf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
8 changes: 5 additions & 3 deletions sherpa-onnx/csrc/provider-config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,11 @@ void ProviderConfig::Register(ParseOptions *po) {
}

bool ProviderConfig::Validate() const {
if (device < 0) {
SHERPA_ONNX_LOGE("device: '%d' is invalid.", device);
return false;
if(provider == "cuda" || provider == "trt") {
if (device < 0) {
SHERPA_ONNX_LOGE("device: '%d' is invalid.", device);
return false;
}
}
return true;
}
Expand Down
2 changes: 0 additions & 2 deletions sherpa-onnx/python/csrc/sherpa-onnx.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#ifndef SHERPA_ONNX_PYTHON_CSRC_SHERPA_ONNX_H_
#define SHERPA_ONNX_PYTHON_CSRC_SHERPA_ONNX_H_

#define PYBIND11_DETAILED_ERROR_MESSAGES

#include "pybind11/functional.h"
#include "pybind11/numpy.h"
#include "pybind11/pybind11.h"
Expand Down
1 change: 0 additions & 1 deletion sherpa-onnx/python/sherpa_onnx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
OfflineTtsVitsModelConfig,
OfflineZipformerAudioTaggingModelConfig,
OnlineStream,
ProviderConfig,
SileroVadModelConfig,
SpeakerEmbeddingExtractor,
SpeakerEmbeddingExtractorConfig,
Expand Down

0 comments on commit 1a84eaf

Please sign in to comment.