diff --git a/cub/cub/detail/launcher/cuda_runtime.cuh b/cub/cub/detail/launcher/cuda_runtime.cuh index 650a7dea68f..1e9e5079266 100644 --- a/cub/cub/detail/launcher/cuda_runtime.cuh +++ b/cub/cub/detail/launcher/cuda_runtime.cuh @@ -10,9 +10,11 @@ # pragma system_header #endif // no system header -#include +#if _CCCL_HAS_CUDA_COMPILER -#include +# include + +# include CUB_NAMESPACE_BEGIN @@ -56,3 +58,5 @@ struct TripleChevronFactory } // namespace detail CUB_NAMESPACE_END + +#endif // _CCCL_CUDA_COMPILER diff --git a/cub/cub/util_device.cuh b/cub/cub/util_device.cuh index b9e4f5c25e6..37f7df51889 100644 --- a/cub/cub/util_device.cuh +++ b/cub/cub/util_device.cuh @@ -607,6 +607,7 @@ CUB_RUNTIME_FUNCTION PolicyWrapper MakePolicyWrapper(PolicyT policy) return PolicyWrapper{policy}; } +#if _CCCL_HAS_CUDA_COMPILER namespace detail { struct TripleChevronFactory; @@ -639,6 +640,7 @@ struct KernelConfig return launcher_factory.MaxSmOccupancy(sm_occupancy, kernel_ptr, block_threads); } }; +#endif // _CCCL_HAS_CUDA_COMPILER /// Helper for dispatching into a policy chain template @@ -759,4 +761,6 @@ private: CUB_NAMESPACE_END -#include // to complete the definition of TripleChevronFactory +#if _CCCL_HAS_CUDA_COMPILER +# include // to complete the definition of TripleChevronFactory +#endif // _CCCL_HAS_CUDA_COMPILER