1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// SPDX-License-Identifier: Apache-2.0
// Copyright 2026 Craton Software Company
//! JIT pipeline: Cranelift detector, IR normalisation, PTX codegen, kernel cache, deopt.
//!
//! # Unstable surface — `pliron_*` modules
//!
//! The `pliron_dialect`, `pliron_lowering`, and `pliron_ptx` modules (and
//! any other `pliron_*` module exposed by this crate) are an **in-progress
//! implementation surface** for the W3.x / W4.x cuda-oxide backend tracked
//! in [RFC 0001](../../rfcs/0001-cuda-oxide-integration.md). They contain
//! several hundred lines of `NotYetWired` scaffolding stubs that exist only
//! so the v0.4 author has a target to fill in. They are deliberately
//! `#[doc(hidden)]` to keep them out of the rendered docs.rs surface, and
//! they are **NOT covered by semver compatibility until tensor-wasm-jit
//! reaches 1.0** — any name, signature, or behaviour inside a `pliron_*`
//! module is liable to change in a 0.x.y patch release without notice.
//! External consumers should not import from them.
// Differential JIT correctness oracle (roadmap feature #6). The
// scaffold lives behind its own feature flag because v0.4 will wire it
// against the self-hosted CUDA runner; the default host build does not
// need to compile the harness. The module is also compiled under
// `cfg(test)` so in-crate unit tests can reach it without flipping
// the feature.
// Signed kernel registry (roadmap feature #3). Scaffold only in v0.3.7:
// the in-memory `KernelRegistry` trait + `InMemoryRegistry` impl land so
// design partners can target a stable surface; the on-disk store, signing
// CLI, and server-side `/kernels` endpoint are v0.4 deliverables. Gated
// behind the `kernel-registry` feature because the HMAC/SHA-2/serde
// dependency chain is otherwise pure surface-area cost for the default
// build (which doesn't yet exercise this path). See
// `docs/KERNEL-REGISTRY.md` for the v0.4 wiring plan.
// Wave 1 of the Pliron pipeline: pure-Rust interim IR + per-family
// Cranelift-IR lowering passes. See [`lowered_ir`] for the IR contract
// and [`pliron_dialect`] for the trait surface that ties them together.
/// Internal test fixtures for the lowering passes.
///
/// Gated behind the opt-in `test-utils` feature so the symbols don't leak
/// into the stable public API. The crate's own unit and integration tests
/// see the module via `cfg(test)` (unit tests) or via the `test-utils`
/// feature flag enabled on the test target (integration tests). External
/// consumers that genuinely need these fixtures must opt in by adding
/// `tensor-wasm-jit = { ..., features = ["test-utils"] }` to their
/// `[dev-dependencies]` — they are not part of the stable surface.