Skip to content

Commit

Permalink
Revert "Fix CUDA/DML package exception caused by ENABLE_CUDA_NHWC_OPS (
Browse files Browse the repository at this point in the history
…#22851)"

This reverts commit 135d8b2.
  • Loading branch information
snnn committed Dec 17, 2024
1 parent df0e56c commit 429b934
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
10 changes: 0 additions & 10 deletions onnxruntime/test/lora/lora_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,16 +201,6 @@ TEST(LoraAdapterTest, Load) {

#ifdef USE_CUDA
TEST(LoraAdapterTest, VerifyDeviceCopy) {
// These checks for CUDA/DML combined Package, Be careful when you want to remove it!
if (DefaultCudaExecutionProvider() == nullptr) {
GTEST_SKIP() << "Skip This Test Due to this EP is null";
}
#ifdef USE_DML
if (DefaultDmlExecutionProvider() != nullptr) {
GTEST_FAIL() << "It should not run with DML EP";
}
#endif

auto cpu_ep = DefaultCpuExecutionProvider();
auto cpu_allocator = cpu_ep->CreatePreferredAllocators()[0];
auto cuda_ep = DefaultCudaExecutionProvider();
Expand Down
6 changes: 0 additions & 6 deletions onnxruntime/test/util/default_providers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,6 @@ std::unique_ptr<IExecutionProvider> DefaultCudaExecutionProvider() {
#ifdef ENABLE_CUDA_NHWC_OPS
std::unique_ptr<IExecutionProvider> DefaultCudaNHWCExecutionProvider() {
#if defined(USE_CUDA)
#ifdef USE_DML
const std::string no_cuda_ep_test = Env::Default().GetEnvironmentVar("NO_CUDA_TEST");
if (no_cuda_ep_test == "1") {
return nullptr;
}
#endif
OrtCUDAProviderOptionsV2 provider_options{};
provider_options.do_copy_in_default_stream = true;
provider_options.use_tf32 = false;
Expand Down
1 change: 0 additions & 1 deletion tools/ci_build/github/azure-pipelines/templates/win-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ stages:
workingDirectory: '$(Build.BinariesDirectory)'
env:
NO_CUDA_TEST: '1'
GTEST_FILTER: -*CudaNhwcTypedTest*
- task: PythonScript@0
displayName: 'test excludes DML'
condition: and(succeeded(), eq('${{ parameters.runTests}}', true))
Expand Down

0 comments on commit 429b934

Please sign in to comment.