Scripts: generate flamegraphs for Criterion benchmarks #1153
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1153
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1153"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@bmjask on GitHub · 2026-11-24 12:35 UTC · original
bmjask:perf/benchmark-flamegraphs→main· +961 −0 · 9 files · 3 commits · openAdds a Windows flamegraph wrapper for the benchmark targets, stacked on #1152. It validates the selected target, forwards an optional Criterion filter, and writes SVG output under
target/flamegraphsby default.What is in it
scripts/flamegraph.ps1: validatedcargo-flamegraphwrapper and output handlingCargo.tomlandREADME.md: profiling configuration and usageTested
c09b78f:cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 741 passed, 0 failed, 41 ignored; skippedgpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64)cargo bench -p xcl --benches -- --test: all four targets built and all 68 benchmarks succeededRegression run
test-onlyapproval on this revision. No paired retail smoke results are available.Not tested
scripts/flamegraph.ps1end to end (requirescargo-flamegraphand an elevated shell), AMD, release, or a retail title; no benchmark timings were takenAI use
OpenAI Codex with GPT-5 wrote the implementation. Claude Code with Claude Opus 5.5 ran the external validation and wrote the test report; the contributor checked it before posting.
OpenAI Codex (GPT-6.2 Astra) checked the changed files and CI logs and revised the title and regression-run explanation.
@futurepro62 on GitHub · 2026-11-24 14:30 UTC · original
Full-suite run, since this PR has no test report yet. Tested exact head
c09b78f(on its base47efa2e).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 741 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.cargo bench -p xcl --benches -- --test(each benchmark run once): all four bench targets (core,formats,gpu_cpu,runtime) build in the bench profile, and all 68 benchmarks reportSuccess. No timings taken.Not tested
scripts/flamegraph.ps1(needscargo-flamegraphand an elevated shell), AMD, a release build, a game (test run only).AI use
@DavidM1911 on GitHub · 2026-11-25 08:02 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@ivall on GitHub · 2026-11-25 13:51 UTC · original
Review of head
c09b78f(stacked on #1152 and #1148). I read the whole diff before building. The new parts beyond the benchmarks arescripts/flamegraph.ps1and a[profile.bench] debug = 1in the root Cargo.toml. The script runscargo flamegraph --package xcl --bench <one of four validated names> --output <path> -- [filter] --bench; the bench name comes from a ValidateSet, arguments are passed as an array (no string evaluation), it installs nothing and does not elevate (it only checks). No network, no build.rs, no workflow changes, no binaries. The script itself has not been run end to end (needs cargo-flamegraph and an elevated shell; I did not run it) and has no test.Tested on this tree (#1148 + #1152 + #1153 merged onto current main): AMD RDNA4, Windows, DXC 1.8.2502.11, debug.
cargo build --workspace: okcargo test --workspace --no-fail-fast -- --test-threads=4: 1263 passed, 2 failed, 46 ignored; the two failures are the knownfuzz_validate_and_gpu_1and_3(#2115), also failing on main. The kernelx tests that failed once in #1152's CI passed here.cargo bench -p xcl --bench core|formats|gpu_cpu|runtime -- --test: 2 + 19 + 18 + 29 = 68 benchmarks succeeded. No timings taken.Dependencies: criterion 0.7 is dev-only, no existing crate bumped, but its transitive
ciborium,ciborium-io,ciborium-llare Apache-2.0 only, which CONTRIBUTING.md excludes. cargo-flamegraph is an external tool, not a dependency. Not merging until the licence question in #1148 is decided; leaving this PR open.AI use: Claude Code (Claude Sonnet 5.5) read the diff, ran the tests and wrote this on the maintainer's behalf.
@RavenCurseBurg on GitHub · 2026-11-26 00:06 UTC · original · edited 2026-11-26 00:13 UTC
I tested the Windows preflight on
c09b78fe74856039e15bcbaf99993a2ba091e1f7from an ordinary (non-administrator) account. With PATH limited to temporary native stand-ins, the real wrapper rejected an invalid benchmark name, a valid benchmark with no profiler installed, and a valid benchmark with the profiler visible but no administrator rights. In each case the diagnostic identified the corresponding cause, the caller remained in the original directory, no command stand-in ran, and no SVG appeared.Test-only fixture. I ran
-NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/flamegraph-preflight.tests.ps1under Windows PowerShell 5.1 and PowerShell 7.6.9; all three cases passed in each shell. Windows 11, Core i7-13700. No elevated profiling session, benchmark build, or flamegraph generation was run. OpenAI Codex (GPT-6) wrote the fixture and ran it.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.