Skip to content

Commit 0d6e970

Browse files
committed
Fix MSVC CCCL preprocessor issue and add comment about CCCL fix
1 parent c38c25e commit 0d6e970

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎cuda_core/build_hooks.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ def get_sources(mod_name):
245245
extra_link_args = []
246246
extra_cythonize_kwargs = {}
247247
if sys.platform == "win32":
248-
extra_compile_args += ["/std:c++17"]
248+
# CCCL headers #error without the conforming MSVC preprocessor.
249+
extra_compile_args += ["/std:c++17", "/Zc:preprocessor"]
249250
if debug:
250251
raise RuntimeError("Debuggable builds are not supported on Windows.")
251252
else:

‎cuda_core/cuda/core/_tensor_map.pyx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,8 @@ cdef class TensorMapDescriptor:
686686
# TODO(seberg): CCCL has various limitations as of writing, see:
687687
# https://github.com/NVIDIA/cccl/issues/10511.
688688
# Because of this, the path is only taken in _very_ narrow conditions.
689+
# We should probably use it broadly as soon as the fix is available in
690+
# CCCL 3.5.0 (and likely just not bother with these narrow conditions).
689691
make_tma = _get_cccl_make_tma_fn()
690692
if (make_tma != NULL
691693
and device_type == _kDLCUDA

‎cuda_core/cuda/core/_tensor_map_cccl.pyi‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated by stubgen-pyx v0.2.6 from cuda_core/cuda/core/_tensor_map_cccl.pyx
1+
# This file was generated by stubgen-pyx v0.2.19 from cuda_core/cuda/core/_tensor_map_cccl.pyx
22

33
"""Optional CCCL <cuda/tma> helper for TensorMapDescriptor.
44
@@ -9,4 +9,3 @@ shared cudart. It must not be imported at ``cuda.core`` package import time.
99
``get_make_tma_descriptor_tiled`` is exported via ``__pyx_capi__`` for
1010
soft-linking from ``_tensor_map.pyx`` (returns real fn or NULL).
1111
"""
12-
from __future__ import annotations

0 commit comments

Comments
 (0)