# `Nx.Vulkan.Native`
[🔗](https://github.com/borodark/nx_vulkan/blob/main/lib/nx_vulkan/native.ex#L1)

Rustler NIF bindings for the Vulkan compute backend.

All functions in this module are NIF stubs that fail with
`:nif_not_loaded` if the native library wasn't compiled. They get
replaced at module-load time by the real Rust implementations.

Don't call these directly from application code — use `Nx.Vulkan`
or the `Nx.Vulkan.Backend` module instead. This module exists
only to give Rustler a place to bind into.

# `device_uuid`

Phase 2 W5 — read the device's pipelineCacheUUID as a 16-byte binary.

# `download_binary_batch4`

Batched download of 4 GPU tensors in a single submit/wait round-trip.

# `leapfrog_chain_synth`

Generic K-step leapfrog chain for synthesized shaders.

`push` is a raw binary assembled by the Elixir-side codegen (max 128 bytes).
Returns `{:ok, {q_chain, p_chain, grad_chain, logp_chain}}`.

# `pipeline_cache_load`

Phase 2 W5 — load on-disk pipeline cache blob into the spirit context.

# `pipeline_cache_persist`

Phase 2 W5 — atomically write spirit's current pipeline cache to disk.

# `timing_get`

H3 dispatch timing — read {count, dispatch_ns, submit_ns, wait_ns, record_ns}.

# `timing_reset`

H3 dispatch timing — reset accumulators.

# `upload_binary_into`

Upload a binary into an existing GPU buffer (no alloc).

# `upload_binary_into_batch2`

Batched upload of 2 binaries into 2 existing GPU buffers in one round-trip.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
