CUDA-4.2ΒΆ
Never invoke a non-kernel with a configuration
Required inputs: IR
CUDA 4.2 [kernel.configured_call] Never invoke a non-kernel with a configuration
The postfix expression of configured calls must always refer to a global function.
Scope: Host, Device.
Audience: CUDA C++, CUDA Libraries.
Category: Mandatory.
Hardware Applicability: All Compute Capabilities.
Rationale
Non global functions will not be properly compiled to execute on the device. Calling these functions using
the postfix expression of configured calls will result in an incorrect kernel invocation.
Example 1 (Bad)
void not_a_kernel(); int main() { auto pfn = ¬_a_kernel; pfn<<<1,1>>>(); // Non-compliant: configured call does not refer to a // __global__ function. }Excerpt from NVIDIA CUDA C++ Guidelines for robust and safety-critical programming, Version 3.0.1, Copyright (C) 2018-2023 NVIDIA Corporation.
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
cuda_kernel_configured_call |
Never invoke a non-kernel with a configuration |
None |
False |
Options
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
This rule has no individual options.