ptx_ir/
lib.rs

1//! # PTX IR
2//!
3//! This crate provides a data structure and parser for the Parallel Thread Execution (PTX) Intermediate Representation (IR).
4//! ## Usage
5//! ```rust
6//! use ptx_ir::Module;
7//! use std::path::PathBuf;
8//!
9//! let input = PathBuf::from("tests/kernels/simple/add.ptx");
10//! match Module::from_ptx_path(&input) {
11//!     Ok(module) => {
12//!         println!("{:#?}", module);
13//!     }
14//!     Err(diagnostic) => {
15//!         println!("{}", diagnostic);
16//!     }
17//! }
18//!
19
20mod ir;
21mod lexer;
22mod parser;
23pub use ir::*;