Repository navigation
Conversation
Port the lucebox.concurrency.v1 producer for Lucebox Forge / LuceGraph onto current main, default off. LUCE_PROF=concurrency (or 1) enables a bounded keep-first JSONL capture (metadata, step with lanes and phases, request, token_burst, footer) written to LUCE_PROF_OUT, with LUCE_PROF_MAX_ROUNDS/_MAX_REQUESTS/_MAX_TOKEN_BURSTS bounds and atomic LUCE_PROF_CHECKPOINT_EVERY checkpoints. The scheduler owns one service round id per engine step and publishes it on the serving thread; the capture step, the Qwen service_round, concurrent_step and graph_compute ROCTX ranges, and the DeepSeek4 paged_gathered_step range all carry the same round_id. Chain speculation rounds now get their own concurrent_step range and step path "chain" instead of "unknown". Disabled, the StepPlan profile pointer is null: engines skip all profile work, phase scopes read no clock, and the capture allocates nothing and writes no file. The HTTP observability endpoint and page from the old patch are not ported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
Lucebox Forge (Luce-Org/luce_box#259) profiles serving performance with LuceGraph. Its JSONL capture producer (
lucebox.concurrency.v1) has lived only as an out-of-tree patch in a skill asset. That patch sits 509 commits behind main, conflicts in 11 files, and still uses the pre-renameDFLASH_*variables. Main's ROCTX markers also carry noround_id, so a kernel trace cannot be joined to scheduler rounds. This PR brings the producer in-tree, off by default.What changes
Capture emitter, in
server/src/common/observability/:inference_profilecovers a round's lanes and 14 phases.concurrency_capturehandles bounded keep-first retention, JSONL export, and atomic checkpoints.LUCE_PROF=concurrency(or1; the value is a comma list, as the existingLUCE_PROFalready is).LUCE_PROF_OUT,LUCE_PROF_MAX_ROUNDS,LUCE_PROF_MAX_REQUESTS,LUCE_PROF_MAX_TOKEN_BURSTSandLUCE_PROF_CHECKPOINT_EVERY.One round id per engine step, owned by the scheduler. The capture step and these ROCTX ranges all carry the same
round_id:service_round,concurrent_stepandgraph_compute;paged_gathered_step.Chain speculation rounds get their own
concurrent_steprange and the step pathchain. They used to beunknown, becausestep_chain_specreturned before a step range was opened. The consumer schema acceptschainin Dflash issue on V100 build #259.Off by default. When
LUCE_PROFis unset:What remains is one branch on a cached bool and a counter increment per round.
Not ported: the old patch's HTTP observability endpoint and HTML page.
Validation
luce_serverand the unit tests for HIP gfx1201 (Ninja, Release) with no new warnings in the touched files.test_concurrency_capture(new). It writes a real capture through the scheduler/engine API and checks record order, required fields and types, enums, escaping, drop counts and checkpoints.test_qwen35_roctxandtest_deepseek4_roctx, both extended withround_id.test_seq_engine_contract,test_seq_slot_managerandtest_parallel_prefix_txn.test_server_unit, run withLUCE_PROFboth unset and set to1.Not verified
unknownwith scheduler-level fields only.git_shais fixed at CMake configure time.🤖 Generated with Claude Code