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
// 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.
//! Runtime tuning for the MLX backend.
use crateffi;
/// Default `mlx::compile` multi-output slot limit when env / explicit override unset.
pub const DEFAULT_COMPILE_OUTPUT_CAP: usize = 1024;
/// Primary env var (also read by `rlx-runtime::compile_output_cap`).
pub const COMPILE_OUTPUT_CAP_ENV: &str = "RLX_COMPILE_OUTPUT_CAP";
/// Legacy alias env var.
pub const COMPILE_OUTPUT_CAP_ENV_MLX: &str = "RLX_MLX_COMPILE_OUTPUT_CAP";
/// Current compile output cap (explicit override, else env, else
/// [`DEFAULT_COMPILE_OUTPUT_CAP`]).
/// Override the compile output cap for this process. Pass `0` to clear the override
/// (same as [`reset_compile_output_cap`]).
/// Clear an explicit cap override; subsequent reads use env / default again.