Support hosted NCU profiling through the Popcorn API - #530
Merged
Merged
Conversation
This was referenced Sep 18, 2026
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||
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.
Default CLI profiling should use the same Popcorn identity and hosted submission service as other modes. Add
POST /profile/{leaderboard}/{gpu}with validated benchmark and NCU capture options, routed through the existing permissions, rate limits, submission preparation, and backend. Provider credentials stay on KernelBot; users need no Modal installation or account.The GPU runner selects
benchmarks[N](or all entries), follows evaluator child processes, capturescustom_kernel/, and returns.ncu-repplus text/CSV details and shape/configuration provenance. Failed or empty captures report errors. No provider failover is added. The default CLI uses this route;--profile-brevis a separate explicit command.Pin Modal's NCU to 2025.2.1: CUDA 13.3's bundled 2026.2 produced many NaN hardware counters in the B200 check. Repeating the same capture with 2025.2.1 restored valid occupancy, throughput, cache, and instruction counters without extra container privileges.
Validation:
pytest -m 'not integration' tests); 14 GPU integration tests deselected. Ruff passed for new profiling code, run_eval, the Modal image, and profiling tests.run_config, and release CLI with a fake database and ephemeral B200 launcher. The CLI's PATH was empty and MODAL_* variables absent.problems/linalg/qr_v2, benchmark 0 (batch=20, n=32, cond=1, seed=43214), reference-kernels51e22db671d36c1c76091c43c36a44546ba324a1; filterregex:geqr2, demangled names, launch count 1.Deploy the API and updated GPU runners before releasing gpu-mode/popcorn-cli#80. New-problem guide: gpu-mode/reference-kernels#172. No production deployment is included in this PR; rollout details are in
docs/hosted-ncu-profiling.md.