Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CUDA Error Catalog

cudafe++ reserves internal error indices 3457--3794 (338 slots) for CUDA-specific diagnostics. These are displayed to users as numbers 20000--20337 using the formula display = internal + 16543. Of the 338 slots, approximately 210 carry unique message templates; the remainder are reserved or share templates with parametric fill-ins. Every CUDA error can be controlled by its numeric code or diagnostic tag name via --diag_suppress, --diag_warning, --diag_error, or the #pragma nv_diagnostic system.

This page is a flat lookup table. For the diagnostic pipeline architecture (severity stack, pragma scoping, SARIF output), see Diagnostic Overview. For narrative discussion of each category with implementation details, see CUDA Errors.

Numbering and Display Format

User-visible:  file.cu(42): error #20042-D: calling a __device__ function from ...
                                    ^^^^^
                                    display code = internal + 16543
DirectionFormulaExample
Display to internalinternal = display - 1654320042 maps to internal 3499
Internal to displaydisplay = internal + 165433457 maps to display 20000

The -D suffix appears when severity is 7 or below (note, remark, warning, soft error). Hard errors (severity 8+) omit the suffix.

Severity Codes

CodeLevelSuppressible
2noteyes
4remarkyes
5warningyes
6command-line warningno
7error (soft)yes
8error (hard, from pragma)no
9catastrophic errorno
10command-line errorno
11internal errorno

How to Use This Catalog

Suppress by numeric code:

nvcc --diag_suppress=20042

Suppress by tag name:

nvcc --diag_suppress=unsafe_device_call

In source code:

#pragma nv_diag_suppress unsafe_device_call
#pragma nv_diag_suppress 20042

Category 1: Cross-Space Calling

Checks performed by the call-graph walker comparing the execution-space byte at entity offset +182 of caller vs. callee.

Standard Cross-Space Calls (6 messages)

TagSevMessage
unsafe_device_callWcalling a __device__ function(%sq1) from a __host__ function(%sq2) is not allowed
unsafe_device_callWcalling a __device__ function(%sq1) from a __host__ __device__ function(%sq2) is not allowed
unsafe_device_callWcalling a __host__ function(%sq1) from a __device__ function(%sq2) is not allowed
unsafe_device_callWcalling a __host__ function(%sq1) from a __global__ function(%sq2) is not allowed
unsafe_device_callWcalling a __host__ function(%sq1) from a __host__ __device__ function(%sq2) is not allowed
unsafe_device_callWcalling a __host__ function from a __host__ __device__ function is not allowed

Constexpr Cross-Space Calls (6 messages)

These fire when --expt-relaxed-constexpr is not enabled.

TagSevMessage
unsafe_device_callWcalling a constexpr __device__ function(%sq1) from a __host__ function(%sq2) is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
unsafe_device_callWcalling a constexpr __device__ function(%sq1) from a __host__ __device__ function(%sq2) is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
unsafe_device_callWcalling a constexpr __host__ function(%sq1) from a __device__ function(%sq2) is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
unsafe_device_callWcalling a constexpr __host__ function(%sq1) from a __global__ function(%sq2) is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
unsafe_device_callWcalling a constexpr __host__ function(%sq1) from a __host__ __device__ function(%sq2) is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
unsafe_device_callWcalling a constexpr __host__ function from a __host__ __device__ function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

Category 2: Virtual Override Mismatch

Override checker (sub_432280) extracts the 0x30 mask from the execution-space byte. __global__ is excluded because kernels cannot be virtual.

TagSevMessage
--Eexecution space mismatch: overridden entity (%n1) is a __device__ function, but overriding entity (%n2) is a __host__ function
--Eexecution space mismatch: overridden entity (%n1) is a __device__ function, but overriding entity (%n2) is a __host__ __device__ function
--Eexecution space mismatch: overridden entity (%n1) is a __host__ function, but overriding entity (%n2) is a __device__ function
--Eexecution space mismatch: overridden entity (%n1) is a __host__ function, but overriding entity (%n2) is a __host__ __device__ function
--Eexecution space mismatch: overridden entity (%n1) is a __host__ __device__ function, but overriding entity (%n2) is a __device__ function
--Eexecution space mismatch: overridden entity (%n1) is a __host__ __device__ function, but overriding entity (%n2) is a __host__ function

Category 3: Redeclaration Mismatch

Checked in decl_routine (sub_4CE420) and check_cuda_attribute_consistency (sub_4C6D50).

Incompatible Redeclarations (error-level)

TagSevMessage
device_function_redeclared_with_globalEa __device__ function(%no1) redeclared with __global__
global_function_redeclared_with_deviceEa __global__ function(%no1) redeclared with __device__
global_function_redeclared_with_hostEa __global__ function(%no1) redeclared with __host__
global_function_redeclared_with_host_deviceEa __global__ function(%no1) redeclared with __host__ __device__
global_function_redeclared_without_globalEa __global__ function(%no1) redeclared without __global__
host_function_redeclared_with_globalEa __host__ function(%no1) redeclared with __global__
host_device_function_redeclared_with_globalEa __host__ __device__ function(%no1) redeclared with __global__

Compatible Promotions (warning-level, promoted to HD)

TagSevMessage
device_function_redeclared_with_hostWa __device__ function(%no1) redeclared with __host__, hence treated as a __host__ __device__ function
device_function_redeclared_with_host_deviceWa __device__ function(%no1) redeclared with __host__ __device__, hence treated as a __host__ __device__ function
device_function_redeclared_without_deviceWa __device__ function(%no1) redeclared without __device__, hence treated as a __host__ __device__ function
host_function_redeclared_with_deviceWa __host__ function(%no1) redeclared with __device__, hence treated as a __host__ __device__ function
host_function_redeclared_with_host_deviceWa __host__ function(%no1) redeclared with __host__ __device__, hence treated as a __host__ __device__ function

Category 4: __global__ Function Constraints

Return Type and Signature

TagSevMessage
global_function_return_typeEa __global__ function must have a void return type
global_function_deduced_return_typeEa __global__ function must not have a deduced return type
global_function_has_ellipsisEa __global__ function cannot have ellipsis
global_rvalue_ref_typeEa __global__ function cannot have a parameter with rvalue reference type
global_ref_param_restrictEa __global__ function cannot have a parameter with __restrict__ qualified reference type
global_va_list_typeEA __global__ function or function template cannot have a parameter with va_list type
global_function_with_initializer_listEa __global__ function or function template cannot have a parameter with type std::initializer_list
global_param_align_too_bigEcannot pass a parameter with a too large explicit alignment to a __global__ function on win32 platforms

Declaration Context

TagSevMessage
global_class_declEA __global__ function or function template cannot be a member function
global_friend_definitionEA __global__ function or function template cannot be defined in a friend declaration
global_function_in_unnamed_inline_nsEA __global__ function or function template cannot be declared within an inline unnamed namespace
global_operator_functionEAn operator function cannot be a __global__ function
global_new_or_deleteE(__global__ on operator new/delete)
--Efunction main cannot be marked __device__ or __global__

C++ Feature Restrictions

TagSevMessage
global_function_constexprEA __global__ function or function template cannot be marked constexpr
global_function_constevalEA __global__ function or function template cannot be marked consteval
global_function_inlineE(__global__ with inline)
global_exception_specEAn exception specification is not allowed for a __global__ function or function template

Template Argument Restrictions

TagSevMessage
global_private_type_argEA type that is defined inside a class and has private or protected access (%t) cannot be used in the template argument type of a __global__ function template instantiation, unless the class is local to a __device__ or __global__ function
global_private_template_argEA template that is defined inside a class and has private or protected access cannot be used in the template template argument of a __global__ function template instantiation
global_unnamed_type_argEAn unnamed type (%t) cannot be used in the template argument type of a __global__ function template instantiation, unless the type is local to a __device__ or __global__ function
global_func_local_template_argEA type defined inside a __host__ function (%t) cannot be used in the template argument type of a __global__ function template instantiation
global_lambda_template_argEThe closure type for a lambda (%t%s) cannot be used in the template argument type of a __global__ function template instantiation, unless the lambda is defined within a __device__ or __global__ function, or the flag '-extended-lambda' is specified and the lambda is an extended lambda
local_type_used_in_global_functionWa local type %t (defined in %sq1) used in global function %sq2 template argument, the global function cannot be launched from host code.

Variable Template Restrictions (parallel set)

TagSevMessage
variable_template_private_type_argE(private/protected type in variable template instantiation)
variable_template_private_template_argE(private template template arg in variable template)
variable_template_unnamed_type_template_argEAn unnamed type (%t) cannot be used in the template argument type of a variable template instantiation, unless the type is local to a __device__ or __global__ function
variable_template_func_local_template_argEA type defined inside a __host__ function (%t) cannot be used in the template argument type of a variable template instantiation
variable_template_lambda_template_argEThe closure type for a lambda (%t%s) cannot be used in the template argument type of a variable template instantiation, unless the lambda is defined within a __device__ or __global__ function, or the lambda is an 'extended lambda' and the flag --extended-lambda is specified

Variadic Template Constraints

TagSevMessage
global_function_multiple_packsEMultiple pack parameters are not allowed for a variadic __global__ function template
global_function_pack_not_lastEPack template parameter must be the last template parameter for a variadic __global__ function template

Launch Configuration Attributes

TagSevMessage
bounds_attr_only_on_global_funcE%s is only allowed on a __global__ function
maxnreg_attr_only_on_global_funcE(__maxnreg__ only on __global__)
missing_launch_boundsWno __launch_bounds__ specified for __global__ function
cuda_specifier_twice_in_groupE(duplicate CUDA specifier on same declaration)
bounds_maxnreg_incompatible_qualifiersE(__launch_bounds__ and __maxnreg__ conflict)
--EThe %s qualifiers cannot be applied to the same kernel
--EMultiple %s specifiers are not allowed
--Eincorrect value for launch bounds

Category 5: Extended Lambda Restrictions

Extended lambdas (__device__ or __host__ __device__ lambdas in host code, enabled by --extended-lambda) must have closure types serializable for device transfer.

Capture Restrictions

TagSevMessage
extended_lambda_reference_captureEAn extended %s lambda cannot capture variables by reference
extended_lambda_pack_captureEAn extended %s lambda cannot capture an element of a parameter pack
extended_lambda_too_many_capturesEAn extended %s lambda can only capture up to 1023 variables
extended_lambda_array_capture_rankEAn extended %s lambda cannot capture an array variable (type: %t) with more than 7 dimensions
extended_lambda_array_capture_assignableEAn extended %s lambda cannot capture an array variable whose element type (%t) is not assignable on the host
extended_lambda_array_capture_default_constructibleEAn extended %s lambda cannot capture an array variable whose element type (%t) is not default constructible on the host
extended_lambda_init_capture_arrayEAn extended %s lambda cannot init-capture variables with array type
extended_lambda_init_capture_initlistEAn extended %s lambda cannot have init-captures with type std::initializer_list
extended_lambda_capture_in_constexpr_ifEAn extended %s lambda cannot first-capture variable in constexpr-if context
this_addr_capture_ext_lambdaWImplicit capture of 'this' in extended lambda expression
extended_lambda_hd_init_captureEinit-captures are not allowed for extended __host__ __device__ lambdas
--EUnless enabled by language dialect, *this capture is only supported when the lambda is either __device__ only, or is defined within a __device__ or __global__ function

Type Restrictions on Captures and Parameters

TagSevMessage
extended_lambda_capture_local_typeEA type local to a function (%t) cannot be used in the type of a variable captured by an extended __device__ or __host__ __device__ lambda
extended_lambda_capture_private_typeEA type that is a private or protected class member (%t) cannot be used in the type of a variable captured by an extended __device__ or __host__ __device__ lambda
extended_lambda_call_operator_local_typeEA type local to a function (%t) cannot be used in the return or parameter types of the operator() of an extended __device__ or __host__ __device__ lambda
extended_lambda_call_operator_private_typeEA type that is a private or protected class member (%t) cannot be used in the return or parameter types of the operator() of an extended __device__ or __host__ __device__ lambda
extended_lambda_parent_local_typeEA type local to a function (%t) cannot be used in the template argument of the enclosing parent function (and any parent classes) of an extended __device__ or __host__ __device__ lambda
extended_lambda_parent_private_typeEA type that is a private or protected class member (%t) cannot be used in the template argument of the enclosing parent function (and any parent classes) of an extended __device__ or __host__ __device__ lambda
extended_lambda_parent_private_template_argEA template that is a private or protected class member cannot be used in the template argument of the enclosing parent function (and any parent classes) of an extended %s lambda

Enclosing Parent Function Restrictions

TagSevMessage
extended_lambda_enclosing_function_localEThe enclosing parent function (%sq2) for an extended %s1 lambda must not be defined inside another function
extended_lambda_enclosing_function_not_foundE(no enclosing function found for extended lambda)
extended_lambda_inaccessible_parentEThe enclosing parent function (%sq2) for an extended %s1 lambda cannot have private or protected access within its class
extended_lambda_enclosing_function_deducibleEThe enclosing parent function (%sq2) for an extended %s1 lambda must not have deduced return type
extended_lambda_cant_take_function_addressEThe enclosing parent function (%sq2) for an extended %s1 lambda must allow its address to be taken
extended_lambda_parent_non_externEOn Windows, the enclosing parent function (%sq2) for an extended %s1 lambda cannot have internal or no linkage
extended_lambda_parent_class_unnamedEThe enclosing parent function (%sq2) for an extended %s1 lambda cannot be a member function of a class that is unnamed
extended_lambda_parent_template_param_unnamedEThe enclosing parent function (%sq2) for an extended %s1 lambda cannot be in a template which has a unnamed parameter: %nd
extended_lambda_nest_parent_template_param_unnamedEThe enclosing parent %n for an extended %s lambda cannot be a template which has a unnamed parameter
extended_lambda_multiple_parameter_packsEThe enclosing parent template function (%sq2) for an extended %s1 lambda cannot have more than one variadic parameter, or it is not listed last in the template parameter list.
extended_lambda_no_parent_funcE(extended lambda has no parent function)
extended_lambda_illegal_parentE(extended lambda in illegal parent context)

Nesting and Context Restrictions

TagSevMessage
extended_lambda_enclosing_function_generic_lambdaEAn extended %s1 lambda cannot be defined inside a generic lambda expression(%sq2).
extended_lambda_enclosing_function_hd_lambdaEAn extended %s1 lambda cannot be defined inside an extended __host__ __device__ lambda expression(%sq2).
extended_lambda_inaccessible_ancestorEAn extended %s1 lambda cannot be defined inside a class (%sq2) with private or protected access within another class
extended_lambda_inside_constexpr_ifEFor this host platform/dialect, an extended lambda cannot be defined inside the 'if' or 'else' block of a constexpr if statement
extended_lambda_multiple_parentECannot specify multiple __nv_parent directives in a lambda declaration
extended_host_device_generic_lambdaE__host__ __device__ extended lambdas cannot be generic lambdas
--EIf an extended %s lambda is defined within the body of one or more nested lambda expressions, each of these enclosing lambda expressions must be defined within the immediate or nested block scope of a function.

Specifier and Annotation

TagSevMessage
extended_lambda_disallowedE__host__ or __device__ annotation on lambda requires --extended-lambda nvcc flag
extended_lambda_constexprEThe %s1 specifier is not allowed for an extended %s2 lambda
lambda_operator_annotatedEThe operator() function for a lambda cannot be explicitly annotated with execution space annotations (__host__/__device__/__global__), the annotations are derived from its closure class
extended_lambda_discriminatorE(extended lambda discriminator collision)

Category 6: Device Code Restrictions

General restrictions that apply to all GPU-side code (__device__ and __global__ function bodies).

TagSevMessage
cuda_device_code_unsupported_operatorEThe operator '%s' is not allowed in device code
unsupported_type_in_device_codeE%t %s1 a %s2, which is not supported in device code
--Edevice code does not support exception handling
no_coroutine_on_deviceEdevice code does not support coroutines
--Eoperations on vector types are not supported in device code
undefined_device_entityEcannot use an entity undefined in device code
undefined_device_identifierEidentifier %sq is undefined in device code
thread_local_in_device_codeEcannot use thread_local specifier for variable declarations in device code
unrecognized_pragma_device_codeWunrecognized #pragma in device code
--Ezero-sized parameter type %t is not allowed in device code
--Ezero-sized variable %sq is not allowed in device code
--Edynamic initialization is not supported for a function-scope static %s variable within a __device__/__global__ function
--Efunction-scope static variable within a __device__/__global__ function requires a memory space specifier
use_of_virtual_base_on_compute_1xEUse of a virtual base (%t) requires the compute_20 or higher architecture
--Ealloca() is not supported for architectures lower than compute_52

Category 7: Kernel Launch

TagSevMessage
device_launch_no_sepcompEkernel launch from __device__ or __global__ functions requires separate compilation mode
missing_api_for_device_side_launchEdevice-side kernel launch could not be processed as the required runtime APIs are not declared
--Wexplicit stream argument not provided in kernel launch
--Ekernel launches from templates are not allowed in system files
device_side_launch_arg_with_user_provided_cctorEcannot pass an argument with a user-provided copy-constructor to a device-side kernel launch
device_side_launch_arg_with_user_provided_dtorEcannot pass an argument with a user-provided destructor to a device-side kernel launch

Category 8: Memory Space and Variable Restrictions

Variable Access Across Spaces

TagSevMessage
device_var_read_in_hostEa %s1 %n1 cannot be directly read in a host function
device_var_written_in_hostEa %s1 %n1 cannot be directly written in a host function
device_var_address_taken_in_hostEaddress of a %s1 %n1 cannot be directly taken in a host function
host_var_read_in_deviceEa host %n1 cannot be directly read in a device function
host_var_written_in_deviceEa host %n1 cannot be directly written in a device function
host_var_address_taken_in_deviceEaddress of a host %n1 cannot be directly taken in a device function

Variable Declaration Restrictions

TagSevMessage
illegal_local_to_device_functionE%s1 %sq2 variable declaration is not allowed inside a device function body
illegal_local_to_host_functionE%s1 %sq2 variable declaration is not allowed inside a host function body
shared_specifier_in_range_forEthe __shared__ memory space specifier is not allowed for a variable declared by the for-range-declaration
bad_shared_storage_classE__shared__ variables cannot have external linkage
device_variable_in_unnamed_inline_nsEA %s variable cannot be declared within an inline unnamed namespace
--Emember variables of an anonymous union at global or namespace scope cannot be directly accessed in __device__ and __global__ functions
shared_inside_structEshared type inside a struct or union is not allowed
shared_parameterE(__shared__ as function parameter)

Auto-Deduced Device References

TagSevMessage
auto_device_fn_refEA non-constexpr __device__ function (%sq1) with "auto" deduced return type cannot be directly referenced %s2, except if the reference is absent when __CUDA_ARCH__ is undefined
device_var_constexprE(constexpr rules for __device__ variables)
device_var_structured_bindingE(structured bindings on __device__ variables)

Category 9: __grid_constant__

The __grid_constant__ annotation (compute_70+) marks a kernel parameter as read-only grid-wide.

TagSevMessage
grid_constant_non_kernelE__grid_constant__ annotation is only allowed on a parameter of a __global__ function
grid_constant_not_constEa parameter annotated with __grid_constant__ must have const-qualified type
grid_constant_reference_typeEa parameter annotated with __grid_constant__ must not have reference type
grid_constant_unsupported_archE__grid_constant__ annotation is only allowed for architecture compute_70 or later
grid_constant_incompat_redeclEincompatible __grid_constant__ annotation for parameter %s in function redeclaration (see previous declaration %p)
grid_constant_incompat_templ_redeclEincompatible __grid_constant__ annotation for parameter %s in function template redeclaration (see previous declaration %p)
grid_constant_incompat_specializationEincompatible __grid_constant__ annotation for parameter %s in function specialization (see previous declaration %p)
grid_constant_incompat_instantiation_directiveEincompatible __grid_constant__ annotation for parameter %s in instantiation directive (see previous declaration %p)

Category 10: JIT Mode

JIT mode (-dc for device-only compilation) restricts host constructs.

TagSevMessage
no_host_in_jitEA function explicitly marked as a __host__ function is not allowed in JIT mode
unannotated_function_in_jitEA function without execution space annotations (__host__/__device__/__global__) is considered a host function, and host functions are not allowed in JIT mode. Consider using -default-device flag to process unannotated functions as __device__ functions in JIT mode
unannotated_variable_in_jitEA namespace scope variable without memory space annotations (__device__/__constant__/__shared__/__managed__) is considered a host variable, and host variables are not allowed in JIT mode. Consider using -default-device flag to process unannotated namespace scope variables as __device__ variables in JIT mode
unannotated_static_data_member_in_jitEA class static data member with non-const type is considered a host variable, and host variables are not allowed in JIT mode. Consider using -default-device flag to process such data members as __device__ variables in JIT mode
host_closure_class_in_jitEThe execution space for the lambda closure class members was inferred to be __host__ (based on context). This is not allowed in JIT mode. Consider using -default-device to infer __device__ execution space for namespace scope lambda closure classes.

Category 11: RDC / Whole-Program Mode

TagSevMessage
--EAn inline __device__/__constant__/__managed__ variable must have internal linkage when the program is compiled in whole program mode (-rdc=false)
template_global_no_defEwhen "-static-global-template-stub=true" in whole program compilation mode ("-rdc=false"), a __global__ function template instantiation or specialization (%sq) must have a definition in the current translation unit
extern_kernel_templateEwhen "-static-global-template-stub=true", extern __global__ function template is not supported in whole program compilation mode ("-rdc=false")
--Waddress of internal linkage device function (%sq) was taken (nv bug 2001144). mitigation: no mitigation required if the address is not used for comparison, or if the target function is not a CUDA C++ builtin

Category 12: Atomics

CUDA atomics lowered to PTX instructions with size, type, scope, and memory-order constraints.

Architecture and Type Constraints

TagSevMessage
nv_atomic_functions_not_supported_below_sm60E__nv_atomic_* functions are not supported on arch < sm_60.
nv_atomic_operation_not_in_device_functionEatomic operations are not in a device function.
nv_atomic_function_no_argsEatomic function requires at least one argument.
nv_atomic_function_address_takenEnv atomic function must be called directly.
invalid_nv_atomic_operation_sizeEatomic operations and, or, xor, add, sub, min and max are valid only on objects of size 4, or 8.
invalid_nv_atomic_cas_sizeEatomic CAS is valid only on objects of size 2, 4, 8 or 16 bytes.
invalid_nv_atomic_exch_sizeEatomic exchange is valid only on objects of size 4, 8 or 16 bytes.
invalid_data_size_for_nv_atomic_generic_functionEgeneric nv atomic functions are valid only on objects of size 1, 2, 4, 8 and 16 bytes.
non_integral_type_for_non_generic_nv_atomic_functionEnon-generic nv atomic load, store, cas and exchange are valid only on integral types.
invalid_nv_atomic_operation_add_sub_sizeEatomic operations add and sub are not valid on signed integer of size 8.
nv_atomic_add_sub_f64_not_supportedWatomic add and sub for 64-bit float is supported on architecture sm_60 or above.
invalid_nv_atomic_operation_max_min_floatEatomic operations min and max are not supported on any floating-point types.
floating_type_for_logical_atomic_operationEFor a logical atomic operation, the first argument cannot be any floating-point types.
nv_atomic_cas_b16_not_supportedE16-bit atomic compare-and-exchange is supported on architecture sm_70 or above.
nv_atomic_exch_cas_b128_not_supportedE128-bit atomic exchange or compare-and-exchange is supported on architecture sm_90 or above.
nv_atomic_load_store_b128_version_too_lowE128-bit atomic load and store are supported on architecture sm_70 or above.

Memory Order and Scope

TagSevMessage
nv_atomic_load_order_errorEatomic load's memory order cannot be release or acq_rel.
nv_atomic_store_order_errorEatomic store's memory order cannot be consume, acquire or acq_rel.
nv_atomic_operation_order_not_constant_intEatomic operation's memory order argument is not an integer literal.
nv_atomic_operation_scope_not_constant_intEatomic operation's scope argument is not an integer literal.
invalid_nv_atomic_memory_order_valueE(invalid memory order enum value)
invalid_nv_atomic_thread_scope_valueE(invalid thread scope enum value)

Scope Fallback Warnings

TagSevMessage
nv_atomic_operations_scope_fallback_to_membarWatomic operations' scope argument is supported on architecture sm_60 or above. Fall back to use membar.
nv_atomic_operations_memory_order_fallback_to_membarWatomic operations' argument of memory order is supported on architecture sm_70 or above. Fall back to use membar.
nv_atomic_operations_scope_cluster_change_to_deviceWatomic operations' scope of cluster is supported on architecture sm_90 or above. Using device scope instead.
nv_atomic_load_store_scope_cluster_change_to_deviceWatomic load and store's scope of cluster is supported on architecture sm_90 or above. Using device scope instead.

Category 13: ASM in Device Code

NVPTX backend supports fewer inline-assembly constraint letters than x86.

TagSevMessage
asm_constraint_letter_not_allowed_in_deviceEasm constraint letter '%s' is not allowed inside a __device__/__global__ function
asm_constraint_must_have_single_letterEan asm operand may specify only one constraint letter in a __device__/__global__ function
--EThe 'C' constraint can only be used for asm statements in device code
cc_clobber_in_deviceEThe cc clobber constraint is not supported in device code
cuda_xasm_strict_placeholder_formatE(strict placeholder format in CUDA asm)
addr_of_label_in_device_funcEaddress of label extension is not supported in __device__/__global__ functions

Category 14: #pragma nv_abi

Controls calling convention for device functions, adjusting parameter passing to match PTX ABI.

TagSevMessage
nv_abi_pragma_bad_formatE(malformed #pragma nv_abi)
nv_abi_pragma_invalid_optionE#pragma nv_abi contains an invalid option
nv_abi_pragma_missing_argE#pragma nv_abi requires an argument
nv_abi_pragma_duplicate_argE#pragma nv_abi contains a duplicate argument
nv_abi_pragma_not_constantE#pragma nv_abi argument must evaluate to an integral constant expression
nv_abi_pragma_not_positive_valueE#pragma nv_abi argument value must be a positive value
nv_abi_pragma_overflow_valueE#pragma nv_abi argument value exceeds the range of an integer
nv_abi_pragma_device_functionE#pragma nv_abi must be applied to device functions
nv_abi_pragma_device_function_contextE#pragma nv_abi is not supported inside a host function
nv_abi_pragma_next_constructE#pragma nv_abi must appear immediately before a function declaration, function definition, or an expression statement

Category 15: __nv_register_params__

Forces all parameters to be passed in registers (compute_80+).

TagSevMessage
register_params_not_enabledE__nv_register_params__ support is not enabled
register_params_unsupported_archE__nv_register_params__ is only supported for compute_80 or later architecture
register_params_unsupported_functionE__nv_register_params__ is not allowed on a %s function
register_params_ellipsis_functionE__nv_register_params__ is not allowed on a function with ellipsis

Category 16: Name Expression (NVRTC)

__CUDACC_RTC__name_expr forms the mangled name of a __global__ function or __device__/__constant__ variable at compile time.

TagSevMessage
name_expr_parsingEError in parsing name expression for lowered name lookup. Input name expression was: %sq
name_expr_non_global_routineEName expression cannot form address of a non-__global__ function. Input name expression was: %sq
name_expr_non_device_variableEName expression cannot form address of a variable that is not a __device__/__constant__ variable. Input name expression was: %sq
name_expr_not_routine_or_variableEName expression must form address of a __global__ function or the address of a __device__/__constant__ variable. Input name expression was: %sq
name_expr_extra_tokensEExtra tokens found after parsing name expression for lowered name lookup. Input name expression was: %sq
name_expr_internal_errorEInternal error in parsing name expression for lowered name lookup. Input name expression was: %sq

Category 17: Texture and Surface Variables

TagSevMessage
texture_surface_variable_in_unnamed_inline_nsEA texture or surface variable cannot be declared within an inline unnamed namespace
--EA texture or surface variable cannot be used in the non-type template argument of a __device__, __host__ __device__ or __global__ function template instantiation
reference_to_text_surf_type_in_device_funcEa reference to texture/surface type cannot be used in __device__/__global__ functions
reference_to_text_surf_var_in_device_funcEtaking reference of texture/surface variable not allowed in __device__/__global__ functions
addr_of_text_surf_var_in_device_funcEcannot take address of texture/surface variable %sq in __device__/__global__ functions
addr_of_text_surf_expr_in_device_funcEcannot take address of texture/surface expression in __device__/__global__ functions
indir_into_text_surf_var_in_device_funcEindirection not allowed for accessing texture/surface through variable %sq in __device__/__global__ functions
indir_into_text_surf_expr_in_device_funcEindirection not allowed for accessing texture/surface through expression in __device__/__global__ functions

Category 18: __managed__ Variables

TagSevMessage
managed_const_type_not_allowedEa __managed__ variable cannot have a const qualified type
managed_reference_type_not_allowedEa __managed__ variable cannot have a reference type
managed_cant_be_shared_constantE__managed__ variables cannot be marked __shared__ or __constant__
unsupported_arch_for_managed_capabilityE__managed__ variables require architecture compute_30 or higher
unsupported_configuration_for_managed_capabilityE__managed__ variables are not yet supported for this configuration (compilation mode (32/64 bit) and/or target operating system)
decltype_of_managed_variableEA __managed__ variable cannot be used as an unparenthesized id-expression argument for decltype()

Category 19: Device Function Signature Constraints

TagSevMessage
device_function_has_ellipsisE__device__ or __host__ __device__ function with ellipsis requires compute_30 or higher architecture
device_func_tex_argE(device function with texture argument restriction)
no_host_device_initializer_listE(std::initializer_list in __host__ __device__ context)
no_host_device_move_forwardE(std::move/forward in __host__ __device__ context)
no_strict_cuda_errorW(relaxed error checking mode)

Category 20: __wgmma_mma_async Builtins

Warp Group Matrix Multiply-Accumulate builtins (sm_90a+).

TagSevMessage
wgmma_mma_async_not_enabledE__wgmma_mma_async builtins are only available for sm_90a
wgmma_mma_async_nonconstant_argENon-constant argument to __wgmma_mma_async call
wgmma_mma_async_missing_argsEThe 'A' or 'B' argument to __wgmma_mma_async call is missing
wgmma_mma_async_bad_shapeEThe shape %s is not supported for __wgmma_mma_async builtin
wgmma_mma_async_bad_A_typeE(invalid type for operand A)
wgmma_mma_async_bad_B_typeE(invalid type for operand B)

Category 21: __block_size__ / __cluster_dims__

Architecture-dependent launch configuration attributes.

TagSevMessage
block_size_unsupportedE__block_size__ is not supported for this GPU architecture
block_size_must_be_positiveE(block size values must be positive)
cluster_dims_unsupportedE__cluster_dims__ is not supported for this GPU architecture
cluster_dims_must_be_positiveE(__cluster_dims__ values must be positive)
cluster_dims_too_largeEcluster dimension value is too large
conflict_between_cluster_dim_and_block_sizeEcannot specify the second tuple in __block_size__ while __cluster_dims__ is present
max_blocks_per_cluster_unsupportedEcannot specify max blocks per cluster for this GPU architecture
max_blocks_per_cluster_negativeEmax blocks per cluster must not be negative
max_blocks_per_cluster_too_largeEmax blocks per cluster is too large
too_many_blocks_in_clusterEtotal number of blocks in cluster computed from %s exceeds __launch_bounds__ specified limit for max blocks in cluster
shared_block_size_must_be_positiveEthe block size of a shared array must be greater than zero
shared_block_size_too_largeE(shared block size exceeds maximum)
mismatched_shared_block_sizeEshared block size does not match one previously specified
ambiguous_block_size_specE(ambiguous block size specification)
multiple_block_sizesEmultiple block sizes not allowed
threads_dimension_requires_definite_block_sizeEa dynamic THREADS dimension requires a definite block size
shared_nonthreads_dimE(shared array dimension is not THREADS-based)
shared_affinity_typeE(shared affinity type mismatch)

Category 22: Inline Hint Conflicts

TagSevMessage
inline_hint_forceinline_conflictE"__inline_hint__" and "__forceinline__" may not be used on the same declaration
inline_hint_noinline_conflictE"__inline_hint__" and "__noinline__" may not be used on the same declaration

Category 23: __local_maxnreg__

TagSevMessage
local_maxnregE(__local_maxnreg__ attribute applied)
local_maxnreg_attr_only_nonmember_funcE(__local_maxnreg__ only on non-member functions)
local_maxnreg_attribute_conflictE(__local_maxnreg__ conflicts with existing attribute)
local_maxnreg_negativeE(__local_maxnreg__ value is negative)
local_maxnreg_too_largeE(__local_maxnreg__ value exceeds maximum)
maxnreg_attr_only_nonmember_funcE(__maxnreg__ only on non-member functions)
bounds_attr_only_nonmember_funcE(launch bounds only on non-member functions)

Category 24: Miscellaneous CUDA Errors

TagSevMessage
cuda_displaced_new_or_delete_operatorE(displaced new/delete in CUDA context)
cuda_demote_unsupported_floating_pointW(unsupported floating-point type demoted)
illegal_ucn_in_device_identiferEUniversal character is not allowed in device entity name (%sq)
thread_local_for_device_varsEcannot use thread_local specifier for a %s variable
global_qualifier_not_allowedE(execution space qualifier not allowed here)
unsupported_nv_attributeW(unrecognized NVIDIA attribute)
addr_of_nv_builtin_varE(address-of applied to NVIDIA builtin variable)
shared_address_immutableE(__shared__ variable address is immutable)
nonshared_blocksizeofE(BLOCKSIZEOF applied to non-__shared__ variable)
nonshared_strict_relaxedE(strict/relaxed qualifier on non-__shared__ variable)
extern_sharedW(extern __shared__ variable)
invalid_nvvm_builtin_intrinsicE(invalid NVVM builtin intrinsic)
unannotated_static_not_allowed_in_deviceE(unannotated static not allowed in device code)
missing_pushcallconfigE(cudaConfigureCall not found for kernel launch lowering)

Complete Diagnostic Tag Index

All 286 CUDA-specific diagnostic tag names extracted from the cudafe++ binary, organized alphabetically within functional groups. Every tag can be used with --diag_suppress, --diag_warning, --diag_error, or #pragma nv_diag_suppress / nv_diag_warning / nv_diag_error.

Cross-Space / Execution Space (1 tag)

#Tag Name
1unsafe_device_call

Redeclaration (12 tags)

#Tag Name
2device_function_redeclared_with_global
3device_function_redeclared_with_host
4device_function_redeclared_with_host_device
5device_function_redeclared_without_device
6global_function_redeclared_with_device
7global_function_redeclared_with_host
8global_function_redeclared_with_host_device
9global_function_redeclared_without_global
10host_device_function_redeclared_with_global
11host_function_redeclared_with_device
12host_function_redeclared_with_global
13host_function_redeclared_with_host_device

__global__ Constraints (30 tags)

#Tag Name
14bounds_attr_only_on_global_func
15bounds_maxnreg_incompatible_qualifiers
16cuda_specifier_twice_in_group
17global_class_decl
18global_exception_spec
19global_friend_definition
20global_func_local_template_arg
21global_function_consteval
22global_function_constexpr
23global_function_deduced_return_type
24global_function_has_ellipsis
25global_function_in_unnamed_inline_ns
26global_function_inline
27global_function_multiple_packs
28global_function_pack_not_last
29global_function_return_type
30global_function_with_initializer_list
31global_lambda_template_arg
32global_new_or_delete
33global_operator_function
34global_param_align_too_big
35global_private_template_arg
36global_private_type_arg
37global_qualifier_not_allowed
38global_ref_param_restrict
39global_rvalue_ref_type
40global_unnamed_type_arg
41global_va_list_type
42local_type_used_in_global_function
43maxnreg_attr_only_on_global_func
44missing_launch_bounds
45template_global_no_def

Extended Lambda (38 tags)

#Tag Name
46extended_host_device_generic_lambda
47extended_lambda_array_capture_assignable
48extended_lambda_array_capture_default_constructible
49extended_lambda_array_capture_rank
50extended_lambda_call_operator_local_type
51extended_lambda_call_operator_private_type
52extended_lambda_cant_take_function_address
53extended_lambda_capture_in_constexpr_if
54extended_lambda_capture_local_type
55extended_lambda_capture_private_type
56extended_lambda_constexpr
57extended_lambda_disallowed
58extended_lambda_discriminator
59extended_lambda_enclosing_function_deducible
60extended_lambda_enclosing_function_generic_lambda
61extended_lambda_enclosing_function_hd_lambda
62extended_lambda_enclosing_function_local
63extended_lambda_enclosing_function_not_found
64extended_lambda_hd_init_capture
65extended_lambda_illegal_parent
66extended_lambda_inaccessible_ancestor
67extended_lambda_inaccessible_parent
68extended_lambda_init_capture_array
69extended_lambda_init_capture_initlist
70extended_lambda_inside_constexpr_if
71extended_lambda_multiple_parameter_packs
72extended_lambda_multiple_parent
73extended_lambda_nest_parent_template_param_unnamed
74extended_lambda_no_parent_func
75extended_lambda_pack_capture
76extended_lambda_parent_class_unnamed
77extended_lambda_parent_local_type
78extended_lambda_parent_non_extern
79extended_lambda_parent_private_template_arg
80extended_lambda_parent_private_type
81extended_lambda_parent_template_param_unnamed
82extended_lambda_reference_capture
83extended_lambda_too_many_captures
84this_addr_capture_ext_lambda

Device Code (13 tags)

#Tag Name
85addr_of_label_in_device_func
86asm_constraint_letter_not_allowed_in_device
87asm_constraint_must_have_single_letter
88auto_device_fn_ref
89cc_clobber_in_device
90cuda_device_code_unsupported_operator
91cuda_xasm_strict_placeholder_format
92illegal_ucn_in_device_identifer
93no_coroutine_on_device
94no_strict_cuda_error
95thread_local_in_device_code
96undefined_device_entity
97undefined_device_identifier
98unrecognized_pragma_device_code
99unsupported_type_in_device_code
100use_of_virtual_base_on_compute_1x

Device Function (4 tags)

#Tag Name
101device_func_tex_arg
102device_function_has_ellipsis
103no_host_device_initializer_list
104no_host_device_move_forward

Kernel Launch (4 tags)

#Tag Name
105device_launch_no_sepcomp
106device_side_launch_arg_with_user_provided_cctor
107device_side_launch_arg_with_user_provided_dtor
108missing_api_for_device_side_launch

Variable Access (11 tags)

#Tag Name
109device_var_address_taken_in_host
110device_var_constexpr
111device_var_read_in_host
112device_var_structured_binding
113device_var_written_in_host
114device_variable_in_unnamed_inline_ns
115host_var_address_taken_in_device
116host_var_read_in_device
117host_var_written_in_device
118illegal_local_to_device_function
119illegal_local_to_host_function

Variable Template (5 tags)

#Tag Name
120variable_template_func_local_template_arg
121variable_template_lambda_template_arg
122variable_template_private_template_arg
123variable_template_private_type_arg
124variable_template_unnamed_type_template_arg

__managed__ (6 tags)

#Tag Name
125decltype_of_managed_variable
126managed_cant_be_shared_constant
127managed_const_type_not_allowed
128managed_reference_type_not_allowed
129unsupported_arch_for_managed_capability
130unsupported_configuration_for_managed_capability

__grid_constant__ (8 tags)

#Tag Name
131grid_constant_incompat_instantiation_directive
132grid_constant_incompat_redecl
133grid_constant_incompat_specialization
134grid_constant_incompat_templ_redecl
135grid_constant_non_kernel
136grid_constant_not_const
137grid_constant_reference_type
138grid_constant_unsupported_arch

Atomics (26 tags)

#Tag Name
139floating_type_for_logical_atomic_operation
140invalid_data_size_for_nv_atomic_generic_function
141invalid_nv_atomic_cas_size
142invalid_nv_atomic_exch_size
143invalid_nv_atomic_memory_order_value
144invalid_nv_atomic_operation_add_sub_size
145invalid_nv_atomic_operation_max_min_float
146invalid_nv_atomic_operation_size
147invalid_nv_atomic_thread_scope_value
148non_integral_type_for_non_generic_nv_atomic_function
149nv_atomic_add_sub_f64_not_supported
150nv_atomic_cas_b16_not_supported
151nv_atomic_exch_cas_b128_not_supported
152nv_atomic_function_address_taken
153nv_atomic_function_no_args
154nv_atomic_functions_not_supported_below_sm60
155nv_atomic_load_order_error
156nv_atomic_load_store_b128_version_too_low
157nv_atomic_load_store_scope_cluster_change_to_device
158nv_atomic_operation_not_in_device_function
159nv_atomic_operation_order_not_constant_int
160nv_atomic_operation_scope_not_constant_int
161nv_atomic_operations_memory_order_fallback_to_membar
162nv_atomic_operations_scope_cluster_change_to_device
163nv_atomic_operations_scope_fallback_to_membar
164nv_atomic_store_order_error

JIT Mode (5 tags)

#Tag Name
165host_closure_class_in_jit
166no_host_in_jit
167unannotated_function_in_jit
168unannotated_static_data_member_in_jit
169unannotated_variable_in_jit

RDC / Whole-Program (2 tags)

#Tag Name
170extern_kernel_template
171template_global_no_def

#pragma nv_abi (10 tags)

#Tag Name
172nv_abi_pragma_bad_format
173nv_abi_pragma_device_function
174nv_abi_pragma_device_function_context
175nv_abi_pragma_duplicate_arg
176nv_abi_pragma_invalid_option
177nv_abi_pragma_missing_arg
178nv_abi_pragma_next_construct
179nv_abi_pragma_not_constant
180nv_abi_pragma_not_positive_value
181nv_abi_pragma_overflow_value

__nv_register_params__ (4 tags)

#Tag Name
182register_params_ellipsis_function
183register_params_not_enabled
184register_params_unsupported_arch
185register_params_unsupported_function

Name Expression (6 tags)

#Tag Name
186name_expr_extra_tokens
187name_expr_internal_error
188name_expr_non_device_variable
189name_expr_non_global_routine
190name_expr_not_routine_or_variable
191name_expr_parsing

Texture / Surface (7 tags)

#Tag Name
192addr_of_text_surf_expr_in_device_func
193addr_of_text_surf_var_in_device_func
194indir_into_text_surf_expr_in_device_func
195indir_into_text_surf_var_in_device_func
196reference_to_text_surf_type_in_device_func
197reference_to_text_surf_var_in_device_func
198texture_surface_variable_in_unnamed_inline_ns

__wgmma_mma_async (6 tags)

#Tag Name
199wgmma_mma_async_bad_A_type
200wgmma_mma_async_bad_B_type
201wgmma_mma_async_bad_shape
202wgmma_mma_async_missing_args
203wgmma_mma_async_nonconstant_arg
204wgmma_mma_async_not_enabled

__block_size__ / __cluster_dims__ (18 tags)

#Tag Name
205ambiguous_block_size_spec
206block_size_must_be_positive
207block_size_unsupported
208cluster_dims_must_be_positive
209cluster_dims_too_large
210cluster_dims_unsupported
211conflict_between_cluster_dim_and_block_size
212max_blocks_per_cluster_negative
213max_blocks_per_cluster_too_large
214max_blocks_per_cluster_unsupported
215mismatched_shared_block_size
216multiple_block_sizes
217shared_affinity_type
218shared_block_size_must_be_positive
219shared_block_size_too_large
220shared_nonthreads_dim
221threads_dimension_requires_definite_block_size
222too_many_blocks_in_cluster

Inline Hint (2 tags)

#Tag Name
223inline_hint_forceinline_conflict
224inline_hint_noinline_conflict

__local_maxnreg__ (7 tags)

#Tag Name
225bounds_attr_only_nonmember_func
226local_maxnreg
227local_maxnreg_attr_only_nonmember_func
228local_maxnreg_attribute_conflict
229local_maxnreg_negative
230local_maxnreg_too_large
231maxnreg_attr_only_nonmember_func

Lambda Annotation (1 tag)

#Tag Name
232lambda_operator_annotated

Miscellaneous (16 tags)

#Tag Name
233addr_of_nv_builtin_var
234bad_shared_storage_class
235cuda_demote_unsupported_floating_point
236cuda_displaced_new_or_delete_operator
237extern_shared
238invalid_nvvm_builtin_intrinsic
239missing_pushcallconfig
240nonshared_blocksizeof
241nonshared_strict_relaxed
242shared_address_immutable
243shared_inside_struct
244shared_parameter
245shared_specifier_in_range_for
246thread_local_for_device_vars
247unannotated_static_not_allowed_in_device
248unsupported_nv_attribute

Diagnostic Pragma Actions (6 tags -- not suppressible, but listed for completeness)

#Tag Name
249nv_diag_default
250nv_diag_error
251nv_diag_once
252nv_diag_remark
253nv_diag_suppress
254nv_diag_warning

Cross-Reference: EDG Error Codes Used for CUDA

The following standard EDG error codes (0--3456) are repurposed or frequently triggered by CUDA-specific validation. These display with their original number (not the 20000-D series).

Internal #Display #Context
2121CUDA auto type with template deduction
147147redeclaration mismatch
149149illegal CUDA storage class at namespace scope
246246static member of non-class type
298298typedef/using with template name
325325thread_local in CUDA
337337calling convention mismatch
453453in template instantiation context
551551not a member function
795795definition in class scope with external linkage (CUDA)
799799definition in class scope (C++20 CUDA)
891891anonymous type in variable declaration
892892auto with __constant__ variable
893893auto with CUDA variable
948948calling convention mismatch on redeclaration
992992fatal error (suppress-all sentinel)
10341034explicit instantiation with conflicting attributes
10631063in include file context
11181118CUDA attribute on namespace-scope variable
11501150context lines truncated
11581158auto return type with __global__
13061306CUDA memory space mismatch on redeclaration
14181418incomplete type in definition
14301430function attribute mismatch in template
15601560CUDA constexpr class with non-trivial destructor
15801580redeclaration with different template parameters
16551655tentative definition of constexpr
23842384constexpr mismatch on redeclaration (CUDA)
24422442extern variable at block scope with CUDA attribute
24432443extern variable at block scope with CUDA attribute (variant)
25022502no_unique_address mismatch
25032503no_unique_address mismatch (variant)
26562656internal error (assertion failure)
28852885CUDA attribute on deduction guide
29372937structured binding with CUDA attribute
30333033incompatible constexpr CUDA target
31163116restrict qualifier on definition
34143414auto with volatile/atomic qualifier
35103510__shared__ variable with VLA
35663566__constant__ with constexpr with auto
35673567CUDA variable with VLA type
35683568__constant__ with constexpr
35783578CUDA attribute in discarded constexpr-if branch
35793579CUDA attribute at namespace scope with structured binding
35803580CUDA attribute on variable-length array
36483648CUDA __constant__ with external linkage
36983698parameter type mismatch
37093709warnings treated as errors

Format Specifiers in CUDA Messages

CUDA error messages use the same fill-in system as EDG base errors, expanded by process_fill_in (sub_4EDCD0).

SpecifierKindMeaningExample
%sq3Quoted entity nameFunction name in cross-space call
%sq1, %sq23Indexed quoted namesCaller and callee
%no14Entity name (omit kind prefix)Function in redeclaration
%n1, %n24Entity namesOverride base/derived pair
%nd4Entity with declaration locationTemplate parameter
%s, %s1, %s23String fill-inExecution space keyword
%t6Type fill-inType in template arg errors
%p2Source positionPrevious declaration location

Architecture Requirements Summary

Quick reference for minimum architecture required by various CUDA features.

FeatureMinimum Architecture
Virtual basescompute_20
__device__/__host__ __device__ with ellipsiscompute_30
__managed__ variablescompute_30
alloca()compute_52
__nv_atomic_* functionssm_60
Atomic scope argumentsm_60
Atomic add/sub for f64sm_60
__grid_constant__compute_70
Atomic memory order argumentsm_70
16-bit atomic CASsm_70
128-bit atomic load/storesm_70
__nv_register_params__compute_80
Cluster scope for atomicssm_90
128-bit atomic exchange/CASsm_90
__wgmma_mma_async builtinssm_90a