Repository navigation
[testing] Exercise trace-window resizing with deterministic timestamps - #4752
Merged
Merged
Conversation
choijon5
force-pushed
the
choijon5/helion-b200/shared/4
branch
from
November 26, 2026 16:22
05d0754 to
c460370
Compare
choijon5
force-pushed
the
choijon5/helion-b200/shared/3
branch
from
November 26, 2026 16:22
fb9beb7 to
69660d2
Compare
This was referenced Nov 26, 2026
choijon5
marked this pull request as draft
November 26, 2026 17:03
choijon5
force-pushed
the
choijon5/helion-b200/shared/4
branch
from
November 26, 2026 17:03
c460370 to
b85af71
Compare
choijon5
marked this pull request as ready for review
November 26, 2026 17:04
jansel
approved these changes
Nov 27, 2026
…vice A direct config for a B200 could validate against the current H100 even while it recorded the B200's 148 SMs. Direct configuration under a simulated CuTe target could also observe the host capability or only one SM while a bound kernel correctly used the simulated facts. Read the canonical capability from its module at query time. The explicit-device hook delegates to the existing no-argument backend hook by default; CuTe probes the requested device unless the existing hook was overridden. Bound-kernel facts, including an explicit None, take priority. A nonexistent visible CUDA ordinal gives an unknown capability. Detect it on Torch's specific invalid-device assertion, then confirm it is out of range: successful queries keep their cache fast path, and unrelated driver or initialization errors still propagate. Model both direct and bound SM counts in the target context. Hide the indexed capability reader itself in the unavailable-CUDA fixture, so it neither fills the process's real cache with None nor exposes a warm entry; an outer modeled public probe remains authoritative. A CUDA process using PyTorch's NVML-based check can regain visibility before CUDA initializes. Return None for the unavailable probe without caching it: the next request can read the device, and a successful cached explicit lookup needs no further availability or property checks. The flash and config tests that used the former private search-surface probe now patch the canonical name; the redundant resource-test patch is gone. Testing: Scoped scripts/run_tests.py CPU configuration, helper and flash lanes passed 548 (20 skipped) CuTe and 143 (7 skipped) stable CI Triton. Strict lint and Pyrefly passed. The cold zero-to-one test previously returned None twice; now no absent entry is cached, the restored ordinal gives SM100, and no CUDA availability or property call is made on the next hit. Current-H100/requested-B200 gives SM90/120 and SM100/148; explicit None gives None/148. Class, subclass and plugin overrides, outer facts and the one-visible-device invalid-ordinal controls are exercised. The 25,987 full standalone CuTe CPU passes (567 skips) were on an earlier revision; the current counts above refer to the scoped tests. Integrated validation before changing the unavailable-cache miss to be retried: full CuTe lanes passed 26,211 CPU and 16,138 GPU tests on B200 3/5; full Triton lanes passed 4,900 CPU and 3,395 GPU tests on B200 6; Pallas interpreter passed 269 with 44 skipped. These runs include the requested-device, unavailable-ordinal, legacy-hook and fixture fixes. The final cache correction also passed the real zero-to-one transition on B200 4 with PyTorch's NVML-based availability check. No CUDA context was initialized while hidden; exposing the device then gave SM100/148 rather than a cached unknown. The separate real one-visible-device control returned unknown for a missing ordinal and left the visible target correct before and after a cold or warm simulated scope. Review notes: - Deferred: tensor-descriptor admission still uses the current device, including for a bound spec which already supplies the requested capability on upstream main. KNOWN_GAPS.md, tensor-descriptor-choices-use-the-current-gpu. Fixing only the search menu would leave lowering and epilogue decisions inconsistent across heterogeneous targets. Both configuration directions were reproduced; the single-B200 presets do not exercise that hardware mismatch. autoreview passed: claude, codex stack-info: PR: #4750, branch: choijon5/helion-b200/shared/2
…tion A resumed review twice returned its unique completion marker followed by LGTM. The reviewer had been told that both the verdict and the transport marker must be the last line. Spell out which belongs to the review text and which finishes the entire message. Keep the result parser and its confirmation check unchanged; previously rejected reviews remain unconfirmed. Testing: scripts/run_tests.py --backend triton --lane cpu --slow test/test_autoreview.py passed all 157 cases, including a verdict after the marker that must remain unconfirmed. Strict lint and Pyrefly passed. No GPU needed. autoreview passed: claude, codex stack-info: PR: #4751, branch: choijon5/helion-b200/shared/3
The kernel timer resizes a short profiling window using the first trace's observed call period. A second window can still end before warmup if calls arrive much faster. In the full Triton lane, both 15- and 113-call traces parsed, but neither settled; the timer correctly returned infinity. A test using CUDA sleeps and a wall-time threshold assumed it would always obtain a reading. Use the existing simulated device events to exercise the same timer, flush learning, trace parsing and resize logic. Check that the second window is larger and returns just the candidate's 7 us when calls settle, and that it reports an unreadable window when they do not. Neighboring tests still exercise real CUPTI traces and public do_bench. No timer behavior or production timeout changes. Testing: scripts/run_tests.py --backend triton,cute --lane cpu test/test_benchmarking_batched_replay.py (10 passed on each backend); strict scoped lint passed. No GPU required for this change. autoreview passed: claude, codex stack-info: PR: #4752, branch: choijon5/helion-b200/shared/4
choijon5
marked this pull request as draft
November 28, 2026 04:04
choijon5
force-pushed
the
choijon5/helion-b200/shared/4
branch
from
November 28, 2026 04:04
b85af71 to
7824295
Compare
choijon5
marked this pull request as ready for review
November 28, 2026 04:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked PRs:
[testing] Exercise trace-window resizing with deterministic timestamps
The kernel timer resizes a short profiling window using the first trace's
observed call period. A second window can still end before warmup if calls
arrive much faster. In the full Triton lane, both 15- and 113-call traces
parsed, but neither settled; the timer correctly returned infinity. A test
using CUDA sleeps and a wall-time threshold assumed it would always obtain
a reading.
Use the existing simulated device events to exercise the same timer,
flush learning, trace parsing and resize logic. Check that the second
window is larger and returns just the candidate's 7 us when calls settle,
and that it reports an unreadable window when they do not. Neighboring
tests still exercise real CUPTI traces and public do_bench. No timer
behavior or production timeout changes.
Testing: scripts/run_tests.py --backend triton,cute --lane cpu
test/test_benchmarking_batched_replay.py (10 passed on each backend);
strict scoped lint passed. No GPU required for this change.
autoreview passed: claude, codex