Skip to content

Commit

Permalink
device_id fix
Browse files Browse the repository at this point in the history
  • Loading branch information
manickavela29 committed Jun 26, 2024
1 parent f20157c commit 22d73e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sherpa-onnx/csrc/session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ static Ort::SessionOptions GetSessionOptionsImpl(int32_t num_threads,
const char *op_values;
};

auto device_id = std::to_string(provider_config->device);
auto trt_max_workspace_size =
std::to_string(trt_config.trt_max_workspace_size);
auto trt_max_partition_iterations =
Expand All @@ -95,8 +96,7 @@ static Ort::SessionOptions GetSessionOptionsImpl(int32_t num_threads,
std::to_string(trt_config.trt_dump_subgraphs);

std::vector<TrtPairs> trt_options = {
{"device_id",
std::to_string(provider_config->device).c_str()},
{"device_id", device_id.c_str()},
{"trt_max_workspace_size", trt_max_workspace_size.c_str()},
{"trt_max_partition_iterations", trt_max_partition_iterations.c_str()},
{"trt_min_subgraph_size", trt_min_subgraph_size.c_str()},
Expand Down

0 comments on commit 22d73e5

Please sign in to comment.