Skip to content

Commit e1cc26b

Browse files
committed
Add patch for CUDA 11.3
1 parent f4ae045 commit e1cc26b

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

tensorflow_cc/cmake/TensorflowBase.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ ExternalProject_Add(
1919
COMMAND mkdir -p "${CMAKE_CURRENT_BINARY_DIR}/tensorflow/bazel-bin/bin/tensorflow/include/src"
2020
COMMAND touch "${CMAKE_CURRENT_BINARY_DIR}/tensorflow/bazel-bin/tensorflow/include/src/__placeholder__.h"
2121
COMMAND touch "${CMAKE_CURRENT_BINARY_DIR}/tensorflow/bazel-bin/bin/tensorflow/include/src/__placeholder__.h"
22+
# Fix compilation with CUDA 11.3.
23+
PATCH_COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/patches/v2.5.0-Fix-NCCL-build-failure-with-CUDA-11.3.patch" .
24+
COMMAND patch -p1 < v2.5.0-Fix-NCCL-build-failure-with-CUDA-11.3.patch
2225
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/third_party/nccl/build_defs.bzl.tpl b/third_party/nccl/build_defs.bzl.tpl
2+
index ceb65e3b632f3..c875717403857 100644
3+
--- a/third_party/nccl/build_defs.bzl.tpl
4+
+++ b/third_party/nccl/build_defs.bzl.tpl
5+
@@ -204,7 +204,7 @@ def _prune_relocatable_code_impl(ctx):
6+
arguments = arguments,
7+
mnemonic = "nvprune",
8+
)
9+
- output.append(outputs)
10+
+ outputs.append(output)
11+
12+
return DefaultInfo(files = depset(outputs))
13+

0 commit comments

Comments
 (0)