Add offline compiler
Closed this issue · 2 comments
vosen commented
Expected outcome:
A new subproject in ZLUDA: a command line tool zoc.exe (ZLUDA offline compiler) that compiles PTX to the final binary and saves it to disk along with intermediate formats
Comments:
- It's a developer's tool, we don't expect it to be used by the end-users
- For consistency with related projects (https://github.com/vosen/ptx_tests) it should use bpaf for command line (https://crates.io/crates/bpaf)
- It should take PTX and emit
- Pre-linked LLVM bitcode texts (.ll)
- Post-linking LLVM bitcode text (.ll) (optional if difficult)
- Final ELF binary (.elf)
- Disassembly of the final ELF binary (.asm) (optional if difficult)
- For implementation, look at how ZLUDA uses comgr and refactor it to save intermediates
JoelleJS commented
I've started (slowly) working on this