Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-protocols-mv/blob/main/crates/aien-microjob/examples/an0_digest.rs # aien-protocols-mv Canonical specifications, wire protocols, and schemas for the AIEN sovereign ecosystem Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-protocols-mv / crates / aien-microjob / examples / an0_digest.rs` 19 lines ยท 700 bytes Raw Blame History 1 //! Print the `matmul_u32` payload (hex) and the Rust worker kernel's output 2 //! digest for `M K N SEED`, one line: ` `. Used by 3 //! `specs/aienet/jobpath/parity.sh` against the Omega recompute. 4 use aien_microjob::aienet0::{matmul_u32_digest, to_hex, MatmulU32}; 5 6 fn main() { 7 let a: Vec = std::env::args() 8 .skip(1) 9 .map(|s| s.parse().expect("M K N SEED are integers")) 10 .collect(); 11 assert_eq!(a.len(), 4, "usage: an0_digest M K N SEED"); 12 let j = MatmulU32 { 13 m: a[0] as u16, 14 k: a[1] as u16, 15 n: a[2] as u16, 16 seed: a[3], 17 }; 18 println!("{} {}", to_hex(&j.encode()), to_hex(&matmul_u32_digest(&j))); 19 }