Skip to content

Commit

Permalink
[OneDnn] upgrade onednn to v3.5.1 (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
zufangzhu authored and Zantares committed Aug 9, 2024
1 parent da3c9f8 commit ef4c46d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
8 changes: 6 additions & 2 deletions third_party/onednn/gen_gpu_kernel_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,14 @@ def format(self, name, suffix, content):
namespace dnnl {{
namespace impl {{
namespace gpu {{
namespace intel {{
namespace ocl {{
const char* {}_{} =
{};
}}
}}
}}
}}
}}
"""

Expand All @@ -220,6 +222,7 @@ def format(self, name, suffix, content):
namespace dnnl {{
namespace impl {{
namespace gpu {{
namespace intel {{
namespace ocl {{
const char* {}_kernel[] = {{
{}
Expand All @@ -229,6 +232,7 @@ def format(self, name, suffix, content):
}}
}}
}}
}}
"""
return header.format(name, content)

Expand Down Expand Up @@ -262,8 +266,8 @@ def __init__(self, in_file, out_dir):
If possible, it should passed as an arguments, but for covenience, we do this
assumption directly.
"""
OCL_IMPL_DIR = "src/gpu/ocl"
HEADER_ROOT_DIR = "src/gpu"
OCL_IMPL_DIR = "src/gpu/intel/ocl"
HEADER_ROOT_DIR = "src/gpu/intel"
IN_FILE = "ocl_kernel_list.cpp.in"

in_file = os.path.expanduser(in_file)
Expand Down
12 changes: 6 additions & 6 deletions third_party/onednn/onednn_gpu.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ template_rule(

convert_cl_to_cpp(
name = "kernel_list_generator",
src = "src/gpu/ocl/ocl_kernel_list.cpp.in",
cl_list = glob(["src/gpu/ocl/**/*.cl"]),
src = "src/gpu/intel/ocl/ocl_kernel_list.cpp.in",
cl_list = glob(["src/gpu/intel/ocl/**/*.cl"]),
)

convert_header_to_cpp(
name = "header_generator",
src = "src/gpu/ocl/ocl_kernel_list.cpp.in",
header_list = glob(["src/gpu/**/*.h"]),
src = "src/gpu/intel/ocl/ocl_kernel_list.cpp.in",
header_list = glob(["src/gpu/intel/**/*.h"]),
)

gen_onednn_version(
Expand All @@ -116,7 +116,7 @@ filegroup(
"src/cpu/**",
"src/gpu/nvidia/*",
"src/gpu/amd/*",
"src/gpu/jit/v2/conv/planner/*",
"src/gpu/intel/jit/v2/conv/planner/*",
"src/gpu/sycl/ref*",
"src/graph/**",
],
Expand Down Expand Up @@ -156,7 +156,7 @@ cc_library(
"include/oneapi/dnnl",
"src",
"src/common",
"src/ocl",
"src/intel/ocl",
"src/sycl",
],
#nocopts = "-fno-exceptions",
Expand Down
4 changes: 2 additions & 2 deletions xla/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ def workspace(path_prefix = "", tf_repo_name = ""):

new_git_repository(
name = "onednn_gpu",
# rls-v3.4
commit = "ecd7fb6d5a0df6503d1691c1754a684b9c769c16",
# v3.5.1
commit = "2340f5ad9501a136ca2ea1a0c6e1328b55c87b02",
remote = "https://github.com/oneapi-src/oneDNN.git",
build_file = "//third_party/onednn:onednn_gpu.BUILD",
verbose = True,
Expand Down

0 comments on commit ef4c46d

Please sign in to comment.