Files
project_6/cccl_upstream/thrust/testing/tbb_nvcc_preinclude.h
EngineX CI 56fd68e7dd [INFRA] Import NVIDIA/CCCL upstream as optimization reference library
CCCL (CUDA C++ Core Libraries) provides:
- CUB: device/block/warp-level GPU primitives (reduce, scan, sort, topk)
- Thrust: high-level parallel algorithms (transform_reduce, sort, scan)
- libcudacxx: CUDA C++ standard library (atomics, barriers, memory)
- cudax: experimental features (memory resources, allocators)
- Tuning policies: per-SM hardware-specific algorithm parameters

Competition optimization vectors mapped to CCCL:
- Output TPS (83% weight): warp_reduce, block_reduce, device_topk
- Input TPS (14% weight): device_scan, block_load, prefetch
- Cache TPS (3% weight): prefix caching strategy patterns
- Memory (0.9 util): pooled/cached/buddy allocators

Source: https://github.com/NVIDIA/cccl (shallow clone, HEAD only)
License: Apache-2.0
2026-07-30 09:35:51 +00:00

26 lines
1.3 KiB
C

// This file is intended to be force included by the compiler (using -include=tbb_preinclude.h). It's purpose is to fix
// unrecognized builtins by cudafe++ that are used in <immintrin.h>. We simply forward declare them in global namespace.
#if defined(_IMMINTRIN_H_INCLUDED)
# error "This file must be included before <immintrin.h>"
#endif // _IMMINTRIN_H_INCLUDED
#if defined(__NVCC__) && defined(__CUDACC__)
// Forward declare builtins used by gcc 12. Clang and nvc++ define __GNUC__, too, so we need to explicitly leave them
// out.
# if defined(__GNUC__) && !defined(__clang__) && !defined(__NVCOMPILER)
# if __CUDACC_VER_MAJOR__ == 12 && __CUDACC_VER_MINOR__ == 0 && __GNUC__ == 12
void __builtin_ia32_ldtilecfg(const void*);
void __builtin_ia32_sttilecfg(void*);
# endif // __CUDACC_VER_MAJOR__ == 12 && __CUDACC_VER_MINOR__ == 0 && __GNUC__ == 12
# endif // __GNUC__ && !__clang__ && !__NVCOMPILER
// cudafe++ has problems with many builtins used in <avx512fp16intrin.h> and <avx512vlfp16intrin.h> when compiling with
// nvc++ as the host compiler. Since those headers are not used by thrust nor tbb, we can prevent their inclusion by
// defining their include guard macros.
# if defined(__NVCOMPILER)
# define __AVX512FP16INTRIN_H
# define __AVX512VLFP16INTRIN_H
# endif // __NVCOMPILER
#endif // __NVCC__ && __CUDACC__