Scripts: paths of moved Rust files updated (update_path_refs.py)
This commit is contained in:
@@ -151,7 +151,7 @@ required = {
|
||||
),
|
||||
}
|
||||
|
||||
symbols = (Path.cwd() / 'crates/cuda-driver/src/mtp_original_full_symbols.rs').read_text(encoding='utf-8')
|
||||
symbols = (Path.cwd() / 'crates/cuda-driver/src/mtp_dense_kv/original_int8/prefill/scalar/full_forward/symbols.rs').read_text(encoding='utf-8')
|
||||
for asset, exports in __import__('re').findall(r'include_bytes!\(\"([^\"]+\.ptx)\"\).*?&\[(.*?)\]\)', symbols, __import__('re').S):
|
||||
required[asset] = tuple(__import__('re').findall(r'c\"([^\"]+)\"', exports))
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import re
|
||||
import sys
|
||||
|
||||
ptx = "crates/cuda-driver/src/chain_window.ptx"
|
||||
rs = "crates/cuda-driver/src/original_verify_window_chain.rs"
|
||||
rs = "crates/cuda-driver/src/original_verify/chain.rs"
|
||||
with open(ptx, "w", newline="\n") as f:
|
||||
f.write("// UNSEALED placeholder: chain_window.ptx (compile_assets.py / seal_pins.py install the real PTX)\n")
|
||||
s = open(rs, newline="").read()
|
||||
|
||||
@@ -5,7 +5,7 @@ import sys
|
||||
|
||||
name = sys.argv[1]
|
||||
ptx = f"crates/cuda-driver/src/{name}.ptx"
|
||||
rs = "crates/cuda-driver/src/original_verify_window_sm120.rs"
|
||||
rs = "crates/cuda-driver/src/original_verify/sm120.rs"
|
||||
with open(ptx, "w", newline="\n") as f:
|
||||
f.write(f"// UNSEALED placeholder: {name}.ptx (compile_assets.py / seal_pins.py install the real PTX)\n")
|
||||
s = open(rs, newline="").read()
|
||||
|
||||
@@ -80,7 +80,7 @@ class Asset:
|
||||
atomic_group: Optional[str] = None # all members must be sealed together
|
||||
notes: List[str] = field(default_factory=list)
|
||||
seal_fields: bool = False # the plan entry carries seal_sha256/seal_length slots to fill
|
||||
entries_from_symbols: bool = False # entry names live in crates/cuda-driver/src/mtp_original_full_symbols.rs
|
||||
entries_from_symbols: bool = False # entry names live in crates/cuda-driver/src/mtp_dense_kv/original_int8/prefill/scalar/full_forward/symbols.rs
|
||||
flag_overrides: List[str] = field(default_factory=list) # operator overrides applied (recorded in the manifest)
|
||||
|
||||
@property
|
||||
@@ -269,9 +269,9 @@ ROPE_FASTMATH_SOURCES = ("qsa_prompt_indexer", "qsa_decode_postops")
|
||||
# decimal-pin hits expected in the Rust tree for the committed digests (found by scanning, see seal_pins)
|
||||
ROPE_REPIN_EXPECT = {
|
||||
"qsa_prompt_indexer": {},
|
||||
"qsa_prompt_postops": {"crates/cuda-driver/src/original_verify_window_qsa.rs": 1},
|
||||
"qsa_decode_postops": {"crates/cuda-driver/src/original_verify_window_qsa.rs": 1},
|
||||
"qsa_prompt_resolver": {"crates/cuda-driver/src/original_verify_window_qsa.rs": 1},
|
||||
"qsa_prompt_postops": {"crates/cuda-driver/src/original_verify/qsa.rs": 1},
|
||||
"qsa_decode_postops": {"crates/cuda-driver/src/original_verify/qsa.rs": 1},
|
||||
"qsa_prompt_resolver": {"crates/cuda-driver/src/original_verify/qsa.rs": 1},
|
||||
}
|
||||
# hex pins in the window plan (sealed_assets_bound)
|
||||
ROPE_HEX_DOC = "docs/cuda-seal-plan-additions-window.json"
|
||||
@@ -577,7 +577,7 @@ def fill_derived_entries(root: Path, asset: Asset) -> None:
|
||||
asset.entries_derived = True
|
||||
|
||||
|
||||
SYMBOLS_FILE = "crates/cuda-driver/src/mtp_original_full_symbols.rs"
|
||||
SYMBOLS_FILE = "crates/cuda-driver/src/mtp_dense_kv/original_int8/prefill/scalar/full_forward/symbols.rs"
|
||||
|
||||
|
||||
def _symbols_text(root: Path) -> str:
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
"atomic_group": "reseal-fastmath",
|
||||
"mandatory": true,
|
||||
"repin_expect": {
|
||||
"crates/cuda-driver/src/original_verify_window_proj.rs": 1
|
||||
"crates/cuda-driver/src/original_verify/proj.rs": 1
|
||||
},
|
||||
"include_profile": "standard",
|
||||
"entries_from_symbols": true
|
||||
@@ -195,7 +195,7 @@
|
||||
"atomic_group": "reseal-fastmath",
|
||||
"mandatory": true,
|
||||
"repin_expect": {
|
||||
"crates/cuda-driver/src/original_verify_window_moe.rs": 1
|
||||
"crates/cuda-driver/src/original_verify/moe.rs": 1
|
||||
},
|
||||
"include_profile": "standard",
|
||||
"entries_from_symbols": true
|
||||
@@ -217,7 +217,7 @@
|
||||
"atomic_group": "reseal-fastmath",
|
||||
"mandatory": true,
|
||||
"repin_expect": {
|
||||
"crates/cuda-driver/src/original_verify_window_gr.rs": 1
|
||||
"crates/cuda-driver/src/original_verify/gr.rs": 1
|
||||
},
|
||||
"include_profile": "standard",
|
||||
"entries_from_symbols": true
|
||||
@@ -239,7 +239,7 @@
|
||||
"atomic_group": "reseal-fastmath",
|
||||
"mandatory": true,
|
||||
"repin_expect": {
|
||||
"crates/cuda-driver/src/original_verify_window_gr.rs": 1
|
||||
"crates/cuda-driver/src/original_verify/gr.rs": 1
|
||||
},
|
||||
"include_profile": "standard",
|
||||
"entries_from_symbols": true
|
||||
@@ -259,7 +259,7 @@
|
||||
"atomic_group": "reseal-fastmath",
|
||||
"mandatory": true,
|
||||
"repin_expect": {
|
||||
"crates/cuda-driver/src/original_verify_window_gr.rs": 1,
|
||||
"crates/cuda-driver/src/original_verify/gr.rs": 1,
|
||||
"crates/cuda-driver/src/ple_batch_queue.rs": 1
|
||||
},
|
||||
"rust_fields_to_fill": {
|
||||
@@ -760,7 +760,7 @@
|
||||
"group": "chain-window",
|
||||
"optional": false,
|
||||
"repin_expect": {
|
||||
"crates/cuda-driver/src/original_verify_window_chain.rs": 1
|
||||
"crates/cuda-driver/src/original_verify/chain.rs": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -898,7 +898,7 @@
|
||||
],
|
||||
"encoding": "concat_include_str",
|
||||
"rust_fields_to_fill": {
|
||||
"crates/cuda-driver/src/original_verify/original_verify_window_down.rs": [
|
||||
"crates/cuda-driver/src/original_verify/down.rs": [
|
||||
"DOWN_SUB16.sha"
|
||||
]
|
||||
},
|
||||
@@ -1021,7 +1021,7 @@
|
||||
],
|
||||
"encoding": "concat_include_str",
|
||||
"rust_fields_to_fill": {
|
||||
"crates/cuda-driver/src/original_verify_window_qsa/fused_prelude.rs": [
|
||||
"crates/cuda-driver/src/original_verify/qsa/fused_prelude.rs": [
|
||||
"KV_ROWS.sha"
|
||||
]
|
||||
},
|
||||
@@ -1046,7 +1046,7 @@
|
||||
],
|
||||
"encoding": "concat_include_str",
|
||||
"rust_fields_to_fill": {
|
||||
"crates/cuda-driver/src/original_verify_window_qsa/fused_prelude.rs": [
|
||||
"crates/cuda-driver/src/original_verify/qsa/fused_prelude.rs": [
|
||||
"INDEX_ROWS.sha"
|
||||
]
|
||||
},
|
||||
@@ -1128,7 +1128,7 @@
|
||||
],
|
||||
"encoding": "concat_include_str",
|
||||
"rust_fields_to_fill": {
|
||||
"crates/cuda-driver/src/original_verify_window_ops/wait_rows.rs": [
|
||||
"crates/cuda-driver/src/original_verify/window_ops/wait_rows.rs": [
|
||||
"WAIT_COPY_ROWS.sha"
|
||||
]
|
||||
},
|
||||
@@ -1177,7 +1177,7 @@
|
||||
],
|
||||
"encoding": "concat_include_str",
|
||||
"rust_fields_to_fill": {
|
||||
"crates/cuda-driver/src/original_verify_window_gr/fused_down.rs": [
|
||||
"crates/cuda-driver/src/original_verify/gr/fused_down.rs": [
|
||||
"GR_DOWN_FUSED.sha"
|
||||
]
|
||||
},
|
||||
@@ -1203,7 +1203,7 @@
|
||||
],
|
||||
"encoding": "concat_include_str",
|
||||
"rust_fields_to_fill": {
|
||||
"crates/cuda-driver/src/original_verify_window_gr/head_chain.rs": [
|
||||
"crates/cuda-driver/src/original_verify/gr/head_chain.rs": [
|
||||
"HEAD_CHAIN.sha"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -334,7 +334,7 @@ class RustPinForms(unittest.TestCase):
|
||||
self.assertTrue(R.read_field(t, s, V), (name, s))
|
||||
|
||||
def test_already_sealed_consumers_are_recognised_as_resealable(self):
|
||||
t = (REPO / "crates/cuda-driver/src/gdn_fused_t1.rs").read_text()
|
||||
t = (REPO / "crates/cuda-driver/src/qwen_dispatch/gdn_fused_t1.rs").read_text()
|
||||
t2 = R.apply_field(R.apply_field(t, "FUSED_PTX_LEN", V), "FUSED_PTX_SHA256", V)
|
||||
self.assertEqual(R.read_plain(t2, "FUSED_PTX_LEN"), 1234)
|
||||
self.assertNotEqual(t, t2)
|
||||
@@ -611,7 +611,7 @@ class RealTreeFakeSeal(unittest.TestCase):
|
||||
queue = (scratch / "crates/cuda-driver/src/ple_batch_queue.rs").read_text()
|
||||
self.assertEqual(R.read_plain(queue, "PTX_BYTES"), ple["raw_bytes"])
|
||||
self.assertEqual(R.read_plain(queue, "PTX_SHA256"), bytes.fromhex(ple["raw_sha256"]))
|
||||
gr = (scratch / "crates/cuda-driver/src/original_verify_window_gr.rs").read_text()
|
||||
gr = (scratch / "crates/cuda-driver/src/original_verify/gr.rs").read_text()
|
||||
self.assertEqual(len(R.find_decimal_pins(gr, bytes.fromhex(ple["raw_sha256"]))), 1)
|
||||
# idempotent on the second run of identical output
|
||||
code, _, err = run_quiet(S.main, ["--ptx-dir", str(out), "--root", str(scratch), "--allow-fake", "--write",
|
||||
|
||||
Reference in New Issue
Block a user