Crates.io | cuda_parsers |
lib.rs | cuda_parsers |
version | 0.1.0 |
source | src |
created_at | 2023-12-29 05:32:36.819216 |
updated_at | 2023-12-29 05:32:36.819216 |
description | Parsers for CUDA binary files. |
homepage | |
repository | https://github.com/VivekPanyam/cudaparsers |
max_upload_size | |
id | 1082982 |
size | 36,870 |
This repo contains parsers for CUDA binary files. These file formats are not publicly documented so correctly parsing them can be tricky.
These are the GPU executable files generated from compiling CUDA code. They are often embedded within other applications. Among other things, they contain the instructions that are actually executed on GPU.
You may have interacted with these files if you've used any of the cuModuleLoad*
functions in the CUDA driver API.
There are two types of CUDA binaries:
cubin
files: These run on one particular GPU architecture. This is because each architecture can have different instruction sets and capabilitiesfatbin
files: These are fat binaries that contain cubin
files for several architecturesThis repo has well tested support for parsing cubin
files and basic support for parsing fatbin
files. See below for more details
The parsers are implemented in Rust, but can be exposed to other languages if there's interest (feel free to create an issue!).
cubin
files contain a lot of useful information that's not exposed by CUDA APIs.
The parsers in this repo were initially built for an internal project that needed detailed information about CUDA modules and kernels.
This post contains a detailed answer: https://blog.vivekpanyam.com/parsing-an-undocumented-file-format
Short version: we test on thousands of cubin
files to ensure that the output produced by this parser matches the output of cuobjdump
from NVIDIA.