code wiki / (root) / nx_compute_graph_test.nx

nx_compute_graph_test.nx

buildroot/runtime/nx_compute_graph_test.nx

9151 B220 linesdepth 7pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic compute
docsdependenciesstructsconstsfunctions

about

nx_compute_graph_test.nx -- typed DAG end-to-end shape verification. Constructs a small computation graph that resembles a tiny ML forward pass: two inputs feed a matmul; the matmul feeds a ReLU; the ReLU is the output. Validates that: * structural validation accepts the well-formed graph * toposort emits a valid linearisation * cycle detection refuses a graph with a back-edge * dangling input detection refuses a graph with unwired slot * bad-edge detection refuses an edge to a non-existent node * content hashes are stable across builds with identical shape

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_sha256.nx nx_compute_node.nx nx_compute_graph.nx nx_compute_graph_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_sha256.nxnx_compute_node.nxnx_compute_graph.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_cg_alloc sys_mmap nx_cn_alloc sys_mmap ↻ nx_cg_add_node nx_cn_set_input nx_cg_validate nx_cg_get_node nx_cn_node_kind_is_valid nx_cn_op_is_valid nx_cn_kernel_is_valid nx_cg_toposort sys_mmap ↻ nx_cg_get_node ↻ sys_mmap ↻ nx_cg_topo_at nx_cn_compute_hash sys_mmap ↻ _cn_write_i64_le sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word blk_byte sha256_final blk_set_byte ↻ sha256_compress ↻ nx_cn_set_param nx_cg_root_hash sys_mmap ↻ nx_cg_get_node ↻ nx_cg_verdict_is_valid

structs

none

consts

none

functions

19func main() -> nx_int