Fix style issues (#1718)
This commit is contained in:
@@ -7,9 +7,9 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "sherpa-onnx/csrc/parse-options.h"
|
|
||||||
#include "sherpa-onnx/csrc/macros.h"
|
|
||||||
#include "onnxruntime_cxx_api.h" // NOLINT
|
#include "onnxruntime_cxx_api.h" // NOLINT
|
||||||
|
#include "sherpa-onnx/csrc/macros.h"
|
||||||
|
#include "sherpa-onnx/csrc/parse-options.h"
|
||||||
|
|
||||||
namespace sherpa_onnx {
|
namespace sherpa_onnx {
|
||||||
|
|
||||||
@@ -41,10 +41,8 @@ struct TensorrtConfig {
|
|||||||
TensorrtConfig() = default;
|
TensorrtConfig() = default;
|
||||||
TensorrtConfig(int64_t trt_max_workspace_size,
|
TensorrtConfig(int64_t trt_max_workspace_size,
|
||||||
int32_t trt_max_partition_iterations,
|
int32_t trt_max_partition_iterations,
|
||||||
int32_t trt_min_subgraph_size,
|
int32_t trt_min_subgraph_size, bool trt_fp16_enable,
|
||||||
bool trt_fp16_enable,
|
bool trt_detailed_build_log, bool trt_engine_cache_enable,
|
||||||
bool trt_detailed_build_log,
|
|
||||||
bool trt_engine_cache_enable,
|
|
||||||
bool trt_timing_cache_enable,
|
bool trt_timing_cache_enable,
|
||||||
const std::string &trt_engine_cache_path,
|
const std::string &trt_engine_cache_path,
|
||||||
const std::string &trt_timing_cache_path,
|
const std::string &trt_timing_cache_path,
|
||||||
@@ -74,15 +72,15 @@ struct ProviderConfig {
|
|||||||
// device only used for cuda and trt
|
// device only used for cuda and trt
|
||||||
|
|
||||||
ProviderConfig() = default;
|
ProviderConfig() = default;
|
||||||
ProviderConfig(const std::string &provider,
|
ProviderConfig(const std::string &provider, int32_t device)
|
||||||
int32_t device)
|
|
||||||
: provider(provider), device(device) {}
|
: provider(provider), device(device) {}
|
||||||
ProviderConfig(const TensorrtConfig &trt_config,
|
ProviderConfig(const TensorrtConfig &trt_config,
|
||||||
const CudaConfig &cuda_config,
|
const CudaConfig &cuda_config, const std::string &provider,
|
||||||
const std::string &provider,
|
|
||||||
int32_t device)
|
int32_t device)
|
||||||
: trt_config(trt_config), cuda_config(cuda_config),
|
: trt_config(trt_config),
|
||||||
provider(provider), device(device) {}
|
cuda_config(cuda_config),
|
||||||
|
provider(provider),
|
||||||
|
device(device) {}
|
||||||
|
|
||||||
void Register(ParseOptions *po);
|
void Register(ParseOptions *po);
|
||||||
bool Validate() const;
|
bool Validate() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user