CUDASafety-3.2ΒΆ
No configuration function calls in device code
Required inputs: IR
CUDA SAFETY 3.2 [safety.kernel.device_side_launch] No configuration function calls in device code
No configuration function call shall be present in device code.
Scope: Device.
Audience: CUDA C++.
Category: Mandatory.
Hardware Applicability: All Compute Capabilities.
Rationale
Device side configuration function calls are not supported in safety critical CUDA.
Example 1 (Bad)
__global__ void kernel(){} __device__ void foo() { kernel<<<1,1>>>(); // non-compliant: kernel launch in device code. }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 |
|---|---|---|---|
kernel_call_from_device |
Do not use configuration function calls in device code |
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.