Decoupling oneDNN#2049
Open
Zhenzhong1 wants to merge 6 commits into
Open
Conversation
Signed-off-by: Zhenzhong1 <zhenzhong.xu@intel.com>
Signed-off-by: Zhenzhong1 <zhenzhong.xu@intel.com>
Signed-off-by: Zhenzhong1 <zhenzhong.xu@intel.com>
Collaborator
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR decouples oneDNN from the ARK kernel build (especially for XPU), introduces a shared scratch-memory pool, and extends SYCL-TLA dense GEMM to accept FP32 inputs (along with corresponding Python/test updates).
Changes:
- Adds
ARK_DNNLCMake gating and conditional compilation to allow XPU builds without oneDNN when SYCL-TLA is enabled. - Introduces
DeviceMemoryPooland refactors multiple call sites to use it instead ofDnnlContextscratch allocations. - Extends SYCL-TLA dense GEMM and Python wrappers/tests to support FP32 (plus adds an XPU INT8-weight GEMM wrapper via SYCL).
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| auto_round_extension/ark/auto_round_kernel/CMakeLists.txt | Adds ARK_DNNL option + build-time constraints for XPU backend selection and conditional oneDNN FetchContent/linking. |
| auto_round_extension/ark/setup.py | Adds env flag parsing and passes ARK_DNNL/ARK_SYCL_TLA toggles into the XPU CMake build. |
| auto_round_extension/ark/auto_round_kernel/wrapper/include/utils.hpp | Adds DeviceMemoryPool and refactors DnnlContext scratch allocation to use it. |
| auto_round_extension/ark/auto_round_kernel/wrapper/include/xpu_wrapper.hpp | Makes oneDNN/SYCL-TLA includes conditional and routes scratch allocations + S8 path through new wrappers/pool. |
| auto_round_extension/ark/auto_round_kernel/wrapper/include/cpu_wrapper.hpp | Switches scratch allocation to DeviceMemoryPool. |
| auto_round_extension/ark/auto_round_kernel/sdpa.cpp | Switches varlen workspace scratch allocation to DeviceMemoryPool. |
| auto_round_extension/ark/auto_round_kernel/wrapper/include/sycl_tla_dense_gemm.hpp | Adds FP32 support to SYCL-TLA dense GEMM and updates error messaging. |
| auto_round_extension/ark/auto_round_kernel/wrapper/include/sycl_s8_wrapper.hpp | New SYCL-based S8 wrapper used by XPU paths. |
| auto_round_extension/ark/auto_round_kernel/ark.cpp | Adds conditional XPU backend dispatch (oneDNN vs SYCL-TLA) and uses SyclS8Wrapper for XPU S8. |
| auto_round_extension/ark/auto_round_kernel/init.py | Updates matmul_sycl_tla Python API dtype validation to include FP32. |
| auto_round_extension/ark/test/test_matmul.py | Expands SYCL-TLA test parameterization to include FP32 and adjusts backend-compare tolerances. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Collaborator
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
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.
Description
Decoupling oneDNN
Changes:
Progress
CPU build: ARK_DNNL=ON by default
XPU build: ARK_XPU & ARK_DNNL=OFF & ARK_SYCL_TLA=ON by default.
Usage
ARK_DNNL=1 python setup.py bdist_wheel