pub fn compile_to_tenstorrent_matmul(
source: &str,
) -> Result<(MatmulSpec, String), String>Expand description
Genuinely LOWER an ordinary LOGOS matmul program (a triple-loop C[i][j] += A[i][k]*B[k][j]) to a tiled
Tensix matrix-engine compute kernel — the compiler recognizes the GEMM idiom (affine index analysis)
and generates the kernel from the program’s dimensions, or REFUSES (typed) if the program is not a
matmul. This is the honest counterpart to the hand-written template kernels: the kernel is a function of
the source, not a canned string. Returns the recognized (spec, kernel_cpp).