Repository navigation
perf(attention): add opt-in Iluvatar fused causal Prefill - #610
Draft
superme1one wants to merge 1 commit into
Draft
superme1one wants to merge 1 commit into
superme1one wants to merge 1 commit into
Conversation
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.
Summary
Use normal runtime operator submission for fused causal Softmax on eligible Iluvatar BF16 Prefill inputs.
INFINILM_ILUVATAR_FUSED_CAUSAL_PREFILL=1opts in; the default and all ineligible paths retain Fill/Triu/Tril/Add plus Softmax. Install the companion InfiniOps FP32 causal provider before enabling the flag.Motivation
The private fusion removed mask allocations and four separate masking launches, reducing two-task completion time by 7.633–7.646% on top of Gate/Up+Down GEMV. This PR replaces its direct experimental CUDA entry point with normal
execution::submit, preserving owner checks, stream/recording policy and runtime operator mapping. It adds no dataset or generation-policy changes.Type of Change
perf— opt-in Prefill fusion.Test Results of Involved Models on Supported Platforms
/W4 /WX, exit0scripts/format.py --ref HEAD^ --checkHistorical model evidence is the recorded TG-V200/CoreX GQA BF16 private build. No current-revision screenshot/build result is claimed. This submission pass kept the GPU experiment paused; hardware validation is needed before requesting readiness. The existing 100-question run is reused, with a two-task integration regression sufficient for the code-port check.
Benchmark / Performance Impact
Historical four-optimization TG-V200/CoreX result: 100 fixed new GSM8K targets, max_tokens=512, greedy EOS=[2,73440], unchanged strict last-
####numeric scoring. Official accuracy 82/100 → 84/100; all requests completed/parsed, zero errors and truncations. 34/100 token-different, including one correct→wrong (1097: 480→448, reference480) and three wrong→correct (672,1259,1203).Sum of per-version same-card formal paired-wave makespans 749.203818 → 505.326616 s (-32.5515%); completed request throughput +48.2613%. Published output tokens 13894→14213, so token throughput +51.6653% is reported separately. Each target's two versions used the same physical card; first20 serial, remaining80 sharded over two cards. Load/warmup/final shutdown excluded; queue/text processing included. These are combined gains, not individual-PR gains or the parallel run's wall time. Eight demonstrations came from a disjoint test-corpus subset (internal paired evaluation).
Measured baseline: InfiniLM
6e7f9537173cd33bb30539ebf8d92ab6d869660d. Main later advanced tocc6d52ae04f4c9ff17229bc7fc13a9ad105aca6dwith auto-tuning initialization. Current submissions use that InfiniLM main and InfiniOps1a68b261d19f0ed6f76bbabeab7a25f479f05e07. Historical GPU evidence applies to the recorded private builds, not this final rebased revision.Full table and regression IDs:
docs/performance/iluvatar-four-optimizations.md. Machine-readable aggregate:docs/performance/iluvatar-four-optimizations-results.json.Notes for Reviewers
The companion provider is required: older InfiniOps versions have the same compatibility operator but sum BF16-rounded exponents. This version matches the existing InfiniLM FP32 Softmax order. The two GEMVs share one InfiniOps PR; Prefill spans two repositories; Decode is independent. All four submissions are separate from historical R5 PRs #601/#1010.
Related optimization PRs
CI / ChatOps
Current-base GPU build/smoke remains pending. No GPU workflow or benchmark was dispatched during this PR-preparation task.
Checklist
Title, Branch, and Commits
Scope and Design
General Code Hygiene
C++ Specific
Python Specific
Testing
Build, CI, and Tooling
Documentation
Security and Safety