Using MIND Core v1 Today
This page gives a practical, end-to-end guide to using the MIND Core v1 toolchain: surface language → IR → autodiff → MLIR → CPU runtime → conformance.
1. Installing mindc
From source
Clone and build:
git clone https://github.com/cputer/mind.git cargo build --release ./target/release/mindc --help
Validating installation
mindc --version mindc --stability
Both commands reflect the published Core v1 stability & versioning contract.
2. Writing your first Core v1 program
Create a file simple.mind:
fn main(x: tensor<f32>[2, 2]) -> tensor<f32>[2, 2] {
let y = x + x
return y
}Compile to IR:
mindc simple.mind -o simple.ir
3. Running through the CPU runtime
Use the runtime CLI (from mind-runtime repo):
runtime run simple.ir --input x=[1,2,3,4]
Expected output:
[[2,4],[6,8]]
4. Using autodiff
Extend simple.mind:
fn main(x: tensor<f32>[2]) -> tensor<f32>[1] {
let y = sum(x)
return y
}Generate gradient IR:
mindc simple.mind --grad --func main -o grad.ir
5. Lowering to MLIR (CPU backend)
mindc main.mind --mlir -o main.mlir
6. Verifying conformance
CPU baseline:
mindc conformance --profile cpu
GPU profile:
mindc conformance --profile gpu
What to read next
- Cookbook (real examples)
- Conformance
- Stability & Versioning