[CPU] GDN uses native bf16/f16 instruction.#36160
Open
zhangYiIntel wants to merge 8 commits into
Open
Conversation
1af5383 to
2a05a00
Compare
2a05a00 to
6f5f6a6
Compare
2f378fc to
7e67024
Compare
Contributor
|
@xuchen-intel , could you please review? |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the CPU plugin’s GatedDeltaNet (GDN) execution to better support f16/bf16 by introducing an AVX-512 JIT kernel leveraging native bf16/fp16 instructions (for head sizes divisible by 32) and by generalizing the reference recurrent linear attention path to handle xf16 precisions. It also adds functional test coverage for f16/bf16 GDN configurations.
Changes:
- Add an x64 AVX-512 JIT kernel for GDN using native bf16/fp16 instructions with a head-size % 32 constraint.
- Templatize the recurrent linear attention kernel to support f16/bf16 in addition to f32.
- Add functional test instances for GDN f16/bf16 cases.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/plugins/intel_cpu/tests/functional/shared_tests_instances/subgraph_tests/gated_delta_net.cpp | Adds f16/bf16 parameterized test cases for GDN. |
| src/plugins/intel_cpu/src/nodes/kernels/x64/gdn_jit_kernel.hpp | Introduces the JIT kernel interface, call args, and compile params for xf16 GDN. |
| src/plugins/intel_cpu/src/nodes/kernels/x64/gdn_jit_kernel.cpp | Implements the AVX-512 bf16/fp16 JIT codegen and factory creation logic. |
| src/plugins/intel_cpu/src/nodes/kernels/linear_attn/recurrent_linear_attn.cpp | Generalizes the reference kernel to xf16 and optimizes some loads/stores. |
| src/plugins/intel_cpu/src/nodes/gated_delta_net.h | Adds x64-only members for caching/using the GDN JIT kernel. |
| src/plugins/intel_cpu/src/nodes/gated_delta_net.cpp | Enables f16/bf16 execution, adds JIT dispatch, and adjusts scratchpad sizing/typing. |
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.
Details:
Tickets:
AI Assistance: