Skip to content

Commit

Permalink
be consistent with #if elif or #ifdef #elif defined
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdaily committed Oct 9, 2023
1 parent be62e26 commit 5bc0f95
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions onnxruntime/test/contrib_ops/element_wise_ops_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ static void RunBiasGeluTestBFloat16(const std::vector<int64_t>& input_dims, cons
tester.AddInput<BFloat16>("B", bias_dims, bias_data_bf16);
tester.AddOutput<BFloat16>("C", input_dims, output_data_bf16);
std::vector<std::unique_ptr<IExecutionProvider>> execution_providers;
#ifdef USE_CUDA
#if defined(USE_CUDA)
execution_providers.push_back(DefaultCudaExecutionProvider());
#elif USE_ROCM
#elif defined(USE_ROCM)
execution_providers.push_back(DefaultRocmExecutionProvider());
#elif USE_DNNL
#elif defined(USE_DNNL)
execution_providers.push_back(DefaultDnnlExecutionProvider());
#elif USE_DML
#elif defined(USE_DML)
execution_providers.push_back(DefaultDmlExecutionProvider());
#endif
tester.Run(OpTester::ExpectResult::kExpectSuccess, "", {}, nullptr, &execution_providers);
Expand Down Expand Up @@ -218,9 +218,9 @@ TEST(MathOpTest, ComplexMul) {
tester.AddOutput<float>("C", {4, 2}, output_data);

std::vector<std::unique_ptr<IExecutionProvider>> execution_providers;
#ifdef USE_CUDA
#if defined(USE_CUDA)
execution_providers.push_back(DefaultCudaExecutionProvider());
#elif USE_ROCM
#elif defined(USE_ROCM)
execution_providers.push_back(DefaultRocmExecutionProvider());
#endif
tester.Run(OpTester::ExpectResult::kExpectSuccess, "", {}, nullptr, &execution_providers);
Expand Down Expand Up @@ -248,7 +248,7 @@ TEST(MathOpTest, ComplexMulConj) {
std::vector<std::unique_ptr<IExecutionProvider>> execution_providers;
#ifdef USE_CUDA
execution_providers.push_back(DefaultCudaExecutionProvider());
#elif USE_ROCM
#elif defined(USE_ROCM)
execution_providers.push_back(DefaultRocmExecutionProvider());
#endif
tester.Run(OpTester::ExpectResult::kExpectSuccess, "", {}, nullptr, &execution_providers);
Expand Down Expand Up @@ -276,7 +276,7 @@ TEST(MathOpTest, ComplexMul_fp16) {
std::vector<std::unique_ptr<IExecutionProvider>> execution_providers;
#ifdef USE_CUDA
execution_providers.push_back(DefaultCudaExecutionProvider());
#elif USE_ROCM
#elif defined(USE_ROCM)
execution_providers.push_back(DefaultRocmExecutionProvider());
#endif
tester.Run(OpTester::ExpectResult::kExpectSuccess, "", {}, nullptr, &execution_providers);
Expand Down Expand Up @@ -304,7 +304,7 @@ TEST(MathOpTest, ComplexMulConj_fp16) {
std::vector<std::unique_ptr<IExecutionProvider>> execution_providers;
#ifdef USE_CUDA
execution_providers.push_back(DefaultCudaExecutionProvider());
#elif USE_ROCM
#elif defined(USE_ROCM)
execution_providers.push_back(DefaultRocmExecutionProvider());
#endif
tester.Run(OpTester::ExpectResult::kExpectSuccess, "", {}, nullptr, &execution_providers);
Expand Down

0 comments on commit 5bc0f95

Please sign in to comment.