CUDA-4.1ΒΆ
Never invoke a kernel without a configuration
Required inputs: IR
CUDA 4.1 [kernel.unconfigured_call] Never invoke a kernel without a configuration
Direct or indirect calls to a global function shall always be configured.
Scope: Host, Device.
Audience: CUDA C++, CUDA Libraries.
Category: Mandatory.
Hardware Applicability: All Compute Capabilities.
Rationale
Functions that have the __global__ keyword are compiled for execution on a device and are not available
on the host.
Example 1 (Bad)
__global__ void kernel(); int main() { auto pfn = &kernel; pfn(); // Non-compliant: call to a __global__ function without a configuration. }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_unconfigured_call |
Never invoke a kernel without 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.