-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy path__config
More file actions
71 lines (58 loc) · 2.25 KB
/
Copy path__config
File metadata and controls
71 lines (58 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
* Copyright (c) 2022-2025, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <nv/target>
#include <cuda/std/__cccl/ptx_isa.h>
#include <cuda/std/version>
#if !defined(__CUDACC_VER_MAJOR__) || !defined(__CUDACC_VER_MINOR__)
#error "NVCC version not found"
#elif __CUDACC_VER_MAJOR__ < 12
#error "NVCC version 12.0 or later is required"
#endif
#if !defined(__CUDACC_EXTENDED_LAMBDA__)
#error "Support for extended device lambdas is required (nvcc flag --expt-extended-lambda)"
#endif
#if !defined(CCCL_VERSION) || (CCCL_VERSION < 3000000)
#error "CCCL version 3.0.0 or later is required"
#endif
// WAR for cuCollections/804: work around the nvcc __cuda_is_local / isspacep.local
// miscompile on CUDA < 13.1. CCCL's auto-define of this macro only fires when
// NDEBUG is not set, but cuco builds Release, so define it unconditionally for
// affected toolkit versions.
#if !defined(_CCCL_ATOMIC_UNSAFE_AUTOMATIC_STORAGE) \
&& ((__CUDACC_VER_MAJOR__ < 13) || (__CUDACC_VER_MAJOR__ == 13 && __CUDACC_VER_MINOR__ < 1))
#define _CCCL_ATOMIC_UNSAFE_AUTOMATIC_STORAGE
#endif
// WAR for libcudacxx/296
#define CUCO_CUDA_MINIMUM_ARCH _NV_FIRST_ARG(__CUDA_ARCH_LIST__)
#if defined(CUDART_VERSION) && (CUCO_CUDA_MINIMUM_ARCH >= 700)
#define CUCO_HAS_CUDA_BARRIER
#endif
#if defined(CUDART_VERSION) && (CUDART_VERSION >= 12010)
#define CUCO_HAS_CG_INVOKE_ONE
#endif
#if (CUCO_CUDA_MINIMUM_ARCH >= 700)
#define CUCO_HAS_INDEPENDENT_THREADS
#endif
#if defined(__SIZEOF_INT128__)
#define CUCO_HAS_INT128
#endif
#if defined(CUCO_HAS_INT128) && (CUCO_CUDA_MINIMUM_ARCH >= 900) && (__cccl_ptx_isa >= 840)
#define CUCO_HAS_128BIT_ATOMICS
#endif
#if defined(CUDART_VERSION) && (CUDART_VERSION >= 12000)
#define CUCO_HAS_CG_REDUCE_UPDATE_ASYNC
#endif