8000 [Intel GPU] Decompule Intel GPU oneDNN from other backends (#147926) · pytorch/pytorch@af720cd · GitHub
[go: up one dir, main page]

Skip to content

Commit af720cd

Browse files
ZhiweiYan-96leizhenyuan
authored andcommitted
[Intel GPU] Decompule Intel GPU oneDNN from other backends (#147926)
# Motivation Currently, Intel GPU is moving forward rapidly with the development of feature. We(Intel GPU) want an independent version control over oneDNN component so as to quickly adopt the optimization or bug fixing provided by oneDNN team. This PR does not change the behaviors of other backends like Intel CPU, ARM. They can keep using the stable version contained in `third_party/ideep`. # Detail At compilation time, we will `git clone` oneDNN via URL `https://github.com/oneapi-src/oneDNN` and checkout to the tag/commit that Intel GPU backend prefers. This feature is supported by CMake `Externalproject_add` command. Following is a build log example: ```bash [11/60] Performing download step (git clone) for 'xpu_mkldnn_proj' Cloning into 'xpu_mkldnn_proj'... HEAD is now at 5e92240360 meta: updated citation file [12/60] Performing update step for 'xpu_mkldnn_proj' -- Already at requested tag: v3.7 [13/60] No patch step for 'xpu_mkldnn_proj' ``` The log demonstates that, we explicitly download the source files and checkout to a specific tag. The source file of oneDNN is located at `build/xpu_mkldnn_proj-prefix/src/xpu_mkldnn_proj` # Runtime verification Running UT for CPU ```bash onednn_verbose,v1,info,oneDNN v3.7.0 (commit fc3f17ad469b8a6da7192ae12d32625faa509f1e) onednn_verbose,v1,info,cpu,runtime:OpenMP,nthr:24 onednn_verbose,v1,info,cpu,isa:Intel AVX-512 with Intel DL Boost onednn_verbose,v1,info,gpu,runtime:none onednn_verbose,v1,info,graph,backend,0:dnnl_backend onednn_verbose,v1,primitive,info,template:operation,engine ``` Runnint UT for Intel GPU ```bash onednn_verbose,v1,info,oneDNN v3.7.0 (commit 5e9224036021433d2577548ed0539fe9a53256bc) onednn_verbose,v1,info,cpu,runtime:threadpool,nthr:24 onednn_verbose,v1,info,cpu,isa:Intel AVX-512 with Intel DL Boost onednn_verbose,v1,info,gpu,runtime:DPC++ onednn_verbose,v1,info,gpu,engine,sycl gpu device count:2 ``` We can see that, Intel GPU would uses commit `5e922` (tag v3.7), while CPU uses `fc3f17` Pull Request resolved: #147926 Approved by: https://github.com/EikanWang Co-authored-by: leizhenyuan <zhenyuan.lei@intel.com>
1 parent 3a58a04 commit af720cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmake/Modules/FindMKLDNN.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ IF(NOT MKLDNN_FOUND)
4848
set(DNNL_CXX_FLAGS "")
4949
endif()
5050
ExternalProject_Add(xpu_mkldnn_proj
51-
SOURCE_DIR ${MKLDNN_ROOT}
51+
GIT_REPOSITORY https://github.com/oneapi-src/oneDNN
52+
GIT_TAG v3.7
5253
PREFIX ${XPU_MKLDNN_DIR_PREFIX}
5354
BUILD_IN_SOURCE 0
5455
CMAKE_ARGS -DCMAKE_C_COMPILER=icx

0 commit comments

Comments
 (0)
0