Clean up dnnl_single_threaded build configurations.

PiperOrigin-RevId: 356810298
Change-Id: I15d7d417583be52c8cb23eea7fb073fc2b944edd
This commit is contained in:
Penporn Koanantakool 2021-02-10 13:15:14 -08:00 committed by TensorFlower Gardener
parent a85d5a5b1b
commit 201e2a9f94

View File

@ -51,20 +51,6 @@ template_rule(
}), }),
) )
_DNNL_VERSION_1_6_4 = {
"@DNNL_VERSION_MAJOR@": "1",
"@DNNL_VERSION_MINOR@": "6",
"@DNNL_VERSION_PATCH@": "4",
"@DNNL_VERSION_HASH@": "N/A",
}
_DNNL_VERSION_1_7 = {
"@DNNL_VERSION_MAJOR@": "1",
"@DNNL_VERSION_MINOR@": "7",
"@DNNL_VERSION_PATCH@": "0",
"@DNNL_VERSION_HASH@": "N/A",
}
# Create the file dnnl_version.h with DNNL version numbers. # Create the file dnnl_version.h with DNNL version numbers.
# Currently, the version numbers are hard coded here. If DNNL is upgraded then # Currently, the version numbers are hard coded here. If DNNL is upgraded then
# the version numbers have to be updated manually. The version numbers can be # the version numbers have to be updated manually. The version numbers can be
@ -76,11 +62,12 @@ template_rule(
name = "dnnl_version_h", name = "dnnl_version_h",
src = "include/dnnl_version.h.in", src = "include/dnnl_version.h.in",
out = "include/dnnl_version.h", out = "include/dnnl_version.h",
substitutions = select({ substitutions = {
"@org_tensorflow//third_party/mkl_dnn:build_with_mkldnn_threadpool": _DNNL_VERSION_1_6_4, "@DNNL_VERSION_MAJOR@": "1",
"@org_tensorflow//third_party/mkl:build_with_mkl": _DNNL_VERSION_1_6_4, "@DNNL_VERSION_MINOR@": "6",
"//conditions:default": _DNNL_VERSION_1_7, "@DNNL_VERSION_PATCH@": "4",
}), "@DNNL_VERSION_HASH@": "N/A",
},
) )
cc_library( cc_library(
@ -128,33 +115,41 @@ cc_library(
srcs = glob([ srcs = glob([
"src/common/*.cpp", "src/common/*.cpp",
"src/cpu/*.cpp", "src/cpu/*.cpp",
"src/cpu/**/*.c", "src/cpu/gemm/**/*.cpp",
"src/cpu/**/*.cpp", "src/cpu/matmul/**/*.cpp",
"src/cpu/rnn/**/*.cpp",
"src/cpu/x64/**/*.cpp",
"src/cpu/x64/jit_utils/jitprofiling/*.c",
]) + [ ]) + [
":dnnl_config_h", ":dnnl_config_h",
":dnnl_version_h", ":dnnl_version_h",
], ],
copts = ["-fexceptions"], copts = [
"-fexceptions",
"-DDNNL_ENABLE_MAX_CPU_ISA",
],
includes = [ includes = [
"include", "include",
"src", "src",
"src/common", "src/common",
"src/cpu", "src/cpu",
"src/cpu/gemm", "src/cpu/gemm",
"src/cpu/gemm/bf16",
"src/cpu/gemm/f32", "src/cpu/gemm/f32",
"src/cpu/gemm/s8x8s32", "src/cpu/gemm/s8x8s32",
"src/cpu/matmul",
"src/cpu/rnn", "src/cpu/rnn",
"src/cpu/x64",
"src/cpu/x64/jit_utils", "src/cpu/x64/jit_utils",
"src/cpu/xbyak", "src/cpu/x64/jit_utils/jitprofiling",
"src/cpu/x64/xbyak",
], ],
textual_hdrs = glob([ textual_hdrs = glob([
"include/*", "include/*",
"src/common/*.hpp", "src/common/*.hpp",
"src/cpu/*.hpp", "src/cpu/*.hpp",
"src/cpu/**/*.h",
"src/cpu/**/*.hpp", "src/cpu/**/*.hpp",
"src/cpu/xbyak/*.h", "src/cpu/x64/jit_utils/jitprofiling/*.h",
"src/cpu/x64/xbyak/*.h",
]), ]),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )