Repository navigation
Run Laya encoder and decision layers on CUDA - #4
Closed
linear3735 wants to merge 13 commits into
Closed
linear3735 wants to merge 13 commits into
linear3735 wants to merge 13 commits into
Conversation
added 13 commits
September 30, 2026 13:41
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.
Superseded by #90, now merged into
main.Purpose
Run Laya's 28 encoder layers and two decision transformer layers from Rust. Validate the checkpoint and kernel bundle before loading, then leave hidden states on the GPU for the scorer.
Part of InferMatrixLab#14. Depends on #3 and the existing Hopper kernel build. Uses original RoPE and eager execution. Scorer, HTTP and CUDA Graph integration are separate steps.
This fork PR targets
codex/laya-workspace; encoder execution adds 419 core/configuration lines. Upstream PR: #49.Test Plan
cargo fmt --all --check cargo clippy --workspace --locked --all-targets -- -D warnings cargo test --workspace --locked cargo build --workspace --release --lockedCompare with official Laya 0.3.20 on H800: 13 real request cases, including 16 distinct rows at 16×512. Check intermediate and final hidden states, reverse request order, and repeat each workspace without intermediate readbacks. Reproduction commands are in the native encoder recipe. The residency/workspace recipe covers inherited resource checks.
System1-Omni Version / Commit:
b7c9384; base7574f19(codex/laya-workspace). GPU run:684470a. The later change adds pre-load rotary-size validation and device selection in the test; model execution and kernels are unchanged.Test Result
Current upstream CPU CI for the same head: 45 tests passed; 9 checkpoint/GPU tests skipped. fmt, strict Clippy and release build passed. This documentation-only follow-up also passed local strict MkDocs and rendered-anchor checks. Historical GPU validation was not rerun; encoder and CUDA source are unchanged.
All 208 valid-token comparisons had zero measured error. Repeated runs produced identical output bytes. Candidate outputs were finite; empty-key padding was excluded from equality checks. These checks validate implementation parity.
GitHub CI only runs for PRs targeting
main, so this fork review PR has no automatic CI run.Upstream CI for the same head: Rust CI, Docs build, benchmark harness tests passed.
Self-review