Skip to content

Commit fc0227f

Browse files
authored
Merge branch 'main' into models/weight_update
2 parents 30ec7ec + 983d27e commit fc0227f

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.circleci/regenerate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ def cmake_workflows(indentation=6):
268268
for device in device_types:
269269
job = {"name": f"cmake_{os_type}_{device}", "python_version": python_version}
270270

271-
job["cu_version"] = "cu102" if device == "gpu" else "cpu"
271+
job["cu_version"] = "cu113" if device == "gpu" else "cpu"
272272
if device == "gpu" and os_type == "linux":
273-
job["wheel_docker_image"] = "pytorch/manylinux-cuda102"
273+
job["wheel_docker_image"] = "pytorch/manylinux-cuda113"
274274
jobs.append({f"cmake_{os_type}_{device}": job})
275275
return indent(indentation, jobs)
276276

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ if(WITH_CUDA)
1010
add_definitions(-D__CUDA_NO_HALF_OPERATORS__)
1111
add_definitions(-DWITH_CUDA)
1212
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --expt-relaxed-constexpr")
13+
# CUDA-11.x can not be compiled using C++14 standard on Windows
14+
string(REGEX MATCH "^[0-9]+" CUDA_MAJOR ${CMAKE_CUDA_COMPILER_VERSION})
15+
if(${CUDA_MAJOR} GREATER 10 AND MSVC)
16+
set(CMAKE_CXX_STANDARD 17)
17+
endif()
1318
endif()
1419

1520
find_package(Python3 COMPONENTS Development)

packaging/pkg_helpers.bash

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ setup_cuda() {
5252
else
5353
export CUDA_HOME=/usr/local/cuda-11.3/
5454
fi
55-
export FORCE_CUDA=1
5655
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5;8.0;8.6"
5756
;;
5857
cu112)
@@ -61,7 +60,6 @@ setup_cuda() {
6160
else
6261
export CUDA_HOME=/usr/local/cuda-11.2/
6362
fi
64-
export FORCE_CUDA=1
6563
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5;8.0;8.6"
6664
;;
6765
cu111)
@@ -70,7 +68,6 @@ setup_cuda() {
7068
else
7169
export CUDA_HOME=/usr/local/cuda-11.1/
7270
fi
73-
export FORCE_CUDA=1
7471
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5;8.0;8.6"
7572
;;
7673
cu110)
@@ -79,7 +76,6 @@ setup_cuda() {
7976
else
8077
export CUDA_HOME=/usr/local/cuda-11.0/
8178
fi
82-
export FORCE_CUDA=1
8379
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5;8.0"
8480
;;
8581
cu102)
@@ -88,7 +84,6 @@ setup_cuda() {
8884
else
8985
export CUDA_HOME=/usr/local/cuda-10.2/
9086
fi
91-
export FORCE_CUDA=1
9287
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5"
9388
;;
9489
cu101)
@@ -97,7 +92,6 @@ setup_cuda() {
9792
else
9893
export CUDA_HOME=/usr/local/cuda-10.1/
9994
fi
100-
export FORCE_CUDA=1
10195
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5"
10296
;;
10397
cu100)
@@ -106,7 +100,6 @@ setup_cuda() {
106100
else
107101
export CUDA_HOME=/usr/local/cuda-10.0/
108102
fi
109-
export FORCE_CUDA=1
110103
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0;7.5"
111104
;;
112105
cu92)
@@ -115,7 +108,6 @@ setup_cuda() {
115108
else
116109
export CUDA_HOME=/usr/local/cuda-9.2/
117110
fi
118-
export FORCE_CUDA=1
119111
export TORCH_CUDA_ARCH_LIST="3.5;5.0+PTX;6.0;7.0"
120112
;;
121113
cpu)
@@ -128,6 +120,11 @@ setup_cuda() {
128120
exit 1
129121
;;
130122
esac
123+
if [[ -n "$CUDA_HOME" ]]; then
124+
# Adds nvcc binary to the search path so that CMake's `find_package(CUDA)` will pick the right one
125+
export PATH="$CUDA_HOME/bin:$PATH"
126+
export FORCE_CUDA=1
127+
fi
131128
}
132129

133130
# Populate build version if necessary, and add version suffix

0 commit comments

Comments
 (0)