.CU

CU File

CUDA Source Code File
Ask a question
QUICK ANSWER

A CU file is an NVIDIA CUDA source code file - C/C++ code extended with GPU programming keywords that run computations on an NVIDIA graphics card. Open it in any text editor or code editor such as VS Code. To compile and run the GPU code you need an NVIDIA GPU, its driver, and the NVIDIA CUDA Toolkit (nvcc).

Developer: NVIDIA Corporation Category: Developer Files MIME: text/plain
OPENS ON Windows Linux
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Aug 24, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the CU file format?

A .cu file is a CUDA source code file - C/C++ extended with NVIDIA's parallel computing API for programming GPU accelerators. CUDA (Compute Unified Device Architecture) was introduced by NVIDIA in 2006 alongside the GeForce 8800 GTX and the first CUDA Toolkit.

.cu files are plain text and follow standard C/C++ syntax augmented with CUDA-specific qualifiers: __global__ marks a kernel function that runs on the GPU and is launched from the CPU; __device__ marks a function callable only from GPU code; __host__ marks an ordinary CPU function. Kernel launches use the triple-angle-bracket syntax <<<grid, block>>> to specify grid and thread-block dimensions, with built-in variables threadIdx, blockIdx, blockDim, and gridDim available inside kernels.

Compilation is handled by nvcc (NVIDIA CUDA Compiler Driver). It splits the .cu file in two passes: host C++ code goes to the system compiler (gcc/g++ on Linux, cl.exe on Windows), while device code compiles to PTX intermediate representation or binary .cubin for a specific GPU architecture. Header files with device-only declarations conventionally use the .cuh extension.

CUDA is NVIDIA-proprietary and requires an NVIDIA GPU. macOS support was dropped in CUDA 11.8 (2022). For cross-vendor GPU programming, alternatives include OpenCL (.cl files) and AMD HIP, which uses nearly identical syntax. The CUDA Toolkit is now at version 13.x (2026), and .cu files from CUDA 1.0 remain largely compatible with current toolchains.

Security & safety

RISK: LOW

A .cu file is plain source code text; it cannot execute directly. Compiled CUDA binaries execute on the GPU and have the same risk profile as any compiled program from an untrusted source.

Format details

in a nutshell
FULL NAMECUDA Source Code Fileaka CUDA file, CUDA kernel source
DEVELOPERNVIDIA Corporationsince 2006 (CUDA 1.0)
MIME TYPEtext/plain
TYPEtext source code (C/C++ superset with GPU extensions)
This extension is also used by…
  • Currency Exchange Rate File (various apps) - Some personal finance or point-of-sale applications use .cu for currency data files; plain text or binary, unrelated to NVIDIA.

Programs that open CU files

Windows5 apps
Microsoft Visual Studio Freemium Install NVIDIA Nsight Visual Studio Edition plugin; provides CUDA IntelliSense and debugging.
Windows Notepad Built-in Opens .cu files as plain text for viewing source code.
Notepad Open-source Open for text viewing/editing; no CUDA-specific syntax highlighting by default (user-defined language files available).
Visual Studio Code Open-source Install the C/C++ or CUDA extension; open .cu file for syntax highlighting and IntelliSense.
NVIDIA CUDA Toolkit (nvcc) Free Compile with: nvcc myfile.cu -o myprogram. Requires NVIDIA GPU driver installed.
Linux3 apps
NVIDIA CUDA Toolkit (nvcc) Free nvcc myfile.cu -o myprogram. Primary platform for CUDA development.
CLion Paid Full CUDA support via CMake integration with CUDA language support.
Visual Studio Code Open-source Install CUDA extension pack for syntax highlighting and Nsight integration.

Technical details

deep spec
EncodingPlain text, UTF-8 or ASCII
Compilernvcc (NVIDIA CUDA Compiler Driver)
GPU kernel qualifier__global__ - GPU entry point, callable from CPU via <<<grid, block>>> syntax
Device function qualifier__device__ - callable only from GPU code
Built-in variablesthreadIdx, blockIdx, blockDim, gridDim (available inside kernels)
Compilation splitHost C++ to gcc/g++ (Linux) or cl.exe (Windows); device code to PTX or .cubin
Header extension.cuh for files containing device-side declarations
Platform requirementNVIDIA GPU required; macOS support dropped in CUDA 11.8 (2022)
Toolkit version rangeCUDA 1.0 (2006) - CUDA 13.x (2026)
Output formatsPTX (portable IR) or .cubin (binary for specific GPU architecture)
Cross-vendor alternativeOpenCL (.cl) and AMD HIP for non-NVIDIA GPU targets
Typical file size1 KB - 500 KB (single kernel file)
Released2006 (CUDA 1.0)
Latest versionCUDA 13.x (2026); format co-evolves with the CUDA Toolkit
Specificationdocs.nvidia.com

CU conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with CU files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about CU files.

Frequently asked questions

How do I compile a .cu file?
Install the NVIDIA CUDA Toolkit, then run: nvcc myfile.cu -o myprogram. You need an NVIDIA GPU with drivers installed.
Can I open a .cu file without NVIDIA GPU?
Yes - it is a text file, open it in any editor. But you cannot compile or run the GPU code without an NVIDIA GPU and CUDA Toolkit.
What is the difference between .cu and .cuh?
.cu is a CUDA source implementation file (equivalent to .cpp). .cuh is a CUDA header file with device function declarations/inline code (equivalent to .h for GPU code).
Can I run CUDA code on an AMD GPU?
Not directly. AMD ROCm's HIP framework provides a CUDA-compatible API; the hipify tool can convert .cu files to HIP (.hip) source for AMD GPUs.
What editor has best CUDA support?
Visual Studio with Nsight VS Edition (Windows, full debugger), or VS Code with the CUDA extension on Linux/Windows. CLion also has good CMake-based CUDA project support.

References

1NVIDIA CUDA Compiler Driver (nvcc) documentationdocs.nvidia.com
2NVIDIA CUDA Programming Guidedocs.nvidia.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.BINCD/DVD Disc Image (BIN/CUE)
5.RPMSGRestricted Permission Message
6.MDMarkdown Document
7.NOMEDIAAndroid No-Media Marker File
8.PRO6XProPresenter 6 Bundle File
9.PRDXSoftMaker Presentations Document
10.EXEWindows Executable (Portable Executable)

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z