From 4655baefaf3878b4d68c3d320b60581c8da709a9 Mon Sep 17 00:00:00 2001 From: Pavlo Ratushnyi Date: Sat, 14 Nov 2026 13:20:36 +0100 Subject: [PATCH] Fix renamed paths (include_str of window_launches, a function imported from its planner module), drop the unused var_os of two settings modules Co-Authored-By: Claude Sonnet 5.5 --- crates/cuda-driver/src/device_ref/tests.rs | 2 +- crates/cuda-driver/src/settings.rs | 2 +- crates/cuda-model/src/s_gemv_legacy.rs | 2 +- crates/cuda-model/src/settings.rs | 2 +- crates/gptoss/src/settings.rs | 10 ++-------- crates/model-format/src/settings.rs | 10 ++-------- crates/native-cpu-expert/src/settings.rs | 2 +- scripts/dev/explicit_imports.py | 14 ++++++++++++++ scripts/dev/funnel_env_reads.py | 2 +- 9 files changed, 24 insertions(+), 22 deletions(-) diff --git a/crates/cuda-driver/src/device_ref/tests.rs b/crates/cuda-driver/src/device_ref/tests.rs index e66d0dbe..7a0db691 100644 --- a/crates/cuda-driver/src/device_ref/tests.rs +++ b/crates/cuda-driver/src/device_ref/tests.rs @@ -63,7 +63,7 @@ fn the_window_and_journal_modules_never_clone_a_handle() { let window_ops = [ include_str!("../original_verify_window_ops.rs"), include_str!("../original_verify_window_ops/gdn_stages.rs"), - include_str!("../original_verify_window_ops/original_verify_window_ops_methods.rs"), + include_str!("../original_verify_window_ops/window_launches.rs"), include_str!("../original_verify_window_ops/qsa_prelude_ops.rs"), include_str!("../original_verify_window_ops/side_qsa_branches.rs"), include_str!("../original_verify_window_ops/side_shared_expert.rs"), diff --git a/crates/cuda-driver/src/settings.rs b/crates/cuda-driver/src/settings.rs index 61f08a18..4ce948db 100644 --- a/crates/cuda-driver/src/settings.rs +++ b/crates/cuda-driver/src/settings.rs @@ -1,5 +1,5 @@ //! The only place of this crate that reads the process environment (`env-read` ratchet of `architecture.json`). -//! The reads keep their call sites and their parsing; a later step replaces these two functions by a parsed settings value. +//! The reads keep their call sites and their parsing; a later step replaces these functions by a parsed settings value. use std::env::{self, VarError}; use std::ffi::{OsStr, OsString}; diff --git a/crates/cuda-model/src/s_gemv_legacy.rs b/crates/cuda-model/src/s_gemv_legacy.rs index 78554d73..8eb42df9 100644 --- a/crates/cuda-model/src/s_gemv_legacy.rs +++ b/crates/cuda-model/src/s_gemv_legacy.rs @@ -161,7 +161,7 @@ pub use s2_gemv_planners::plan_s2_gemv_fast; #[allow(unused_imports)] pub use s2_gemv_planners::plan_s2_gemv_q8; #[allow(unused_imports)] -pub use s2_gemv_planners::s2_gemv_planners; +pub use s2_gemv_planners::plan_s2_gemv_quads; #[allow(unused_imports)] pub use s2_gemv_planners::q8_0_dequant; #[allow(unused_imports)] diff --git a/crates/cuda-model/src/settings.rs b/crates/cuda-model/src/settings.rs index 61f08a18..4ce948db 100644 --- a/crates/cuda-model/src/settings.rs +++ b/crates/cuda-model/src/settings.rs @@ -1,5 +1,5 @@ //! The only place of this crate that reads the process environment (`env-read` ratchet of `architecture.json`). -//! The reads keep their call sites and their parsing; a later step replaces these two functions by a parsed settings value. +//! The reads keep their call sites and their parsing; a later step replaces these functions by a parsed settings value. use std::env::{self, VarError}; use std::ffi::{OsStr, OsString}; diff --git a/crates/gptoss/src/settings.rs b/crates/gptoss/src/settings.rs index 61f08a18..24f8d322 100644 --- a/crates/gptoss/src/settings.rs +++ b/crates/gptoss/src/settings.rs @@ -1,17 +1,11 @@ //! The only place of this crate that reads the process environment (`env-read` ratchet of `architecture.json`). -//! The reads keep their call sites and their parsing; a later step replaces these two functions by a parsed settings value. +//! The reads keep their call sites and their parsing; a later step replaces these functions by a parsed settings value. use std::env::{self, VarError}; -use std::ffi::{OsStr, OsString}; +use std::ffi::OsStr; /// `std::env::var`: the text of an environment variable. #[inline] pub(crate) fn var>(key: K) -> Result { env::var(key) } - -/// `std::env::var_os`: an environment variable that may not be valid text. -#[inline] -pub(crate) fn var_os>(key: K) -> Option { - env::var_os(key) -} diff --git a/crates/model-format/src/settings.rs b/crates/model-format/src/settings.rs index 61f08a18..24f8d322 100644 --- a/crates/model-format/src/settings.rs +++ b/crates/model-format/src/settings.rs @@ -1,17 +1,11 @@ //! The only place of this crate that reads the process environment (`env-read` ratchet of `architecture.json`). -//! The reads keep their call sites and their parsing; a later step replaces these two functions by a parsed settings value. +//! The reads keep their call sites and their parsing; a later step replaces these functions by a parsed settings value. use std::env::{self, VarError}; -use std::ffi::{OsStr, OsString}; +use std::ffi::OsStr; /// `std::env::var`: the text of an environment variable. #[inline] pub(crate) fn var>(key: K) -> Result { env::var(key) } - -/// `std::env::var_os`: an environment variable that may not be valid text. -#[inline] -pub(crate) fn var_os>(key: K) -> Option { - env::var_os(key) -} diff --git a/crates/native-cpu-expert/src/settings.rs b/crates/native-cpu-expert/src/settings.rs index 61f08a18..4ce948db 100644 --- a/crates/native-cpu-expert/src/settings.rs +++ b/crates/native-cpu-expert/src/settings.rs @@ -1,5 +1,5 @@ //! The only place of this crate that reads the process environment (`env-read` ratchet of `architecture.json`). -//! The reads keep their call sites and their parsing; a later step replaces these two functions by a parsed settings value. +//! The reads keep their call sites and their parsing; a later step replaces these functions by a parsed settings value. use std::env::{self, VarError}; use std::ffi::{OsStr, OsString}; diff --git a/scripts/dev/explicit_imports.py b/scripts/dev/explicit_imports.py index a89053df..385c15e1 100644 --- a/scripts/dev/explicit_imports.py +++ b/scripts/dev/explicit_imports.py @@ -19,6 +19,7 @@ import shutil import subprocess import sys import tempfile +import time sys.path.insert(0, str(pathlib.Path(__file__).parent)) from rust_modtree import IDENT, OPAQUE, Crate, _attribute_end, _skip_balanced, cfg_exprs, statements, strip_code # noqa: E402 @@ -49,8 +50,21 @@ RUSTFMT = shutil.which("rustfmt") or "rustfmt" WORK = pathlib.Path(tempfile.gettempdir()) / "explicit-imports" +def wait_for_gpu_idle(wt): + """The laptop is also the GPU test machine: no build starts while its wanted flag or run lock exists.""" + common = subprocess.run( + ["git", "rev-parse", "--git-common-dir"], cwd=wt, capture_output=True, text=True, check=False + ).stdout.strip() + git_dir = (pathlib.Path(wt) / common).resolve() + names = ("laptop-gpu-wanted.flag", "laptop-gpu-run.lock") + while any((git_dir / n).exists() for n in names): + print(" GPU stretch wanted or running: build paused", flush=True) + time.sleep(60) + + def run_cargo(wt, args, out_name): """Messages of `cargo check --message-format=json ARGS` run in `wt`; the log is kept in WORK.""" + wait_for_gpu_idle(wt) WORK.mkdir(parents=True, exist_ok=True) out = WORK / (pathlib.Path(wt).resolve().name + "-" + out_name) check = ["check", "--message-format=json"] + args.split() diff --git a/scripts/dev/funnel_env_reads.py b/scripts/dev/funnel_env_reads.py index 1ca62a25..3cfc5648 100644 --- a/scripts/dev/funnel_env_reads.py +++ b/scripts/dev/funnel_env_reads.py @@ -12,7 +12,7 @@ import re import sys SETTINGS = '''//! The only place of this crate that reads the process environment (`env-read` ratchet of `architecture.json`). -//! The reads keep their call sites and their parsing; a later step replaces these two functions by a parsed settings value. +//! The reads keep their call sites and their parsing; a later step replaces these functions by a parsed settings value. use std::env::{self, VarError}; use std::ffi::{OsStr, OsString};