Targets

x86_64AArch64
Operating systemLinuxLinux
Baselinex86-64-v3ARMv8.0-A
Implied by baselineAVX2 and FMA3 guaranteed to the code generator—
ABISystem V AMD64AAPCS64
HardwareIntel Haswell (2013) or later, AMD Zen or laterany ARMv8.0-A

Both targets are first class. They are not a primary backend and a port: each has its own full backend and its own peephole optimizer, and 4,198 of 4,451 test programs run on both.

The device

Beside the two CPU instruction sets, Mica runs tensor work on NVIDIA GPUs — the tensor verbs dispatch to the device by residency, through NVIDIA’s own libraries: cuBLAS for the matrix products, and kernels the compiler writes in CUDA C, which NVRTC, NVIDIA’s runtime compiler, builds for the card present.

NVIDIA GPU
Requirementcompute capability 7.5 or newer — the Turing generation (2018) and everything after it — and NVIDIA’s driver of branch R580 or newer
LibrariesNVIDIA’s driver, and cuBLAS and NVRTC of CUDA 13, each opened when a program first needs it; devkit/mica-provision nvidia installs cuBLAS and NVRTC from NVIDIA’s own repository
MechanismCUDA C written by the compiler; where the build machine has NVRTC, the link compiles it ahead for sm_80, sm_86, sm_89, sm_90 and sm_120 and the program carries the images, and on any other card NVRTC builds it for the card’s own architecture as the program runs; matrix products call cuBLAS
Surfacetensors declared on gpu, the ToDevice / ToHost transfer verbs, and the tensor verb vocabulary
Determinismevery operation IEEE 754 rounds exactly gives the processor’s bits; Exp, Ln and Tanh are NVIDIA’s functions, within two units in the last place; a product sums in cuBLAS’s order; every result repeats bit for bit on the same card

A program that uses the device links the device floor, which opens NVIDIA’s libraries as the program first needs them; the program builds on any machine, and a run on a machine without them names the library it looked for. The GPU, without kernels is the one-page walk.

Output

  • ELF executables, static archives, and shared objects
  • Position-independent executables by default
  • DWARF v5 debug information with a registered language code, exercised by gdb-driven tests
  • Assembly emitted in Intel or AT&T syntax, assembled and linked with GNU binutils

Build axes

Two properties are fixed at build time rather than discovered at runtime:

String encoding — UTF-8 or UTF-32, chosen per binary. Compiled objects are encoding-specific, and UTF-8 symbols carry a distinguishing suffix so that importing with the wrong encoding fails at link time rather than linking the wrong code.

Deployment class — hosted-heap or fixed-arena, selected with --memory-class when you link. Code generation is byte-identical across both; regions are scheduled by the compiler within whichever class you pick. See allocator as a link decision.

Combined with the tasking flavour, the standard library ships as a small matrix of archives per architecture, resolved automatically from the target you name.

Cross-compilation

Either architecture can be built from a host of the other, on one machine, using cross binutils and user-mode emulation for running the results. This is how the test corpus covers both architectures from a single gate host.

What Mica needs

ToYou need
Install Mica and run its programs64-bit Linux with glibc 2.38 or newer — Debian 13, Ubuntu 24.04 and every later release — on an x86-64 processor of x86-64-v3 (Intel Haswell, AMD Zen and later) or an AArch64 processor (ARMv8.0-A)
Link the programsbinutils and libc6-dev: the compiler hands its assembly to as and ld, and a program links against the C library and its startup objects; the package pulls both in
Build for the other architecturethat architecture’s binutils and C library: binutils-aarch64-linux-gnu and libc6-dev-arm64-cross on an x86-64 machine, binutils-x86-64-linux-gnu and libc6-dev-amd64-cross on an AArch64 one; the package suggests them
Run the other architecture’s programsqemu-user-binfmt, which runs them through the kernel’s binfmt support
Join Mica and Ca C compiler for the C half: GCC 14 or newer, the first that takes C23 by its name (-std=c23), or Clang 18 or newer; mica-provision gcc installs the newest released GCC
Run tensors on a GPUan NVIDIA card of compute capability 7.5 or newer, NVIDIA’s driver of branch R580 or newer, and cuBLAS and NVRTC of CUDA 13, which mica-provision nvidia installs
Edit with the language serverVS Code 1.91 or newer with the Mica extension
Use the container image insteadDocker; the image carries the compiler, binutils, gdb and git, and a GPU reaches it through the machine’s own driver with NVIDIA’s container toolkit on the machine

The compiler binary is statically linked and needs no library of its own: everything above is for the programs it builds and the tools around them. A card of compute capability 8.0 or newer — Ampere and every later generation — also runs the fused attention kernels, and loads the modules a build with NVRTC precompiled at the program’s start instead of compiling them there. See installing Mica.