Skip to content

show pipeline checker usage for help flags - #8805

Open
morvayo wants to merge 1 commit into
ItsNotRexed:mainfrom
morvayo:pipeline-check-help
Open

morvayo wants to merge 1 commit into
ItsNotRexed:mainfrom
morvayo:pipeline-check-help

Conversation

@morvayo

@morvayo morvayo commented Nov 23, 2026

Copy link
Copy Markdown

Closes the help flag task claimed in the contributor board.

The checker currently interprets a standalone --help or -h as a shader index directory. Both flags now print usage to stdout and exit successfully without opening an index. An invocation with no arguments still prints usage to stderr and exits with status 2.

Built the checker with MSVC and ran 41 tests across the checker, pipeline batching, and pipeline generation suites. On an RTX 4070 SUPER, the rebuilt checker compiled all 48 synthetic compute pipelines in the smoke test and wrote the cache. No game files were used.

AI assistance: Codex helped implement and test this change.

@Grimkeh Grimkeh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent Linux CPU review (3923cfa1)

What changed: show pipeline checker usage for help flags; C++ + Python index tests.

Checked: test_vk_pipeline_check_index 1 OK (12 skipped). Runtime binary not built here.

Looks fine for the help-path/index change; no game files.

@slint6614-dev

Copy link
Copy Markdown
Contributor

Windows check of 3923cfa10 (AI-assisted), Windows 11 26300, MSVC 2022 RelWithDebInfo, Python 3.12. Built vk_pipeline_check from this branch.

  • tests/test_vk_pipeline_check_index.py with LEONIDA_VK_PIPELINE_CHECK pointing at this build: 13 tests OK.
  • Negative control: the same test against vk_pipeline_check.exe built from main 867d922: test_help_prints_usage_without_an_index fails for --help and -h (2 failures), so the test covers the change.
  • Exit codes of this build: --help 0, -h 0, /? 2 (only the two documented flags are help; fine, just noting it).

@supidooo

Copy link
Copy Markdown

Verified head 3923cfa1 on native Windows 10 Pro (build 19045) with TDM-GCC 10.3.0 (g++ -std=c++20 -O2 -Wall -Wextra -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_WIN32_WINNT=0x0A00) and Python 3.10.9:

  • python -I scripts/check_no_game_data.py on both changed files: clean (exit 0).
  • Negative control on main (867d922f): vk_pipeline_check.exe --help exited 2 with error: cannot read --help/index.json: cannot open the file.
  • Rebuilt runtime/test/vk_pipeline_check.cpp cleanly with TDM-GCC 10.3.0 (exit 0, no new warnings in the touched lines):
    • vk_pipeline_check.exe --help and -h: print usage to stdout, exit 0.
    • vk_pipeline_check.exe (no args): prints usage to stderr, exit 2.
    • vk_pipeline_check.exe nonexistent_dir --help: prints unknown option --help to stderr, exit 2 (standalone argc == 2 scope confirmed).
  • python -I tests/test_vk_pipeline_check_index.py -v: 13/13 OK (0.530s).

No game files used. AI-assisted.

@smowlyy

smowlyy commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Verified head 3923cfa10 merged onto main (867d922f0) on native Windows 11 (10.0.26300.9974, MSVC 19.44, RelWithDebInfo, Python 3.12.10):

  • python -I scripts/check_no_game_data.py on both changed files: clean (exit 0)
  • cmake --build runtime/build --target vk_pipeline_check --parallel: built cleanly
  • python -I -m unittest discover -s tests -p test_vk_pipeline_check_index.py -v: 13/13 passed
  • .\runtime\build\vk_pipeline_check.exe --help: prints usage and exits 0

AI-assisted.

@xSavunBeyHD

Copy link
Copy Markdown

Reviewed 3923cfa (code read, static check against main, no local build/run):

Looks good — no blocking issues found.

  • runtime/test/vk_pipeline_check.cpp: minimal and clean; <string_view> is already included (line 81), --help / -h print usage to stdout and return 0, while argc < 2 keeps stderr and exit 2 without touching the filesystem or Vulkan.
  • tests/test_vk_pipeline_check_index.py: covers both --help and -h (exit 0, stdout usage, empty stderr, no files created in cwd) as well as the no-arguments usage error (exit 2 on stderr).
  • Minor note (non-blocking): gating on argc == 2 means <dir> --help still goes through normal argument parsing rather than printing help; fine if intentional.

AI-assisted.

@haayden

haayden commented Nov 23, 2026

Copy link
Copy Markdown

Tested 3923cfa on Windows 11, RTX 5070 Ti (NVIDIA 621.14), MSVC 14.44 RelWithDebInfo: pass

  • Built vk_pipeline_check (VS 2022 generator, Vulkan-Headers fetch) at head and at base 867d922f0.
  • LEONIDA_VK_PIPELINE_CHECK=<build>\vk_pipeline_check.exe pytest tests/test_vk_pipeline_check_index.py (head's test file both times):
    • head binary: 13 passed, 4 subtests passed
    • base binary: the two test_help_prints_usage_without_an_index subtests (--help, -h) fail, the other 13 pass. Red to green.
  • By hand: head vk_pipeline_check --help prints the usage line to stdout, exit 0; with no arguments it still exits 2 with usage on stderr. Base --help exits 2 with error: cannot read --help/index.json: cannot open the file, i.e. it took the flag as the SPIR-V directory.
  • ctest -C RelWithDebInfo -R vk_pipeline_check --output-on-failure (vk_pipeline_check_cli, vk_pipeline_check_stack): 2/2 pass at head; same with LEONIDA_VK_VALIDATION=1, but the Khronos validation layer is not installed on this machine, so that second run had no layer loaded.

Code read: help is only recognised when it is the sole argument (argc == 2), so vk_pipeline_check --help <dir> still goes down the normal path. That matches the new tests; just noting it.

AI-assisted (Claude Code). Synthetic tests only, no game files.

@comtek21516

Copy link
Copy Markdown

Tested 3923cfa10 merged onto main at 867d922f0 on Quadro RTX 4000 (Turing, subgroup 32..32), NVIDIA 615.71.09, Ubuntu 22.04.5 (kernel 5.15), g++ 13.4, llvm-mc 21.1.8, Vulkan SDK 1.4.363.1, Python 3.12.16: pass.

No game files. AI-assisted (Claude Code).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants