code wiki / _hdl_build / nx_llm_train_estimate.nx
nx_llm_train_estimate.nx
buildroot/runtime/_hdl_build/nx_llm_train_estimate.nx
dependencies 3 imports · 0 importers
imports: nx_gate_gn.nxnx_gate_base.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 12 | const K_MAGIC_3600: i64 = 3600 |
| 13 | const K_MAGIC_10000: i64 = 10000 |
| 14 | const K_MAGIC_1500: i64 = 1500 |
| 15 | const K_MAGIC_30000: i64 = 30000 |
| 16 | const K_MAGIC_7000: i64 = 7000 |
| 17 | const K_MAGIC_140000: i64 = 140000 |
functions
| 21 | func grow(name: *u8, ok: i64) -> i64 { if ok==1 { gw(" PASS " as *u8) } else { gw(" FAIL " as *u8) } gw(name); gw(" calls 1: gw |
| 23 | func train_tflops(params_M: i64, tokens_M: i64) -> i64 { return 6 * params_M * tokens_M } |
| 25 | func gpu_hours(tT: i64, peak_TFLOPS: i64, mfu_permil: i64) -> i64 { let eff: i64=(peak_TFLOPS*mfu_permil)/1000; if eff<=0 { return 0-1 } return tT/(eff*K_MAGIC_3600) } |
| 27 | func train_vram_gb(params_M: i64) -> i64 { return (params_M*16)/1000 } |
| 30 | func row(mname: *u8, params_M: i64, tokens_M: i64, gname: *u8, peak: i64, mfu: i64, cents_hr: i64, vram_gb: i64) -> i64 |
| 40 | func main() -> i64 |