Skip to content

Commit

Permalink
Add Missing Test File (microsoft#13607)
Browse files Browse the repository at this point in the history
I built a new test infra for CUDA EP in microsoft#13016 but forgot adding the
test to onnxruntime_test_all. Here is the missing file. Now, the
`TestAll` function is really called in CI.
  • Loading branch information
wschin authored Nov 10, 2022
1 parent 31cb3cb commit cd85a63
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/cuda/cuda_provider_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ struct ProviderInfo_CUDA_Impl : ProviderInfo_CUDA {

// TODO(wechi): brings disabled tests in onnxruntime/test/providers/cuda/*
// back alive here.
return false;
return true;
}
#endif
} g_info;
Expand Down
24 changes: 24 additions & 0 deletions onnxruntime/test/providers/cuda/cuda_provider_test.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#ifndef NDEBUG
#include "gtest/gtest.h"
#include "core/common/status.h"
#include "core/providers/cuda/cuda_provider_factory.h"
#include <iostream>
namespace onnxruntime {

ProviderInfo_CUDA& GetProviderInfo_CUDA();

namespace test {
namespace cuda {
TEST(CUDAEPTEST, ALL) {
onnxruntime::ProviderInfo_CUDA& ep = onnxruntime::GetProviderInfo_CUDA();
ASSERT_TRUE(ep.TestAll());
}

} // namespace test
} // namespace cuda
} // namespace onnxruntime

#endif

0 comments on commit cd85a63

Please sign in to comment.