Skip to content

Commit

Permalink
update for new oneDNN (#2742)
Browse files Browse the repository at this point in the history
  • Loading branch information
guizili0 authored Aug 15, 2024
1 parent 3c076b4 commit 8d57030
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
4 changes: 2 additions & 2 deletions itex/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ def itex_workspace(path_prefix = "", tf_repo_name = ""):

new_git_repository(
name = "onednn_gpu",
# rls-v3.5
commit = "2f39adb",
# main
commit = "2e7b691",
remote = "https://github.com/oneapi-src/oneDNN.git",
build_file = clean_dep("//third_party/onednn:onednn_gpu.BUILD"),
verbose = True,
Expand Down
20 changes: 15 additions & 5 deletions third_party/onednn/onednn_gpu.BUILD
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
exports_files(["LICENSE"])

load("@intel_extension_for_tensorflow//itex:itex.bzl", "cc_library")
load(
"@intel_extension_for_tensorflow//third_party:common.bzl",
"template_rule",
)
load("@intel_extension_for_tensorflow//third_party/onednn:build_defs.bzl", "if_graph_compiler", "if_llga_debug")
load(
"@intel_extension_for_tensorflow//third_party/onednn:onednn.bzl",
"convert_cl_to_cpp",
"convert_header_to_cpp",
"gen_onednn_version",
)
load("@itex_local_config_sycl//sycl:build_defs.bzl", "if_sycl_build_is_configured")
load("@intel_extension_for_tensorflow//itex:itex.bzl", "cc_library")

exports_files(["LICENSE"])

config_setting(
name = "clang_linux_x86_64",
Expand All @@ -36,6 +37,7 @@ _CMAKE_COMMON_LIST = {
"#cmakedefine DNNL_USE_RT_OBJECTS_IN_PRIMITIVE_CACHE": "#define DNNL_USE_RT_OBJECTS_IN_PRIMITIVE_CACHE",
"#cmakedefine DNNL_ENABLE_STACK_CHECKER": "#undef DNNL_ENABLE_STACK_CHECKER",
"#cmakedefine DNNL_EXPERIMENTAL": "#define DNNL_EXPERIMENTAL",
"#cmakedefine DNNL_DISABLE_GPU_REF_KERNELS": "#undef DNNL_DISABLE_GPU_REF_KERNELS",
"#cmakedefine01 BUILD_TRAINING": "#define BUILD_TRAINING 1",
"#cmakedefine01 BUILD_INFERENCE": "#define BUILD_INFERENCE 0",
"#cmakedefine01 BUILD_PRIMITIVE_ALL": "#define BUILD_PRIMITIVE_ALL 1",
Expand Down Expand Up @@ -120,6 +122,12 @@ gen_onednn_version(
header_out = "include/oneapi/dnnl/dnnl_version.h",
)

gen_onednn_version(
name = "onednn_version_hash_generator",
header_in = "include/oneapi/dnnl/dnnl_version_hash.h.in",
header_out = "include/oneapi/dnnl/dnnl_version_hash.h",
)

filegroup(
name = "onednn_src",
srcs = glob(
Expand All @@ -144,6 +152,7 @@ filegroup(
":header_generator",
":kernel_list_generator",
":onednn_version_generator",
":onednn_version_hash_generator",
],
)

Expand Down Expand Up @@ -171,6 +180,9 @@ cc_library(
"src/common",
"src/cpu/gemm",
"src/cpu/xbyak",
"src/gpu/intel/jit/gemm/",
"src/gpu/intel/jit/gemm/include/",
"src/gpu/intel/jit/ngen/",
"src/gpu/intel/ocl",
"src/sycl",
],
Expand All @@ -179,8 +191,6 @@ cc_library(
deps = ["@itex_local_config_sycl//sycl:itex_gpu_headers"],
)

load("@intel_extension_for_tensorflow//third_party/onednn:build_defs.bzl", "if_graph_compiler", "if_llga_debug")

_GRAPH_COPTS_GPU_LIST = [
"-Wall",
"-Wno-unknown-pragmas",
Expand Down

0 comments on commit 8d57030

Please sign in to comment.