cuda-c-api

Reference CUDA C APIs for kernel development and GPU memory management.

6|1|Updated Apr 19, 2026
One-click install
npx skills add https://github.com/xchang1121/AutoResearch-CC-hook --skill cuda-c-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cuda-c-api
Source: https://github.com/xchang1121/AutoResearch-CC-hook/tree/main/skills/cuda-c/guides/cuda-c-api
Command: npx skills add https://github.com/xchang1121/AutoResearch-CC-hook --skill cuda-c-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

CUDA C API usage can be intricate due to a wide range of modifiers, memory qualifiers, and launch semantics. This reference consolidates core concepts into a single, accessible guide for GPU programming and kernel development.

Core Features & Use Cases

  • Comprehensive coverage of CUDA C core APIs including global, device, host, shared, constant, extern shared, and kernel launch syntax.
  • Practical use cases such as writing GPU kernels, managing device memory, synchronizing threads, and performing atomic operations.
  • Use Case: A developer porting CPU computations to GPU can quickly locate the correct function signatures and memory management calls to implement an efficient CUDA solution.

Quick Start

Refer to the documented APIs to implement and optimize CUDA C kernels and memory operations.

Frequently Asked Questions about cuda-c-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use CUDA C memory qualifiers like __shared__ and __constant__ for GPU programming?

CUDA C memory qualifiers like __shared__ and __constant__ define variable storage in GPU memory hierarchy. This reference details their function signatures and memory management calls to implement efficient device-side kernel operations.

What is the correct kernel launch syntax for executing a CUDA C function?

Kernel launch syntax in CUDA C executes __global__ functions on the GPU by specifying grid and block dimensions. This guide covers the launch configuration parameters needed to dispatch kernels and manage thread synchronization.

How do I manage device memory and perform atomic operations when porting CPU computations to GPU?

Managing device memory and atomic operations when porting CPU computations to GPU requires specific CUDA C API calls. This reference provides the function signatures for memory allocation, thread synchronization, and atomic operations.

Does this CUDA C API reference cover warp operations and PyTorch integration?

Yes, this CUDA C API reference covers warp operations and PyTorch integration. It consolidates function modifiers, math utilities, and framework integration details for developers optimizing CUDA-based applications across hardware architectures.

What are the differences between __global__, __device__, and __host__ function modifiers in CUDA C?

In CUDA C, __global__, __device__, and __host__ function modifiers define execution scope. This reference explains how these modifiers dictate whether functions run on the CPU, GPU, or can be called from the host.

Can I use this reference to implement extern __shared__ memory for dynamic shared memory allocation in my kernel?

Yes, you can use this reference to implement extern __shared__ memory for dynamic shared memory allocation. It documents the necessary CUDA C API syntax and memory management techniques for optimizing kernel performance.