Visitar URL original
docs: cinderx-oracle env-spec v2 (post oracle-complete) · SonicField/cpython@233fd67 · GitHub
Skip to content

Commit 233fd67

Browse files
committed
docs: cinderx-oracle env-spec v2 (post oracle-complete)
Push 62 (doc-only) — env-spec updated with lessons from 02:33Z dry-run + 02:39Z successful oracle execution that produced Phoenix-vs-Cinder verdict (Phoenix faster on 3/3 benches, sub-1.0x inherited from Cinder). Updates per theologian 02:41:37Z: - Phoenix JIT activation: import _cinderx FIRST, then import cinderjit (corrects v1 assumption that cinderjit was directly importable) - cinderx_dev JIT activation: from cinderx import jit; jit.force_compile - Binary paths: ~/local/cinderx_dev/python-3.12/python (corrects v1 assumption of ~/local/cinderx_dev/cinderx/python) - LD_LIBRARY_PATH + PYTHONPATH env requirements for cinderx_dev - Same-arch comparison (both ARM64 on devgpu004) verified working - Application result section: oracle verdict + per-bench numbers - Failure modes from 01:16Z (-X jit didn't activate) + 02:33Z (API enumeration gap) + both resolved methodologies Closes pythia python#148 python#4 (spec-from-single-failure shipping before empirical validation). v2 ships AFTER successful oracle execution.
1 parent b9e20b5 commit 233fd67

1 file changed

Lines changed: 60 additions & 23 deletions

File tree

‎docs/cinderx-oracle-env-spec.md‎

Lines changed: 60 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,47 @@ possible:
4242

4343
### 2. JIT Activation Verification
4444

45-
cinderx_dev JIT activation cannot be assumed from `-X jit` flag alone.
46-
Verification REQUIRED:
45+
**v2 (2026-04-26 post-execution): Phoenix and cinderx_dev have different
46+
JIT-activation API names + import patterns. Both require explicit module
47+
load before force_compile.**
4748

49+
Phoenix-side (verified working at push 60):
4850
```bash
49-
# Method 1: explicit compile + verify
50-
PYTHONPATH=/path/to/benchmark cinderx_dev_python -c "
51-
import cinderjit, benchmark_phoenix
51+
PYTHONJITALL=1 PYTHONPATH=/path/to/benchmark phoenix_python -c "
52+
import _cinderx # MUST import first (loads C extension)
53+
import cinderjit # only available after _cinderx import
54+
import benchmark_phoenix
5255
cinderjit.force_compile(benchmark_phoenix.bench_int_arith)
53-
assert cinderjit.is_jit_compiled(benchmark_phoenix.bench_int_arith), 'JIT not active'
56+
assert cinderjit.is_jit_compiled(benchmark_phoenix.bench_int_arith)
5457
"
5558
```
5659

57-
If `cinderjit.force_compile` or `cinderjit.is_jit_compiled` are not exposed
58-
in cinderx_dev (different API), use Cinder-equivalent:
60+
cinderx_dev-side (verified working 2026-04-26T02:39Z):
5961
```bash
60-
# Method 2: cinder API (verify via cinder.is_jit_compiled or _cinder)
61-
cinderx_dev_python -c "import _cinderjit; print(_cinderjit.get_runtime_helper_addr())"
62+
LD_LIBRARY_PATH=/home/alexturner/local/cinderx_dev/python-3.12 \
63+
PYTHONPATH=/home/alexturner/local/cinderx_dev/cinderx/cinderx/PythonLib:/path/to/benchmark \
64+
~/local/cinderx_dev/python-3.12/python -c "
65+
from cinderx import jit # cinderx package, jit submodule
66+
import benchmark_phoenix
67+
jit.force_compile(benchmark_phoenix.bench_int_arith)
68+
assert jit.is_jit_compiled(benchmark_phoenix.bench_int_arith)
69+
"
6270
```
6371

64-
If neither method confirms JIT activation, the oracle reading is INVALID
65-
(JIT didn't run; comparison is interpreter-vs-Phoenix-JIT, not
72+
**Critical v2 corrections from v1:**
73+
- Phoenix: NOT `import cinderjit` directly — requires `import _cinderx` first
74+
to load the C extension that registers cinderjit module. v1 spec was wrong.
75+
- cinderx_dev: NOT `import cinderjit` — uses `from cinderx import jit`. Module
76+
layout differs from Phoenix.
77+
- cinderx_dev binary path: `~/local/cinderx_dev/python-3.12/python` (NOT
78+
`~/local/cinderx_dev/cinderx/python` as v1 assumed).
79+
- cinderx_dev requires LD_LIBRARY_PATH to find libpython3.12.so.1.0 +
80+
PYTHONPATH to find cinderx package.
81+
- `-X jit` flag: insufficient (didn't activate JIT in 2026-04-26T01:16Z dry-run).
82+
Always use force_compile + is_jit_compiled to verify activation.
83+
84+
If neither force_compile nor is_jit_compiled returns True, the oracle reading
85+
is INVALID (JIT didn't run; comparison is interpreter-vs-something, not
6686
JIT-vs-JIT).
6787

6888
### 3. Test-Harness Equivalence
@@ -116,19 +136,36 @@ Cinder-inherited):
116136
→ PHOENIX-INTRODUCED (open bisect against cinderx_dev oracle as
117137
known-clean reference).
118138

119-
## Failure Modes (Observed 2026-04-26T01:16:27Z)
139+
## Failure Modes (Observed 2026-04-26T01:16:27Z + 02:33Z dry-run)
120140

121-
- **JIT didn't activate** (-X jit insufficient): use Method 1 force_compile.
141+
- **JIT didn't activate** (-X jit insufficient): use force_compile + verify.
122142
- **Cross-arch confound** (ARM64 cinderx_dev vs x86_64 Phoenix): build
123143
same-arch first.
124144
- **Vanilla baseline missing on devgpu004** (W-ARM64-VANILLA-INFRA debt):
125145
use targeted bench median instead of ABBA harness.
126-
127-
## Application
128-
129-
Next oracle invocation: try_except_callee + nn_module_forward
130-
discrimination per W-PERF-PRE-W27C-BISECT (push 60 PROVISIONAL-PRE-EXISTING
131-
labels). Apply this spec to obtain valid Phoenix-vs-Cinder verdict.
132-
133-
If oracle confirms INHERITED, PROVISIONAL → PRE-EXISTING (true).
134-
If oracle confirms PHOENIX-INTRODUCED, open bisect to localize commit.
146+
- **Wrong binary path** (v1 assumed `cinderx/python`): actual is
147+
`python-3.12/python`.
148+
- **Missing shared library** (libpython3.12.so.1.0): set LD_LIBRARY_PATH.
149+
- **Wrong import name** (v1 assumed cinderjit on cinderx_dev): use
150+
`from cinderx import jit`.
151+
- **Phoenix import order** (v1 assumed `import cinderjit` works directly):
152+
must `import _cinderx` first.
153+
154+
## Application Result (2026-04-26T02:39Z)
155+
156+
Oracle executed try_except_callee + nn_module_forward + bench_int_arith
157+
discrimination per W-PERF-PRE-W27C-BISECT (push 60 PROVISIONAL labels):
158+
159+
| Bench | cinderx_dev | Phoenix-ARM64-p60 | Verdict |
160+
|-------------------------|-------------|-------------------|-------------------|
161+
| bench_int_arith | 4.1ms | 3.7ms | Phoenix 10% faster |
162+
| bench_try_except_callee | 1.6ms | 1.3ms | Phoenix 19% faster |
163+
| bench_deep_class | 1.1ms | 1.0ms | Phoenix 9% faster |
164+
165+
Verdict: try_except_callee + nn_module_forward (= bench_deep_class)
166+
sub-1.0x-vs-vanilla = INHERITED FROM CINDER. Phoenix not regression
167+
source. PROVISIONAL → CONFIRMED-INHERITED. W-PERF-PRE-W27C-BISECT
168+
CLOSED-by-oracle-confirmation 2026-04-26T02:40:16Z.
169+
170+
If future oracle confirms INHERITED, PROVISIONAL → CONFIRMED-INHERITED.
171+
If future oracle confirms PHOENIX-INTRODUCED, open bisect to localize commit.

0 commit comments

Comments
 (0)