Skip to content

Scripts: compare activity memory samples at matching times - #1854

Open
rrrarrra9 wants to merge 1 commit into
xcl-dev:mainfrom
rrrarrra9:codex/activity-memory-1773
Open

rrrarrra9 wants to merge 1 commit into
xcl-dev:mainfrom
rrrarrra9:codex/activity-memory-1773

Conversation

@rrrarrra9

@rrrarrra9 rrrarrra9 commented Nov 24, 2026 •

Copy link
Copy Markdown

Part of #1773. Compare memory counters from live or finished XCL logs at the same elapsed time. The script selects the last complete sample at or before the requested time and distinguishes stale or missing data from zero usage.

What is in it

  • scripts/activity-memory.ps1 reports process commit, local and non-local usage, texture and sparse pools, and optional DXGI budgets. It ignores a partially written budget line and compares sample age with the exact lag limit.
  • scripts/activity-memory.tests.ps1 covers live-log sharing, selection, truncated lines, missing and stale samples, both budget layouts, and path-free output. The README includes the comparison command.

Tested

  • On Windows 11 build 26300.9974, scripts/activity-memory.tests.ps1 at f830d4132a07adbe3a78b266704f649eac2babde returned activity-memory: ok and exit 0 in Windows PowerShell 5.1.26100.9818 and PowerShell 7.6.9. Both new edge cases failed with the previous parser.
  • Read an active XCL activity log while XCL was writing. For two completed logs, a request at 119 s selected samples at 118.883 and 118.508 s, with null budgets because neither log reported them.
  • Rebased onto 426a5a7. #2245 corrected the two Rust assertions that failed in the previous CI run and in main. The base CI passed. The new head has its own CI run.
  • Independent verification on the previous b666ff8 passed in both shells. This rebase leaves the script diff unchanged.

Not tested

  • PowerShell on other operating systems. The timestamp comparison assumes the two recordings reached the same workload phase.

AI use

  • OpenAI Codex (gpt-6.2-sol on the prior revision, GPT-6 on this revision, exact variant not exposed) implemented the parser and fixtures, ran the checks, and drafted the report.

@futurepro62

Copy link
Copy Markdown

Tested exact head fd3dca3, script tests only, since this PR has no test report yet.

Tested

  • Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here).
  • powershell.exe -NoProfile -File scripts/activity-memory.tests.ps1 at the head: exit 0, activity-memory: ok.
  • The PR's test file against current main's script (689f2db): not applicable: activity-memory.ps1 is new in this PR, so main has nothing for the test to run.

Not tested

  • PowerShell 7, the CI workflow itself, a game (no runtime code changed).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

Thanks!

@raylitebull

Copy link
Copy Markdown
Member

Diff audited (scripts/activity-memory.ps1, scripts/activity-memory.tests.ps1, README.md) and CI workflow approved (running). Needs Build and test green plus independent verification of activity-memory.tests.ps1 on PowerShell 5.1 / 7.

@rrrarrra9
rrrarrra9 force-pushed the codex/activity-memory-1773 branch from 71e6e38 to b666ff8 Compare November 25, 2026 11:00
@raylitebull

Copy link
Copy Markdown
Member

Updated review on rebased b666ff8:

  • Diff audited (scripts/activity-memory.ps1, scripts/activity-memory.tests.ps1, README.md) and CI workflow approved (45600383260).

Remaining before merge: Build and test green plus fresh independent PowerShell verification of scripts/activity-memory.tests.ps1 on b666ff8.

@RavenCurseBurg

RavenCurseBurg commented Nov 25, 2026 •

Copy link
Copy Markdown

Re-tested head f830d4132a07adbe3a78b266704f649eac2babde on the same Windows host. Both powershell.exe 5.1.26100.9711 and pwsh.exe 7.6.9 ran -NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/activity-memory.tests.ps1 and printed activity-memory: ok (exit 0). The tested script and its fixture have identical Git blobs on this head and b666ff8. The five additional synthetic cases below were run on the earlier head. OpenAI Codex (GPT-6) ran this recheck.


Tested PR head b666ff8b57c3e4351eee086405aa0e47a265b7d6 on Windows 11 24H2 (26100.9711), i7-13700, RTX 4060. All checks here use synthetic log text on the CPU.

Tested

  • powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/activity-memory.tests.ps1 and scripts/activity-memory.tests.ps1 under PowerShell 7.6.9 both printed activity-memory: ok (exit 0). Windows PowerShell was 5.1.26100.9711.
  • Independent fixture on both shells, 5 passed, 0 failed, 0 skipped per shell. A log contained complete samples at 12 s and 10 s, in that order, then a truncated 14 s line. At 9 s the result was no_sample. At 11 s it returned the 10 s / 100 MiB sample. At 14 s it returned the 12 s / 120 MiB sample. With the default 3 s lag limit, 15 s was ok and 15.001 s was stale with a null commit metric.

Not tested

Live title logs, GPU execution and the Rust workspace suite.

AI use

OpenAI Codex (GPT-6) inspected the scripts, wrote and ran the independent fixture, ran the upstream fixture, and drafted this report.

Report the last complete comparable activity sample from active or finished logs, without sharing their paths. Ignore truncated budget lines and compare sample age with the exact lag limit.

Part of xcl-dev#1773.

Assisted-by: OpenAI Codex (GPT-6)
@rrrarrra9
rrrarrra9 force-pushed the codex/activity-memory-1773 branch from b666ff8 to f830d41 Compare November 25, 2026 11:31
@throny throny added the goal:world-load Bears on the retail title getting past world loading label Nov 25, 2026
@rrrarrra9

Copy link
Copy Markdown
Author

@raylitebull Could you please approve the CI workflow for the latest commit? Independent verification has already passed on PowerShell 5.1 and 7.6.9. Thanks!

@futurepro62

Copy link
Copy Markdown

NVIDIA and AMD full-suite run of head f830d413, on its own base 426a5a7 and merged with current main b49be183, to go with the reports above by RavenCurseBurg, since none of them covers AMD. On its base, the one failure comes from changes made on main after that base (ea088a5); merged with main, both cards pass. The bare-head runs come first.

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1231 passed, 0 failed, 44 ignored. SKIPPED (no wave64, no xgameruntime.dll): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, test_title_draws_with_a_root_signature_under_the_debug_layer, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • No new #[test] functions in the diff.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1172 passed, 1 failed, 26 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))).
  • --skip leaves out tests that fail on main b49be183 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (Tests: heap_window_out_of_memory_falls_back_to_the_switch_form fails under XCL_REQUIRE_GPU=mesh (opt-in skip counted as missing coverage) #1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.
  • AMD failures on this base: gpu_image_get_resinfo_past_last_level (ea088a5).
  • Merged with main b49be183 (git merge --no-ff, clean, local only): NVIDIA XCL_REQUIRE_GPU=mesh cargo test --workspace with the same skips: 1423 passed, 0 failed, 45 ignored; AMD Radeon iGPU (XCL_ADAPTER=radeon, same skips): 1434 passed, 0 failed, 47 ignored.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

goal:world-load Bears on the retail title getting past world loading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants