Skip to content

Commit

Permalink
fix compile error: only link dyload_cuda when cuda is available (Padd…
Browse files Browse the repository at this point in the history
…lePaddle#50)

* fix compile error: only link dyload_cuda when cuda is available
  • Loading branch information
Feiyu Chan authored Sep 16, 2021
1 parent 0279d4a commit 1e16889
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion paddle/fluid/operators/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ else()
op_library(warpctc_op DEPS dynload_warpctc sequence_padding sequence_scale)
endif()

op_library(spectral_op SRCS spectral_op.cc spectral_op.cu DEPS dynload_cuda ${OP_HEADER_DEPS})
if (WITH_GPU AND (NOT WITH_ROCM))
op_library(spectral_op SRCS spectral_op.cc spectral_op.cu DEPS dynload_cuda ${OP_HEADER_DEPS})
else()
op_library(spectral_op SRCS spectral_op.cc DEPS ${OP_HEADER_DEPS})
endif()

# op_library(spectral_op SRCS spectral_op.cc spectral_op.cu DEPS ${OP_HEADER_DEPS})
# if (WITH_GPU)
# find_library(CUFFT_LIB libcufft.so
Expand Down

0 comments on commit 1e16889

Please sign in to comment.