Skip to content

Commit

Permalink
Use MSVC 14.0 with CUDA 11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Emilio Castillo committed Feb 22, 2021
1 parent 41c69ca commit 6c098ca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cupy_setup_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,11 @@ def _compile_cu(self, sources, output_dir=None, macros=None,
cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)
cuda_version = build.get_cuda_version()
postargs = _nvcc_gencode_options(cuda_version) + ['-O2']
if cuda_version >= 11020:
# MSVC 14.0 (2015) is deprecated for CUDA 11.2 but we need it
# to build CuPy because some Python versions were built using it.
# REF: https://wiki.python.org/moin/WindowsCompilers
postargs += ['-allow-unsupported-compiler']
postargs += ['-Xcompiler', '/MD']
print('NVCC options:', postargs)

Expand Down

0 comments on commit 6c098ca

Please sign in to comment.