Skip to content

Commit 60264fa

Browse files
committed
[NV TRT RTX EP]: enable Windows-only tests on Linux
1 parent 2a2f8d8 commit 60264fa

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

onnxruntime/test/providers/nv_tensorrt_rtx/nv_basic_test.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ INSTANTIATE_TEST_SUITE_P(NvExecutionProviderTest, TypeTests,
216216
),
217217
[](const testing::TestParamInfo<TypeTests::ParamType>& info) { return getTypeAsName(info.param); });
218218

219-
#ifdef _WIN32
220219
static bool SessionHasEp(Ort::Session& session, const char* ep_name) {
221220
// Access the underlying InferenceSession.
222221
const OrtSession* ort_session = session;
@@ -233,7 +232,6 @@ static bool SessionHasEp(Ort::Session& session, const char* ep_name) {
233232
}
234233

235234
// Tests autoEP feature to automatically select an EP that supports the GPU.
236-
// Currently only works on Windows.
237235
TEST(NvExecutionProviderTest, AutoEp_PreferGpu) {
238236
PathString model_name = ORT_TSTR("nv_execution_provider_auto_ep.onnx");
239237
std::string graph_name = "test";
@@ -243,7 +241,11 @@ TEST(NvExecutionProviderTest, AutoEp_PreferGpu) {
243241
CreateBaseModel(model_name, graph_name, dims);
244242

245243
{
244+
#if _WIN32
246245
ort_env->RegisterExecutionProviderLibrary(kNvTensorRTRTXExecutionProvider, ORT_TSTR("onnxruntime_providers_nv_tensorrt_rtx.dll"));
246+
#else
247+
ort_env->RegisterExecutionProviderLibrary(kNvTensorRTRTXExecutionProvider, ORT_TSTR("libonnxruntime_providers_nv_tensorrt_rtx.so"));
248+
#endif
247249

248250
Ort::SessionOptions so;
249251
so.SetEpSelectionPolicy(OrtExecutionProviderDevicePolicy_PREFER_GPU);
@@ -398,7 +400,5 @@ TEST(NvExecutionProviderTest, DataTransfer) {
398400
device_tensor = Ort::Value();
399401
}
400402

401-
#endif
402-
403403
} // namespace test
404404
} // namespace onnxruntime

onnxruntime/test/providers/nv_tensorrt_rtx/nv_ep_context_test.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ namespace test {
1414

1515
RegisteredEpDeviceUniquePtr AppendTrtEtxEP(Ort::SessionOptions& session_options, std::unordered_map<std::string, std::string>& option_map) {
1616
RegisteredEpDeviceUniquePtr nv_tensorrt_rtx_ep;
17-
#ifdef _WIN32
1817
/// Since this test runs after other tests that use registration interface this test has to use it as well
1918
/// windows as otherwise the kernel registry inside the EP will not be populated. The legacy APis ony call the initialize once.
2019
Utils::RegisterAndGetNvTensorRtRtxEp(*ort_env, nv_tensorrt_rtx_ep);
@@ -26,9 +25,6 @@ RegisteredEpDeviceUniquePtr AppendTrtEtxEP(Ort::SessionOptions& session_options,
2625
}
2726
}
2827
session_options.AppendExecutionProvider_V2(*ort_env, {selected_device}, option_map);
29-
#else
30-
session_options.AppendExecutionProvider(onnxruntime::kNvTensorRTRTXExecutionProvider, option_map);
31-
#endif
3228
return nv_tensorrt_rtx_ep;
3329
}
3430

onnxruntime/test/providers/nv_tensorrt_rtx/test_nv_trt_rtx_ep_util.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
namespace onnxruntime {
2424
namespace test {
25-
#ifdef _WIN32
2625

2726
Utils::NvTensorRtRtxEpInfo Utils::nv_tensorrt_rtx_ep_info;
2827

@@ -59,7 +58,6 @@ void Utils::RegisterAndGetNvTensorRtRtxEp(Ort::Env& env, RegisteredEpDeviceUniqu
5958
c_api.UnregisterExecutionProviderLibrary(env, nv_tensorrt_rtx_ep_info.registration_name.c_str());
6059
});
6160
}
62-
#endif // _WIN32
6361

6462
void CreateBaseModel(const PathString& model_name,
6563
std::string graph_name,

0 commit comments

Comments
 (0)