code wiki / _hdl_build / nx_engineer_profile.nx
nx_engineer_profile.nx
buildroot/runtime/_hdl_build/nx_engineer_profile.nx
about
nx_engineer_profile.nx -- the ENGINEER's bottleneck-diagnosis feature (RACI: the Engineer
MEASURES + VERIFIES; it does not fix or decide the trade-off -- it hands a verdict to the
Builder). Given a kernel's flops + bytes-moved and the chip's peak flops + bandwidth, the
Engineer diagnoses which constraint binds (the roofline read) and reports the LEVER CLASS the
Builder should reach for -- data-movement (memory-bound) or compute (compute-bound). This is
the team's "measure before you optimise", so no one polishes a memory-bound kernel's SIMD.
license_tier: ORIGINAL
dependencies 1 imports · 1 importers
imports: nx_roofline.nx
imported by: nx_builder_quant.nx
structs
| none |
consts
| 11 | const ENG_LEVER_NONE: i64 = 0 // could not diagnose (invalid inputs) |
| 12 | const ENG_LEVER_DATA: i64 = 1 // MEMORY-bound -> reduce bytes moved (quantize/sparsify/fuse) |
| 13 | const ENG_LEVER_COMPUTE: i64 = 2 // COMPUTE-bound -> optimise the inner loop (the search governor) |
functions
| 17 | func eng_diagnose_kernel(flops: i64, bytes: i64, peak_flops: i64, peak_bw: i64) -> i64 |
| 23 | func eng_recommend_lever(bound: i64) -> i64 |
| 30 | func eng_kernel_ai_milli(flops: i64, bytes: i64) -> i64 { return rf_ai_milli(flops, bytes) } calls 1: rf_ai_milli |