From 2190641e1c9d0c10ff3d8204b04262498ec2b8e8 Mon Sep 17 00:00:00 2001 From: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com> Date: Sat, 14 Nov 2026 02:52:57 -0500 Subject: [PATCH 1/2] Build: the Model L switch (--model-l, off by default) and the D3D12 kernel sets clean/runner/build.py --model-l: Model L's runtime sources with WG_MODEL_L, its code objects (l_swin, l_ops, l_post, l_enc_values, as l_c32_check.compile_kernels builds them) and preset-L.v1.map.json built into the runtime library; with --runtime-only and --rocm its code objects are built first for every target. clean/dx12/build_dx12.py --model-l: Model L's D3D12 kernels (co=l_*.co, and dec1's standalone block, which only Model L launches) in the manifest; without it they are left out unless --only names them. --list prints the kernel set of a build without compiling anything. kernel_sets.json and tests/test_kernel_sets.py: the declared sets (Model M's, and what --model-l adds), checked in seconds before any build. Without the option both builds are Model M's: the same Model M kernels; the default D3D12 manifest no longer carries Model L's kernels. Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com> --- clean/dx12/build_dx12.py | 42 ++++- clean/dx12/kernel_sets.json | 246 +++++++++++++++++++++++++++ clean/dx12/tests/test_kernel_sets.py | 58 +++++++ clean/runner/build.py | 62 ++++++- 4 files changed, 405 insertions(+), 3 deletions(-) create mode 100644 clean/dx12/kernel_sets.json create mode 100644 clean/dx12/tests/test_kernel_sets.py diff --git a/clean/dx12/build_dx12.py b/clean/dx12/build_dx12.py index 03617313..8724de43 100644 --- a/clean/dx12/build_dx12.py +++ b/clean/dx12/build_dx12.py @@ -2,7 +2,10 @@ """Builds the D3D12 ports of the HIP kernels (clean/dx12/kernels/*.hlsl) for the hybrid device backend (runtime backend 2, clean/runtime/device_dx12.cpp): /dx12/__.dxil (or .dxil without a tag) + /dx12/manifest.json. - python clean/dx12/build_dx12.py --out build/dx12-m/hip [--isa] [--only exposure_auto_diet,...] [-j N] + python clean/dx12/build_dx12.py --out build/dx12-m/hip [--isa] [--only exposure_auto_diet,...] [-j N] [--model-l] + +Model L's kernels (#89: those that reproduce one of Model L's code objects, co=l_*.co, and MODEL_L_ONLY) are built only with --model-l +or when --only names them, so that a build without the option is Model M's kernel set unchanged. Every kernel source declares its kernels in header lines (clean/dx12/README.md): @@ -172,6 +175,29 @@ def kernel_decls(path): return decls +# Kernels of Model M's code objects that only Model L's frame launches (#89): dec1 as a standalone block (#139; +# Model M runs dec1 fused with dec0). +MODEL_L_ONLY = {"swin_block_c64_add_ex_nc"} + + +def is_model_l(decl): + """A port of one of Model L's code objects (#89: l_swin.co, l_ops.co, l_post.co, l_enc_values.co), or a kernel only + Model L launches (MODEL_L_ONLY).""" + return decl["co"].startswith("l_") or decl["name"] in MODEL_L_ONLY + + +def kernel_set(model_l=False): + """(name, code object) of every kernel a full build compiles (no --only), sorted: Model M's set, plus Model L's + with model_l. From the sources' declarations alone (nothing is compiled).""" + keys = set() + for fn in sorted(os.listdir(KERNEL_DIR)) if os.path.isdir(KERNEL_DIR) else []: + if fn.endswith(".hlsl"): + for d in kernel_decls(os.path.join(KERNEL_DIR, fn)): + if model_l or not is_model_l(d): + keys.add((d["name"], d["co"])) + return sorted(keys) + + def arg_dwords(args, where): n = 0 for a in args.split(","): @@ -252,13 +278,23 @@ def vgpr_check(built): def main(argv=None): ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) - ap.add_argument("--out", required=True, help="build directory of the runtime (kernels go to /dx12)") + ap.add_argument("--out", help="build directory of the runtime (kernels go to /dx12); required unless --list") ap.add_argument("--only", help="comma list of kernel names to build (default: all declared)") ap.add_argument("--isa", action="store_true", help="also write the D3D12 ISA (RGA) to /dx12/isa") ap.add_argument("--listing", action="store_true", help="also keep the rewritten DXIL listing (.ll)") ap.add_argument("-j", "--jobs", type=int, default=int(os.environ.get("WG_DX12_JOBS", min(12, os.cpu_count() or 1))), help="kernels compiled in parallel (default min(12, CPUs), env WG_DX12_JOBS; 1 = one at a time)") + ap.add_argument("--model-l", action="store_true", + help="also build Model L's kernels (co=l_*.co; off by default: Model M's kernel set unchanged)") + ap.add_argument("--list", action="store_true", + help="print the kernels a build with these options compiles (name and code object, JSON) and exit: " + "the cheap check before a build (kernel_sets.json, tests/test_kernel_sets.py)") a = ap.parse_args(argv) + if a.list: + print(json.dumps([list(k) for k in kernel_set(a.model_l)], indent=1)) + return 0 + if not a.out: + ap.error("--out is required") dst = os.path.join(a.out, "dx12") os.makedirs(dst, exist_ok=True) asm = build_asm_tool(a.out) @@ -283,6 +319,8 @@ def main(argv=None): for d in kernel_decls(src): if only and d["name"] not in only: continue + if not only and not a.model_l and is_model_l(d): + continue key = (d["name"], d["co"]) if key in kernels and key not in old: raise SystemExit(f"kernel {d['name']} ({d['co']}) declared twice") diff --git a/clean/dx12/kernel_sets.json b/clean/dx12/kernel_sets.json new file mode 100644 index 00000000..fdf990ce --- /dev/null +++ b/clean/dx12/kernel_sets.json @@ -0,0 +1,246 @@ +{ + "model_m": [ + [ + "bneck/swin_bneck6_mb_nc", + "swin__bmegahg.co" + ], + [ + "bneck/swin_bneck6_mbo_nc", + "swin__bmegahg.co" + ], + [ + "bneck/swin_bneck6_nc", + "swin__bmegahg.co" + ], + [ + "color_divide", + "frame.co" + ], + [ + "d1p12/swin_block_c64_add_dec0_nc", + "dec1_dec0__pack12.co" + ], + [ + "d1p12/swin_block_c64_add_dec0_xd_nc", + "dec1_dec0__pack12.co" + ], + [ + "emo/input_encoder_mo", + "encoder_mo.co" + ], + [ + "emo/input_encoder_mo_direct", + "encoder_mo.co" + ], + [ + "expand_c96", + "swin.co" + ], + [ + "exposure_auto_diet", + "exposure.co" + ], + [ + "exposure_auto_diet_direct", + "exposure.co" + ], + [ + "exposure_pair_diet", + "exposure.co" + ], + [ + "exposure_pair_diet_direct", + "exposure.co" + ], + [ + "f16lut_build_direct", + "-" + ], + [ + "input_encoder", + "encoder.co" + ], + [ + "input_encoder_direct", + "encoder.co" + ], + [ + "native_driver_probe", + "-" + ], + [ + "native_fill", + "-" + ], + [ + "patch_merge_c64", + "swin.co" + ], + [ + "patch_merge_c96", + "swin.co" + ], + [ + "pmo/post_tf4_dl_f32_p12_mo", + "post_mo_w64__orig.co" + ], + [ + "pmo/post_tf4_dl_f32_p12_mo_direct", + "post_mo_w64__orig.co" + ], + [ + "pmo/post_tf_f32_p12_mo", + "post_mo_w64__orig.co" + ], + [ + "pmo/post_tf_f32_p12_mo_direct", + "post_mo_w64__orig.co" + ], + [ + "scale_rgb", + "frame.co" + ], + [ + "swin_block_c64_nc", + "swin.co" + ], + [ + "swin_block_c96_add_ex_nc", + "swin.co" + ], + [ + "swin_block_c96_add_xe_nc", + "swin.co" + ], + [ + "swin_block_c96_add_xe_rev_nc", + "swin.co" + ], + [ + "swin_block_c96_add_xe_xd_nc", + "swin.co" + ], + [ + "swin_block_c96_add_xe_xo_nc", + "swin.co" + ], + [ + "swin_block_c96_nc", + "swin.co" + ], + [ + "swin_block_c96_pm_nc", + "swin.co" + ], + [ + "swin_block_c96_pm_rev_nc", + "swin.co" + ], + [ + "timing_barrier", + "frame.co" + ], + [ + "w64/post_filter_c1_s4", + "post_w64.co" + ], + [ + "w64/post_tf4_dl_f32_p12_diet_vsit", + "post_w64.co" + ], + [ + "w64/post_tf4_dl_f32_p12_diet_vsit", + "post_w64__orig.co" + ], + [ + "w64/post_tf4_dl_f32_p12_diet_vsit_direct", + "post_w64.co" + ], + [ + "w64/post_tf4_dl_f32_p12_diet_vsit_direct", + "post_w64__orig.co" + ], + [ + "w64/post_tf_f32_p12_diet_vsit", + "post_w64.co" + ], + [ + "w64/post_tf_f32_p12_diet_vsit", + "post_w64__orig.co" + ], + [ + "w64/post_tf_f32_p12_diet_vsit_direct", + "post_w64.co" + ], + [ + "w64/post_tf_f32_p12_diet_vsit_direct", + "post_w64__orig.co" + ], + [ + "w64/post_tf_p12_diet_vsit", + "post_w64__orig.co" + ], + [ + "w64/post_tf_p12_diet_vsit_tex", + "post_w64__orig.co" + ] + ], + "model_l": [ + [ + "l_coef", + "l_ops.co" + ], + [ + "l_coef_pack12", + "l_ops.co" + ], + [ + "l_dec_project", + "l_ops.co" + ], + [ + "l_linear_32_32_f16", + "l_ops.co" + ], + [ + "l_linear_32_32_relu", + "l_ops.co" + ], + [ + "l_post_recon", + "l_post.co" + ], + [ + "l_post_recon_p12", + "l_post.co" + ], + [ + "l_project_gather", + "l_ops.co" + ], + [ + "l_swin_block_c32_dec_nc", + "l_swin.co" + ], + [ + "l_swin_block_c32_enc_nc", + "l_swin.co" + ], + [ + "l_swin_block_c32_nc", + "l_swin.co" + ], + [ + "lev/input_encoder", + "l_enc_values.co" + ], + [ + "lev/input_encoder_direct", + "l_enc_values.co" + ], + [ + "swin_block_c64_add_ex_nc", + "swin.co" + ] + ] +} diff --git a/clean/dx12/tests/test_kernel_sets.py b/clean/dx12/tests/test_kernel_sets.py new file mode 100644 index 00000000..bdc446a5 --- /dev/null +++ b/clean/dx12/tests/test_kernel_sets.py @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: MIT +"""The D3D12 kernel sets, from the sources' declarations (clean/dx12/build_dx12.py kernel_set; nothing is compiled): +the cheap check before a build, in seconds. kernel_sets.json lists them: "model_m" = what a build without --model-l +compiles (Model M's kernel set; Model L's kernels never enter it), "model_l" = what --model-l adds (#89). + +A kernel added, removed or moved between the sets changes kernel_sets.json in the same change; regenerate it with + python clean/dx12/tests/test_kernel_sets.py --write +and review the difference.""" +import json +import os +import sys +import unittest + +HERE = os.path.dirname(os.path.abspath(__file__)) +DX12 = os.path.dirname(HERE) +sys.path.insert(0, DX12) +import build_dx12 as B # noqa: E402 + +SETS = os.path.join(DX12, "kernel_sets.json") + + +def current(): + m = B.kernel_set(False) + full = B.kernel_set(True) + return {"model_m": [list(k) for k in m], "model_l": [list(k) for k in full if k not in set(m)]} + + +class TestKernelSets(unittest.TestCase): + def test_sets_match_the_list(self): + with open(SETS) as f: + want = json.load(f) + got = current() + for name in ("model_m", "model_l"): + w, g = set(map(tuple, want[name])), set(map(tuple, got[name])) + self.assertEqual(g, w, "%s: added %s, removed %s (update kernel_sets.json: python " + "clean/dx12/tests/test_kernel_sets.py --write)" % (name, sorted(g - w), sorted(w - g))) + + def test_model_m_has_no_model_l_kernel(self): + m = B.kernel_set(False) + self.assertFalse([k for k in m if k[1].startswith("l_") or k[0] in B.MODEL_L_ONLY]) + self.assertTrue(m) + + def test_model_l_adds_only_model_l_kernels(self): + m, full = set(B.kernel_set(False)), set(B.kernel_set(True)) + self.assertTrue(m <= full) + extra = full - m + self.assertTrue(extra) + self.assertFalse([k for k in extra if not (k[1].startswith("l_") or k[0] in B.MODEL_L_ONLY)]) + + +if __name__ == "__main__": + if "--write" in sys.argv: + with open(SETS, "w", newline="\n") as f: + json.dump(current(), f, indent=1) + f.write("\n") + print("wrote", SETS) + else: + unittest.main() diff --git a/clean/runner/build.py b/clean/runner/build.py index ee274b60..90edd82f 100644 --- a/clean/runner/build.py +++ b/clean/runner/build.py @@ -73,6 +73,49 @@ } MODELS_BUILT = {name: True for name in OPTIONAL_MODELS} +# Model L (#89) in the runtime library: OFF by default (--model-l turns it on), so that a build without the option is +# Model M's build unchanged. On: Model L's runtime sources (clean/l/runtime) compiled with -DWG_MODEL_L +# (model_select.h model_l_built), its code objects (clean/l/runner/l_c32_check.py compile_kernels: l_swin, l_ops, +# l_post from clean/l/kernels, l_enc_values = encoder.hip with WG_ENC_VALUES_OUT=1) and its map built in. The D3D12 +# ports of Model L's kernels are built by clean/dx12/build_dx12.py --model-l. +MODEL_L = False +L_RUNTIME_SOURCES = [os.path.join("..", "l", "runtime", "l_model.cpp"), os.path.join("..", "l", "runtime", "l_pack.cpp")] +L_MAP_FILE = os.path.join(os.path.dirname(os.path.dirname(HERE)), "data", "preset-L.v1.map.json") +L_KERNEL_DIR = os.path.join(os.path.dirname(HERE), "l", "kernels") +L_CODE_OBJECTS = ["l_swin.co", "l_ops.co", "l_post.co", "l_enc_values.co"] +L_EMBED_FILES = L_CODE_OBJECTS + [os.path.basename(L_MAP_FILE)] + + +def set_model_l(on): + """Model L in or out (default) of the runtime library; changes RUNTIME_SOURCES and EMBED_FILES in place.""" + global MODEL_L + if bool(on) == MODEL_L: + return + MODEL_L = bool(on) + if on: + RUNTIME_SOURCES[:] = RUNTIME_SOURCES + L_RUNTIME_SOURCES + EMBED_FILES[:] = EMBED_FILES + L_EMBED_FILES + else: + RUNTIME_SOURCES[:] = [s for s in RUNTIME_SOURCES if s not in L_RUNTIME_SOURCES] + EMBED_FILES[:] = [n for n in EMBED_FILES if n not in L_EMBED_FILES] + + +def build_device_l(clang, rocm, out_dir, device_libs=True, report=False, arch=None): + """Model L's code objects into out_dir (as clean/l/runner/l_c32_check.py compile_kernels builds them), for `arch` + (default ARCH).""" + global ARCH + saved = ARCH + ARCH = arch or ARCH + try: + os.makedirs(out_dir, exist_ok=True) + for name in ("l_swin", "l_ops", "l_post"): + run(device_command(clang, rocm, os.path.join(L_KERNEL_DIR, name + ".hip"), os.path.join(out_dir, name + ".co"), + device_libs=device_libs, report=report, extra=["-I", KERNEL_DIR])) + run(device_command(clang, rocm, os.path.join(KERNEL_DIR, "encoder.hip"), os.path.join(out_dir, "l_enc_values.co"), + device_libs=device_libs, report=report, defines={"WG_ENC_VALUES_OUT": 1})) + finally: + ARCH = saved + def model_built(name): """An optional model is part of this build (OPTIONAL_MODELS).""" @@ -260,6 +303,8 @@ def runtime_command(cxx, out, embedded=None): for name, m in OPTIONAL_MODELS.items(): if not MODELS_BUILT[name]: cmd += ["-D" + m["define"]] + if MODEL_L: + cmd += ["-DWG_MODEL_L"] cmd += srcs if RR_OBJECTS and sys.platform == "win32": # release 0.6.0 (owner 2026-11-02: one runtime DLL, "just like before"): the RR runtime (clean/rr_f/runtime, built by @@ -280,7 +325,8 @@ def runtime_command(cxx, out, embedded=None): def build_runtime(cxx, out_dir, embed=True): - for m in [MAP_FILE] + [o["map"] for name, o in OPTIONAL_MODELS.items() if MODELS_BUILT[name]]: + for m in [MAP_FILE] + [o["map"] for name, o in OPTIONAL_MODELS.items() if MODELS_BUILT[name]] + \ + ([L_MAP_FILE] if MODEL_L else []): shutil.copyfile(m, os.path.join(out_dir, os.path.basename(m))) embedded = write_embedded(out_dir) if embed else None run(runtime_command(cxx, os.path.join(out_dir, runtime_library_name()), embedded)) @@ -416,9 +462,14 @@ def main(argv=None): "library: one wronggpu_runtime.dll with the Model M and the RR interfaces (release 0.6.0)") for name, m in OPTIONAL_MODELS.items(): # --no-model-k, ... ap.add_argument("--no-model-" + name.lower(), action="store_true", help=m["help"]) + ap.add_argument("--model-l", action="store_true", + help="Model L in the runtime library (#89; off by default): its runtime sources with WG_MODEL_L, its " + "code objects and its map built in (with --runtime-only and --rocm its code objects are built " + "first, for every target); its D3D12 kernels come from clean/dx12/build_dx12.py --model-l") args = ap.parse_args(argv) for name in OPTIONAL_MODELS: set_model(name, not getattr(args, "no_model_" + name.lower())) + set_model_l(args.model_l) global RR_OBJECTS RR_OBJECTS = args.with_rr if args.payload: @@ -430,6 +481,12 @@ def main(argv=None): if any(a not in ("gfx1200", "gfx1201") for a in [ARCH] + EXTRA_ARCHS): raise SystemExit("supported release targets are gfx1200 and gfx1201 only") if args.runtime_only: + if MODEL_L and args.rocm: # Model L's code objects next to the given ones (release builds reuse pinned ones) + clang = args.clang or find_clang(args.rocm) + build_device_l(clang, args.rocm, args.out, device_libs=not args.no_device_libs) + for arch in EXTRA_ARCHS: + build_device_l(clang, args.rocm, os.path.join(args.out, arch), device_libs=not args.no_device_libs, + arch=arch) build_runtime(args.runtime_cxx or find_host_cxx(args.rocm), args.out, embed=not args.no_embed) return if args.motion_outres_only: @@ -463,6 +520,8 @@ def main(argv=None): for name, m in OPTIONAL_MODELS.items(): # the optional models' kernels (model K: clean/k) if MODELS_BUILT[name]: m["build_device"](clang, args.rocm, args.out, device_libs=not args.no_device_libs, report=args.report) + if MODEL_L: # Model L's kernels (clean/l/kernels; off by default) + build_device_l(clang, args.rocm, args.out, device_libs=not args.no_device_libs, report=args.report) # the post kernels in wave64 as well (the runtime's default post code object; post.co for WG_POST_WAVE=32) # (always with the resource report: POST_W64_GATE; skipped for experiment builds with --define) run_post_w64(device_command(clang, args.rocm, os.path.join(KERNEL_DIR, "post.hip"), @@ -560,6 +619,7 @@ def main(argv=None): sub += (["--rocm", args.rocm] if args.rocm else []) + (["--clang", args.clang] if args.clang else []) sub += (["--no-device-libs"] if args.no_device_libs else []) + (["--soft-fp8"] if args.soft_fp8 else []) sub += ["--no-model-" + n.lower() for n in OPTIONAL_MODELS if getattr(args, "no_model_" + n.lower())] + sub += ["--model-l"] if MODEL_L else [] for d in args.define: sub += ["--define", d] print(f"-- code objects for {arch}", flush=True) From 3490f044912decd0b30085b05ce50bdaedc0ed82 Mon Sep 17 00:00:00 2001 From: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com> Date: Sat, 14 Nov 2026 05:35:39 -0500 Subject: [PATCH 2/2] Build: Model L's direct-route kernels (co "-", named l_*) belong to the Model L set l_linear_32_32_fused (#160) and l_swin_block_c32_dec_coef12_nc (#159) have no HIP code object, so the co test alone put them in Model M's set. Model M's set is unchanged (46); Model L's set is 16. kernel_sets.json regenerated; the profile tool's docstring names --model-l. Refs #89 Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com> --- clean/dx12/build_dx12.py | 8 ++++---- clean/dx12/kernel_sets.json | 8 ++++++++ clean/dx12/tests/test_kernel_sets.py | 4 ++-- clean/l/runner/l_d3d12_profile.py | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/clean/dx12/build_dx12.py b/clean/dx12/build_dx12.py index 8724de43..6b951950 100644 --- a/clean/dx12/build_dx12.py +++ b/clean/dx12/build_dx12.py @@ -4,7 +4,7 @@ python clean/dx12/build_dx12.py --out build/dx12-m/hip [--isa] [--only exposure_auto_diet,...] [-j N] [--model-l] -Model L's kernels (#89: those that reproduce one of Model L's code objects, co=l_*.co, and MODEL_L_ONLY) are built only with --model-l +Model L's kernels (#89: those that reproduce one of Model L's code objects, co=l_*.co, direct-route kernels named l_*, and MODEL_L_ONLY) are built only with --model-l or when --only names them, so that a build without the option is Model M's kernel set unchanged. Every kernel source declares its kernels in header lines (clean/dx12/README.md): @@ -181,9 +181,9 @@ def kernel_decls(path): def is_model_l(decl): - """A port of one of Model L's code objects (#89: l_swin.co, l_ops.co, l_post.co, l_enc_values.co), or a kernel only - Model L launches (MODEL_L_ONLY).""" - return decl["co"].startswith("l_") or decl["name"] in MODEL_L_ONLY + """A port of one of Model L's code objects (#89: l_swin.co, l_ops.co, l_post.co, l_enc_values.co), a Model L kernel + of the direct route with no code object (co "-", named l_*), or a kernel only Model L launches (MODEL_L_ONLY).""" + return decl["co"].startswith("l_") or decl["name"].startswith("l_") or decl["name"] in MODEL_L_ONLY def kernel_set(model_l=False): diff --git a/clean/dx12/kernel_sets.json b/clean/dx12/kernel_sets.json index fdf990ce..9c62b5d9 100644 --- a/clean/dx12/kernel_sets.json +++ b/clean/dx12/kernel_sets.json @@ -202,6 +202,10 @@ "l_linear_32_32_f16", "l_ops.co" ], + [ + "l_linear_32_32_fused", + "-" + ], [ "l_linear_32_32_relu", "l_ops.co" @@ -218,6 +222,10 @@ "l_project_gather", "l_ops.co" ], + [ + "l_swin_block_c32_dec_coef12_nc", + "-" + ], [ "l_swin_block_c32_dec_nc", "l_swin.co" diff --git a/clean/dx12/tests/test_kernel_sets.py b/clean/dx12/tests/test_kernel_sets.py index bdc446a5..bdb87aa8 100644 --- a/clean/dx12/tests/test_kernel_sets.py +++ b/clean/dx12/tests/test_kernel_sets.py @@ -37,7 +37,7 @@ def test_sets_match_the_list(self): def test_model_m_has_no_model_l_kernel(self): m = B.kernel_set(False) - self.assertFalse([k for k in m if k[1].startswith("l_") or k[0] in B.MODEL_L_ONLY]) + self.assertFalse([k for k in m if k[1].startswith("l_") or k[0].startswith("l_") or k[0] in B.MODEL_L_ONLY]) self.assertTrue(m) def test_model_l_adds_only_model_l_kernels(self): @@ -45,7 +45,7 @@ def test_model_l_adds_only_model_l_kernels(self): self.assertTrue(m <= full) extra = full - m self.assertTrue(extra) - self.assertFalse([k for k in extra if not (k[1].startswith("l_") or k[0] in B.MODEL_L_ONLY)]) + self.assertFalse([k for k in extra if not (k[1].startswith("l_") or k[0].startswith("l_") or k[0] in B.MODEL_L_ONLY)]) if __name__ == "__main__": diff --git a/clean/l/runner/l_d3d12_profile.py b/clean/l/runner/l_d3d12_profile.py index 597fbada..38958bb3 100644 --- a/clean/l/runner/l_d3d12_profile.py +++ b/clean/l/runner/l_d3d12_profile.py @@ -7,7 +7,7 @@ [--frames 100] [--warm 3] : the build of clean/l/runner/l_frame_check.py --prepare (the synthetic models in /lframe_model) with the -D3D12 ports (clean/dx12/build_dx12.py --out ). One model per process: the runtime library reads WG_D3D12_PROFILE +D3D12 ports (clean/dx12/build_dx12.py --model-l --out ). One model per process: the runtime library reads WG_D3D12_PROFILE when it is loaded. Run it in a GPU slot with the GPU otherwise idle. Profiled timestamps perturb scheduling: the step sums are for attribution; the whole-frame span without profiling is measured too (wg_rt_frame_timed, a separate Pipeline in a second process would be cleaner; here it is the same process after the profiled phase, reported apart).