Summary:
Hi. It seems that when building CPP-extensions with CUDA for Windows, an `extra_cuda_cflags` options are not properly forwarded to `nvcc`.
Use of extra CUDA options is necessary to build, for instance, a InplaceABN (https://github.com/mapillary/inplace_abn), which requires `--expt-extended-lambda` option.
This PR adds one line that correctly appends `extra_cuda_cflags`.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18638
Differential Revision:
D14704270
Pulled By: ezyang
fbshipit-source-id:
e1e330d193d9afd5707a5437a74c0499460d2b90
cuda_flags = common_cflags + COMMON_NVCC_FLAGS
if IS_WINDOWS:
cuda_flags = _nt_quote_args(cuda_flags)
+ cuda_flags += _nt_quote_args(extra_cuda_cflags)
else:
cuda_flags += ['--compiler-options', "'-fPIC'"]
cuda_flags += extra_cuda_cflags