Skip to content

Commit

Permalink
Remove obselete #if defined(USE_CUDA) (pytorch#2341)
Browse files Browse the repository at this point in the history
  • Loading branch information
zasdfgbnm committed Jan 19, 2023
1 parent df39a1f commit 63044e6
Show file tree
Hide file tree
Showing 25 changed files with 0 additions and 54 deletions.
5 changes: 0 additions & 5 deletions third_party/nvfuser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,6 @@ if(BUILD_TEST)
torch_compile_options(${NVFUSER_TESTS})

target_compile_definitions(${NVFUSER_TESTS} PRIVATE USE_GTEST)
if(NOT USE_ROCM)
target_compile_definitions(${NVFUSER_TESTS} PRIVATE USE_CUDA)
else()
target_compile_definitions(${NVFUSER_TESTS} PRIVATE USE_ROCM)
endif()
target_include_directories(${NVFUSER_TESTS} PRIVATE "${NVFUSER_ROOT}" "${TORCH_ROOT}/torch/csrc/api/include/")
target_link_libraries(${NVFUSER_TESTS} PRIVATE ${NVFUSER_CODEGEN} torch ${TORCHLIB_FLAVOR} gtest_main gmock_main)
if(NOT MSVC)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -110,4 +109,3 @@ TEST_F(NVFuserTest, KernelDb_Open_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -79,4 +78,3 @@ TEST_F(NVFuserTest, KernelDb_Query_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -74,4 +73,3 @@ TEST_F(NVFuserTest, KernelDb_Write_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -262,4 +261,3 @@ TEST_F(NVFuserTest, PyFusionCache_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -193,4 +192,3 @@ TEST_F(NVFuserTest, FusionDefinition_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -133,4 +132,3 @@ TEST_F(NVFuserTest, RecordFunctorEquality_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu1.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -8798,4 +8797,3 @@ TEST_F(NVFuserTest, FusionSmemDynamicTiledGemm_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu2.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -9826,4 +9825,3 @@ TEST_F(NVFuserTest, FusionRfactorIndirectRoot_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu3.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -7277,4 +7276,3 @@ TEST_F(NVFuserTest, FusionRepro2241_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu_compute_with.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -475,4 +474,3 @@ TEST_F(NVFuserTest, FusionComputeWith6_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu_expr_simplifier.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gtest/gtest.h>

#include <arith.h>
Expand Down Expand Up @@ -463,4 +462,3 @@ TEST_F(NVFuserTest, FusionDistributeMul_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu_external_src.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -178,4 +177,3 @@ TEST_F(NVFuserTest, FusionExternalSrcMatmul_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu_fused_reduction.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gtest/gtest.h>

#include <arith.h>
Expand Down Expand Up @@ -2506,4 +2505,3 @@ TEST_F(NVFuserTest, FusionGeluBwdReduction_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu_gather_ops.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -341,4 +340,3 @@ TEST_F(NVFuserTest, FusionTorchGatherIndexTvExtentIsOne_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu_indexing.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -790,4 +789,3 @@ TEST_F(NVFuserTest, FusionIndexing17_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu_indexing_ops.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gtest/gtest.h>

#include <kernel_cache.h>
Expand Down Expand Up @@ -676,4 +675,3 @@ TEST_F(NVFuserTest, FusionIndexSelectDim2InRank4_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu_outer_reduction.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -1345,4 +1344,3 @@ TEST_F(

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu_shift.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gtest/gtest.h>

#include <arith.h>
Expand Down Expand Up @@ -5464,4 +5463,3 @@ TEST_F(NVFuserTest, FusionContigPredicateShift_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu_swizzle.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gtest/gtest.h>

#include <kernel_cache.h>
Expand Down Expand Up @@ -611,4 +610,3 @@ TEST_F(NVFuserTest, FusionSwizzleExampleCyclicShift_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu_tensor_factories.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -396,4 +395,3 @@ __global__ void CUDAGeneratedKernel(int64_t i0, int64_t i1, int64_t i2, Tensor<i

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
3 changes: 0 additions & 3 deletions third_party/nvfuser/test/test_gpu_tensorcore.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gtest/gtest.h>

#include <arith.h>
Expand Down Expand Up @@ -2859,5 +2858,3 @@ TEST_F(NVFuserTest, FusionTuringMatmulLargeLoad_CUDA) {

} // namespace jit
} // namespace torch

#endif
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu_transpose.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -1065,4 +1064,3 @@ TEST_F(NVFuserTest, FusionTransposeBankConflict8_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu_utils.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -1216,4 +1215,3 @@ TEST_F(NVFuserTest, FusionVectorizeSpanningTree_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)
2 changes: 0 additions & 2 deletions third_party/nvfuser/test/test_gpu_view.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if defined(USE_CUDA)
#include <gmock/gmock-matchers.h>
#include <gtest/gtest.h>

Expand Down Expand Up @@ -2288,4 +2287,3 @@ TEST_F(NVFuserTest, FusionIssue2076_v2_CUDA) {

} // namespace jit
} // namespace torch
#endif // #if defined(USE_CUDA)

0 comments on commit 63044e6

Please sign in to comment.