Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yf711 committed Oct 21, 2024
1 parent 0ab620a commit 86d3019
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions onnxruntime/test/onnx/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ inline void THROW_ON_ERROR(OrtStatus* status) {
}

void TestTensorRTEp(const OrtApi* g_ort, OrtEnv* env, OrtSessionOptions* so, int device_id) {
THROW_ON_ERROR(g_ort->RegisterOrtExecutionProviderLibrary("/home/yifanl/onnxruntime/samples/tensorRTEp/build/libTensorRTEp.so", env, "tensorrtEp"));
THROW_ON_ERROR(g_ort->RegisterPluginExecutionProviderLibrary("/home/yifanl/onnxruntime/samples/tensorRTEp/build/libTensorRTEp.so", env, "tensorrtEp"));
std::vector<const char*> keys{"device_id", "str_property"};
std::string device_id_str = std::to_string(device_id);
std::vector<const char*> values{device_id_str.c_str(), "strvalue"};
THROW_ON_ERROR(g_ort->SessionOptionsAppendOrtExecutionProvider(so, "tensorrtEp", env, keys.data(), values.data(), keys.size()));
THROW_ON_ERROR(g_ort->SessionOptionsAppendPluginExecutionProvider(so, "tensorrtEp", env, keys.data(), values.data(), keys.size()));
}

static TestTolerances LoadTestTolerances(bool enable_cuda, bool enable_openvino, bool useCustom, double atol, double rtol) {
Expand Down
2 changes: 1 addition & 1 deletion samples/b.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cd ../../

cd tensorRTEp && rm -r build && mkdir -p build && cd build
# Download TensorRT with correct cuda version selected
cmake -S ../ -B ./ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CUDA_ARCHITECTURES=80 -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DTENSORRT_HOME=/home/yifanl/TensorRT-10.4.0.26/ -DORT_HOME=/home/yifanl/onnxruntime/
cmake -S ../ -B ./ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CUDA_ARCHITECTURES=80 -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DTENSORRT_HOME=/home/yifanl/TensorRT-10.5.0.18/ -DORT_HOME=/home/yifanl/onnxruntime/
cmake --build ./
cd ../../

Expand Down

0 comments on commit 86d3019

Please sign in to comment.