Repository navigation
ggml-hrx: add opt-in compilation diagnostics - #165
Merged
AaronStGeorge merged 1 commit intoNov 1, 2026
Merged
AaronStGeorge merged 1 commit into
AaronStGeorge merged 1 commit into
Conversation
Assisted-by: Codex
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.
Overview
Add
GGML_HRX_TRACE_COMPILE=1to diagnose runtime kernel compilation during prefill and decode. It emits JSON records to stderr with graph execution and cache IDs, kernel keys and specialization parameters, compiler timing, failures, and unresolved-compilation waits. Asynchronous compiler events retain their originating execution ID. Graph-end records include zero compilation counts so repeated cycles can show cache reuse.The caller chooses the workload and repetitions. Records are informational; backend graph IDs do not claim to identify token steps or prefill/decode phases. Existing asynchronous compilation and graph replay remain intact. Disabled tracing adds cached-state checks without timestamps, JSON construction, logging locks, or file I/O.
All changes are inside
ggml/src/ggml-hrx. The README documents activation, events, timing limits, and JSON extraction.Validation
Built
llama-bench,hrx-backend-test, andhrx-loom-jit-testwith HRX82214dfb029975205d1c3a59164b678e2e21fc41on a pinned gfx1100 GPU.-p 0 -n 0 -pg 64,16 -b 64 -ub 64 -r 2 --no-warmup --progress: async and sync JIT both produced 68 backend graph executions and 43 initial compilation requests. Counts for the first four graphs were[1, 23, 1, 18]; all remaining graphs, including the entire second cycle, requested zero compilations.add_f32,scale_f32, and bothsame_uid_distinct_graph_reuses_graph_programvariants: 4 passed with tracing disabled and 4 passed with tracing enabled. Disabled tracing emitted no trace records.GGML_HRX_LOOM_SANITIZERproduced a matching failed compile-end record withcompiler_started=false, the initialization error, and a failed graph-end record.git diff --checkpassed. The full backend suite was not run.The existing compatibility floor is stale and is being corrected separately. Validation used the compatible HRX revision above; this PR does not change that floor or migrate kernel syntax for newer HRX revisions.
Requirements