Expand description
trueno-explain: PTX/SIMD/wgpu Visualization and Tracing CLI
A CLI tool that visualizes and traces code generation flows across Trueno’s execution targets. Implements the Toyota Way principle of Genchi Genbutsu (Go and See) by making invisible compiler transformations visible.
§Features
- PTX register pressure analysis
- Memory access pattern detection
- Warp divergence visualization (Heijunka)
- Muda (waste) detection and elimination suggestions
§Example
use trueno_explain::ptx::PtxAnalyzer;
use trueno_explain::analyzer::Analyzer;
let ptx = r#"
.entry test() {
.reg .f32 %f<16>;
ret;
}
"#;
let analyzer = PtxAnalyzer::new();
let report = analyzer.analyze(ptx).expect("PTX analysis should succeed");
assert_eq!(report.registers.f32_regs, 16);Re-exports§
pub use analyzer::AnalysisReport;pub use analyzer::Analyzer;pub use analyzer::MudaWarning;pub use analyzer::RegisterUsage;pub use compare::compare_analyses;pub use compare::format_comparison_json;pub use compare::format_comparison_text;pub use diff::compare_reports;pub use diff::format_diff_json;pub use diff::format_diff_text;pub use diff::DiffReport;pub use diff::DiffThresholds;pub use error::ExplainError;pub use error::Result;pub use output::format_json;pub use output::format_text;pub use output::OutputFormat;pub use ptx::BugSeverity;pub use ptx::PtxAnalyzer;pub use ptx::PtxBug;pub use ptx::PtxBugAnalyzer;pub use ptx::PtxBugClass;pub use ptx::PtxBugReport;pub use ptx::PtxCoverageReport;pub use ptx::PtxCoverageTracker;pub use ptx::PtxCoverageTrackerBuilder;pub use ptx::PtxFeature;pub use simd::SimdAnalyzer;pub use simd::SimdArch;pub use simd::SimdInstructionCounts;pub use tui::run_tui;pub use tui::TuiApp;pub use wgpu::WgpuAnalyzer;pub use wgpu::WorkgroupSize;
Modules§
- analyzer
- Core Analyzer trait and types for trueno-explain
- compare
- Backend comparison module
- diff
- Analysis diff and regression detection
- error
- Error types for trueno-explain
- output
- Output formatters for trueno-explain
- ptx
- PTX analysis module
- simd
- SIMD vectorization analyzer
- tui
- Interactive TUI mode for trueno-explain
- wgpu
- wgpu/WGSL shader analyzer