Skip to content

Commit 8dda526

Browse files
authored
Merge pull request #12659 from sneaxiy/refine_softmax_with_cross_entropy
Fix 'softmax_with_cross_entropy_op' dependency error
2 parents af8b1b9 + 2c56062 commit 8dda526

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

paddle/fluid/operators/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,12 @@ else()
235235
endif()
236236

237237
op_library(cross_entropy_op DEPS cross_entropy)
238-
op_library(softmax_with_cross_entropy_op DEPS cross_entropy softmax)
238+
if(WITH_GPU)
239+
op_library(softmax_with_cross_entropy_op DEPS cross_entropy softmax cub)
240+
else()
241+
op_library(softmax_with_cross_entropy_op DEPS cross_entropy softmax)
242+
endif()
243+
239244
op_library(softmax_op DEPS softmax)
240245
op_library(sequence_softmax_op DEPS softmax)
241246
if (WITH_GPU AND TENSORRT_FOUND)

0 commit comments

Comments
 (0)