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
// RLX — versatile ML compiler + runtime.
// Copyright (C) 2026 Eugene Hauptmann, Nataliya Kosmyna.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 3.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//! RLX driver layer — devices, arenas, buffers, command streams
//! (plan #58).
//!
//! Borrowed from MAX's three-layer separation: graph (IR) →
//! engine (compiled artifacts, sessions) → driver (devices,
//! buffers). The Rust spelling sits one crate below
//! `rlx-runtime`: this crate owns the *physical* concerns
//! (which device, which buffer slot, which command stream),
//! `rlx-runtime` owns the *logical* engine (Session, CompiledGraph,
//! compile cache).
//!
//! Why split? Three reasons.
//! 1. **Backend symmetry.** rlx-cpu / rlx-metal don't currently
//! depend on rlx-runtime; before this split they couldn't
//! reach the `Device` enum without a circular dep. The
//! `rlx-ir → rlx-driver → backends → rlx-runtime` chain is
//! strictly one-way.
//! 2. **Testability.** A `Buffer` parity test doesn't need to
//! pull in the entire compile + execute pipeline.
//! 3. **Future swaps.** Replacing the engine layer (e.g. for
//! AOT compilation) doesn't touch the driver.
//!
//! `rlx-runtime` re-exports every type here, so existing callers
//! keep working without import changes.
pub use DeviceArena;
pub use Buffer;
pub use ;
pub use Device;
pub use BufferHandle;
pub use ;
pub use ;