Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

singe-ptx

Latest version Documentation License

CUDA PTX parser, AST, and generated instruction metadata utilities.

This crate parses PTX assembly into a Rust AST and exposes generated metadata for known PTX instructions.

Examples

let ptx = r#"
.version 9.1
.target sm_90
.address_size 64

.visible .entry add(.param .u64 data) {
    ret;
}
"#;

let module = singe_ptx::parser::parse_module(ptx)?;
assert_eq!(module.version.major, 9);
assert_eq!(module.items.len(), 1);