[WIP] MKL repos download for mac and windows + update to MKL(-DNN) 0.12 (#17396)
* Fix MKL build on MacOS
* Fix invalid return type, user_memory_->set_data_handle(buf) returns void.
* Fix type mismatch
* Implement downloading and linking of MKL repo on mac and windows
* Rework the way MKL libs are binded to avoid warnings and simplify code
* Switch to matching version of MKL-DNN
* Add mirror links
* Add renamed license file
* Add -fopenmp flag for linux mkl build as Slice op kernel is optimized using OpenMP
* Use clean_dep in the entire file for consistency
* Fix build. Constants are declrared as static in header outside the class scope now
* Reworked fix for `-openmp` flag using the suggestion from @gunan
Original version here b4d39c5226
This commit is contained in:
parent
319f20ad87
commit
116b9f34c3
@ -502,7 +502,6 @@ def set_cc_opt_flags(environ_cp):
|
|||||||
write_to_bazelrc('build --copt=-DGEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK')
|
write_to_bazelrc('build --copt=-DGEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK')
|
||||||
write_to_bazelrc('build --host_copt=-DGEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK')
|
write_to_bazelrc('build --host_copt=-DGEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK')
|
||||||
|
|
||||||
|
|
||||||
def set_tf_cuda_clang(environ_cp):
|
def set_tf_cuda_clang(environ_cp):
|
||||||
"""set TF_CUDA_CLANG action_env.
|
"""set TF_CUDA_CLANG action_env.
|
||||||
|
|
||||||
|
@ -19,9 +19,6 @@ limitations under the License.
|
|||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
|
|
||||||
constexpr const char* MklCPUAllocator::kMaxLimitStr;
|
|
||||||
constexpr const size_t MklCPUAllocator::kDefaultMaxLimit;
|
|
||||||
|
|
||||||
} // namespace tensorflow
|
} // namespace tensorflow
|
||||||
|
|
||||||
#endif // INTEL_MKL
|
#endif // INTEL_MKL
|
||||||
|
@ -50,7 +50,7 @@ class MklCPUAllocator : public VisitableAllocator {
|
|||||||
// Constructor and other standard functions
|
// Constructor and other standard functions
|
||||||
|
|
||||||
/// Environment variable that user can set to upper bound on memory allocation
|
/// Environment variable that user can set to upper bound on memory allocation
|
||||||
static constexpr const char* kMaxLimitStr = "TF_MKL_ALLOC_MAX_BYTES";
|
static inline constexpr const char* kMaxLimitStr = "TF_MKL_ALLOC_MAX_BYTES";
|
||||||
|
|
||||||
/// Default upper limit on allocator size - 64GB
|
/// Default upper limit on allocator size - 64GB
|
||||||
static constexpr size_t kDefaultMaxLimit = 64LL << 30;
|
static constexpr size_t kDefaultMaxLimit = 64LL << 30;
|
||||||
|
@ -933,7 +933,7 @@ class MklFusedBatchNormOp : public OpKernel {
|
|||||||
bool is_training_;
|
bool is_training_;
|
||||||
T* mean_values_;
|
T* mean_values_;
|
||||||
T* variance_values_;
|
T* variance_values_;
|
||||||
size_t depth_; // batch normalization is done for per channel.
|
int depth_; // batch normalization is done for per channel.
|
||||||
|
|
||||||
void ExtractParams(OpKernelContext* context) {
|
void ExtractParams(OpKernelContext* context) {
|
||||||
const Tensor& input = MklGetInput(context, 0);
|
const Tensor& input = MklGetInput(context, 0);
|
||||||
|
@ -1579,10 +1579,10 @@ class MklDnnData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Set function for data buffer of user memory primitive.
|
/// Set function for data buffer of user memory primitive.
|
||||||
inline void* SetUsrMemDataHandle(void* data_buffer) {
|
inline void SetUsrMemDataHandle(void* data_buffer) {
|
||||||
CHECK_NOTNULL(user_memory_);
|
CHECK_NOTNULL(user_memory_);
|
||||||
CHECK_NOTNULL(data_buffer);
|
CHECK_NOTNULL(data_buffer);
|
||||||
return user_memory_->set_data_handle(data_buffer);
|
user_memory_->set_data_handle(data_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set function for data buffer of user memory primitive.
|
/// Set function for data buffer of user memory primitive.
|
||||||
|
@ -22,6 +22,7 @@ load(
|
|||||||
load(
|
load(
|
||||||
"//third_party/mkl:build_defs.bzl",
|
"//third_party/mkl:build_defs.bzl",
|
||||||
"if_mkl",
|
"if_mkl",
|
||||||
|
"if_mkl_lnx_x64"
|
||||||
)
|
)
|
||||||
|
|
||||||
def register_extension_info(**kwargs):
|
def register_extension_info(**kwargs):
|
||||||
@ -202,7 +203,8 @@ def tf_copts(android_optimization_level_override="-O2", is_external=False):
|
|||||||
"-ftemplate-depth=900"])
|
"-ftemplate-depth=900"])
|
||||||
+ if_cuda(["-DGOOGLE_CUDA=1"])
|
+ if_cuda(["-DGOOGLE_CUDA=1"])
|
||||||
+ if_tensorrt(["-DGOOGLE_TENSORRT=1"])
|
+ if_tensorrt(["-DGOOGLE_TENSORRT=1"])
|
||||||
+ if_mkl(["-DINTEL_MKL=1", "-DEIGEN_USE_VML", "-fopenmp",])
|
+ if_mkl(["-DINTEL_MKL=1", "-DEIGEN_USE_VML"])
|
||||||
|
+ if_mkl_lnx_x64(["-fopenmp"])
|
||||||
+ if_android_arm(["-mfpu=neon"])
|
+ if_android_arm(["-mfpu=neon"])
|
||||||
+ if_linux_x86_64(["-msse3"])
|
+ if_linux_x86_64(["-msse3"])
|
||||||
+ if_ios_x86_64(["-msse4.1"])
|
+ if_ios_x86_64(["-msse4.1"])
|
||||||
|
@ -138,7 +138,6 @@ genrule(
|
|||||||
"@zlib_archive//:zlib.h",
|
"@zlib_archive//:zlib.h",
|
||||||
] + if_mkl([
|
] + if_mkl([
|
||||||
"//third_party/mkl:LICENSE",
|
"//third_party/mkl:LICENSE",
|
||||||
"@mkl//:LICENSE",
|
|
||||||
]),
|
]),
|
||||||
outs = ["include/tensorflow/c/LICENSE"],
|
outs = ["include/tensorflow/c/LICENSE"],
|
||||||
cmd = "$(location :concat_licenses.sh) $(SRCS) >$@",
|
cmd = "$(location :concat_licenses.sh) $(SRCS) >$@",
|
||||||
@ -176,7 +175,6 @@ genrule(
|
|||||||
"@zlib_archive//:zlib.h",
|
"@zlib_archive//:zlib.h",
|
||||||
] + if_mkl([
|
] + if_mkl([
|
||||||
"//third_party/mkl:LICENSE",
|
"//third_party/mkl:LICENSE",
|
||||||
"@mkl//:LICENSE",
|
|
||||||
]),
|
]),
|
||||||
outs = ["include/tensorflow/jni/LICENSE"],
|
outs = ["include/tensorflow/jni/LICENSE"],
|
||||||
cmd = "$(location :concat_licenses.sh) $(SRCS) >$@",
|
cmd = "$(location :concat_licenses.sh) $(SRCS) >$@",
|
||||||
|
@ -126,7 +126,6 @@ filegroup(
|
|||||||
"@org_python_pypi_backports_weakref//:LICENSE",
|
"@org_python_pypi_backports_weakref//:LICENSE",
|
||||||
] + if_mkl([
|
] + if_mkl([
|
||||||
"//third_party/mkl:LICENSE",
|
"//third_party/mkl:LICENSE",
|
||||||
"@mkl//:LICENSE",
|
|
||||||
]) + if_not_windows([
|
]) + if_not_windows([
|
||||||
"@nccl_archive//:LICENSE.txt",
|
"@nccl_archive//:LICENSE.txt",
|
||||||
]) + tf_additional_license_deps(),
|
]) + tf_additional_license_deps(),
|
||||||
|
@ -15,6 +15,11 @@ load("@io_bazel_rules_closure//closure/private:java_import_external.bzl", "java_
|
|||||||
load("@io_bazel_rules_closure//closure:defs.bzl", "filegroup_external")
|
load("@io_bazel_rules_closure//closure:defs.bzl", "filegroup_external")
|
||||||
|
|
||||||
|
|
||||||
|
# Sanitize a dependency so that it works correctly from code that includes
|
||||||
|
# TensorFlow as a submodule.
|
||||||
|
def clean_dep(dep):
|
||||||
|
return str(Label(dep))
|
||||||
|
|
||||||
# If TensorFlow is linked as a submodule.
|
# If TensorFlow is linked as a submodule.
|
||||||
# path_prefix is no longer used.
|
# path_prefix is no longer used.
|
||||||
# tf_repo_name is thought to be under consideration.
|
# tf_repo_name is thought to be under consideration.
|
||||||
@ -32,17 +37,37 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
arm_compiler_configure(
|
arm_compiler_configure(
|
||||||
name="local_config_arm_compiler",
|
name="local_config_arm_compiler",
|
||||||
remote_config_repo="../arm_compiler",
|
remote_config_repo="../arm_compiler",
|
||||||
build_file = str(Label("//third_party/toolchains/cpus/arm:BUILD")))
|
build_file = clean_dep("//third_party/toolchains/cpus/arm:BUILD"))
|
||||||
|
|
||||||
mkl_repository(
|
mkl_repository(
|
||||||
name = "mkl",
|
name = "mkl_linux",
|
||||||
urls = [
|
urls = [
|
||||||
"https://mirror.bazel.build/github.com/01org/mkl-dnn/releases/download/v0.11/mklml_lnx_2018.0.1.20171007.tgz",
|
"https://mirror.bazel.build/intel/mkl-dnn/releases/download/v0.12/mklml_lnx_2018.0.1.20171227.tgz",
|
||||||
"https://github.com/01org/mkl-dnn/releases/download/v0.11/mklml_lnx_2018.0.1.20171007.tgz",
|
"https://github.com/intel/mkl-dnn/releases/download/v0.12/mklml_lnx_2018.0.1.20171227.tgz",
|
||||||
],
|
],
|
||||||
sha256 = "6b07cb7e5451db67c2e31e785ae458b18f7f363c60a61685488f69e9ae7199d4",
|
sha256 = "feacc3d82565c1231470359b42c696236fae873704e0b013436afba5fd4fd30f",
|
||||||
strip_prefix = "mklml_lnx_2018.0.1.20171007",
|
strip_prefix = "mklml_lnx_2018.0.1.20171227",
|
||||||
build_file = str(Label("//third_party/mkl:mkl.BUILD")),
|
build_file = clean_dep("//third_party/mkl:mkl.BUILD")
|
||||||
|
)
|
||||||
|
mkl_repository(
|
||||||
|
name = "mkl_windows",
|
||||||
|
urls = [
|
||||||
|
"https://mirror.bazel.build/intel/mkl-dnn/releases/download/v0.12/mklml_win_2018.0.1.20171227.zip",
|
||||||
|
"https://github.com/intel/mkl-dnn/releases/download/v0.12/mklml_win_2018.0.1.20171227.zip"
|
||||||
|
],
|
||||||
|
sha256 = "24bae8d7b22b431a654acadea43f2243c46ae6b1e5a73a4a936825f31d284ee4",
|
||||||
|
strip_prefix = "mklml_win_2018.0.1.20171227",
|
||||||
|
build_file = clean_dep("//third_party/mkl:mkl.BUILD")
|
||||||
|
)
|
||||||
|
mkl_repository(
|
||||||
|
name = "mkl_darwin",
|
||||||
|
urls = [
|
||||||
|
"https://mirror.bazel.build/intel/mkl-dnn/releases/download/v0.12/mklml_mac_2018.0.1.20171227.tgz",
|
||||||
|
"https://github.com/intel/mkl-dnn/releases/download/v0.12/mklml_mac_2018.0.1.20171227.tgz"
|
||||||
|
],
|
||||||
|
sha256 = "0e954ec6fd3dc5e37f64c4043f6b5613dd687558da3df1028b3b7c29ff5cf77f",
|
||||||
|
strip_prefix = "mklml_mac_2018.0.1.20171227",
|
||||||
|
build_file = clean_dep("//third_party/mkl:mkl.BUILD")
|
||||||
)
|
)
|
||||||
|
|
||||||
if path_prefix:
|
if path_prefix:
|
||||||
@ -52,12 +77,12 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
name = "mkl_dnn",
|
name = "mkl_dnn",
|
||||||
urls = [
|
urls = [
|
||||||
"https://mirror.bazel.build/github.com/01org/mkl-dnn/archive/e0bfcaa7fcb2b1e1558f5f0676933c1db807a729.tar.gz",
|
"https://mirror.bazel.build/github.com/intel/mkl-dnn/archive/v0.12.tar.gz",
|
||||||
"https://github.com/01org/mkl-dnn/archive/e0bfcaa7fcb2b1e1558f5f0676933c1db807a729.tar.gz",
|
"https://github.com/intel/mkl-dnn/archive/v0.12.tar.gz",
|
||||||
],
|
],
|
||||||
sha256 = "02e244f63dd95402691a361392504c143eede9a89043426f174836638a9cbf09",
|
sha256 = "86fa2a8c12a56e3b725945acedeaa82492746be02545aba6d710f097e013e19e",
|
||||||
strip_prefix = "mkl-dnn-e0bfcaa7fcb2b1e1558f5f0676933c1db807a729",
|
strip_prefix = "mkl-dnn-0.12",
|
||||||
build_file = str(Label("//third_party/mkl_dnn:mkldnn.BUILD")),
|
build_file = clean_dep("//third_party/mkl_dnn:mkldnn.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -68,7 +93,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "5996380e3e8b981f55d1c8d58e709c00dbb4806ba367be75d0925a68cc2f6478",
|
sha256 = "5996380e3e8b981f55d1c8d58e709c00dbb4806ba367be75d0925a68cc2f6478",
|
||||||
strip_prefix = "abseil-cpp-720c017e30339fd1786ce4aac68bc8559736e53f",
|
strip_prefix = "abseil-cpp-720c017e30339fd1786ce4aac68bc8559736e53f",
|
||||||
build_file = str(Label("//third_party:com_google_absl.BUILD")),
|
build_file = clean_dep("//third_party:com_google_absl.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -79,8 +104,8 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "0cadb31a35b514bf2dfd6b5d38205da94ef326ec6908fc3fd7c269948467214f",
|
sha256 = "0cadb31a35b514bf2dfd6b5d38205da94ef326ec6908fc3fd7c269948467214f",
|
||||||
strip_prefix = "eigen-eigen-2355b229ea4c",
|
strip_prefix = "eigen-eigen-2355b229ea4c",
|
||||||
build_file = str(Label("//third_party:eigen.BUILD")),
|
build_file = clean_dep("//third_party:eigen.BUILD"),
|
||||||
patch_file = str(Label("//third_party:eigen_fix_cuda_compilation.patch"))
|
patch_file = clean_dep("//third_party:eigen_fix_cuda_compilation.patch")
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -93,7 +118,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
# remove the whitelist entry in third_party/repo.bzl.
|
# remove the whitelist entry in third_party/repo.bzl.
|
||||||
# "https://github.com/raspberrypi/tools/archive/0e906ebc527eab1cdbf7adabff5b474da9562e9f.tar.gz",
|
# "https://github.com/raspberrypi/tools/archive/0e906ebc527eab1cdbf7adabff5b474da9562e9f.tar.gz",
|
||||||
],
|
],
|
||||||
build_file = str(Label("//:arm_compiler.BUILD")),
|
build_file = clean_dep("//:arm_compiler.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -104,7 +129,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "2ade869c3f42f23b5263c7d594aa3c7e5e61ac6a3afcaf5d6e42899d2a7986ce",
|
sha256 = "2ade869c3f42f23b5263c7d594aa3c7e5e61ac6a3afcaf5d6e42899d2a7986ce",
|
||||||
strip_prefix = "libxsmm-1.8.1",
|
strip_prefix = "libxsmm-1.8.1",
|
||||||
build_file = str(Label("//third_party:libxsmm.BUILD")),
|
build_file = clean_dep("//third_party:libxsmm.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -117,7 +142,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "932075525642b04ac6f1b50589f1df5cd72ec2f448b721fd32234cf183f0e755",
|
sha256 = "932075525642b04ac6f1b50589f1df5cd72ec2f448b721fd32234cf183f0e755",
|
||||||
strip_prefix = "or-tools-253f7955c6a1fd805408fba2e42ac6d45b312d15/src",
|
strip_prefix = "or-tools-253f7955c6a1fd805408fba2e42ac6d45b312d15/src",
|
||||||
build_file = str(Label("//third_party:ortools.BUILD")),
|
build_file = clean_dep("//third_party:ortools.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -149,7 +174,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "6560547c63e4af82b0f202cb710ceabb3f21347a4b996db565a411da5b17aba0",
|
sha256 = "6560547c63e4af82b0f202cb710ceabb3f21347a4b996db565a411da5b17aba0",
|
||||||
strip_prefix = "farmhash-816a4ae622e964763ca0862d9dbd19324a1eaf45",
|
strip_prefix = "farmhash-816a4ae622e964763ca0862d9dbd19324a1eaf45",
|
||||||
build_file = str(Label("//third_party:farmhash.BUILD")),
|
build_file = clean_dep("//third_party:farmhash.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -160,7 +185,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "0f30a15b1566d93f146c8d149878a06e91d9bb7ec2cfd76906df62a82be4aac9",
|
sha256 = "0f30a15b1566d93f146c8d149878a06e91d9bb7ec2cfd76906df62a82be4aac9",
|
||||||
strip_prefix = "highwayhash-dfcb97ca4fe9277bf9dc1802dd979b071896453b",
|
strip_prefix = "highwayhash-dfcb97ca4fe9277bf9dc1802dd979b071896453b",
|
||||||
build_file = str(Label("//third_party:highwayhash.BUILD")),
|
build_file = clean_dep("//third_party:highwayhash.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -171,7 +196,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "00b0891c678c065446ca59bcee64719d0096d54d6886e6e472aeee2e170ae324",
|
sha256 = "00b0891c678c065446ca59bcee64719d0096d54d6886e6e472aeee2e170ae324",
|
||||||
strip_prefix = "nasm-2.12.02",
|
strip_prefix = "nasm-2.12.02",
|
||||||
build_file = str(Label("//third_party:nasm.BUILD")),
|
build_file = clean_dep("//third_party:nasm.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -182,7 +207,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "c15a9607892113946379ccea3ca8b85018301b200754f209453ab21674268e77",
|
sha256 = "c15a9607892113946379ccea3ca8b85018301b200754f209453ab21674268e77",
|
||||||
strip_prefix = "libjpeg-turbo-1.5.1",
|
strip_prefix = "libjpeg-turbo-1.5.1",
|
||||||
build_file = str(Label("//third_party/jpeg:jpeg.BUILD")),
|
build_file = clean_dep("//third_party/jpeg:jpeg.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -193,7 +218,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "716c59c7dfc808a4c368f8ada526932be72b2fcea11dd85dc9d88b1df1dfe9c2",
|
sha256 = "716c59c7dfc808a4c368f8ada526932be72b2fcea11dd85dc9d88b1df1dfe9c2",
|
||||||
strip_prefix = "libpng-1.2.53",
|
strip_prefix = "libpng-1.2.53",
|
||||||
build_file = str(Label("//third_party:png.BUILD")),
|
build_file = clean_dep("//third_party:png.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -204,7 +229,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "208780b3616f9de0aeb50822b7a8f5482f6515193859e91ed61637be6ad74fd4",
|
sha256 = "208780b3616f9de0aeb50822b7a8f5482f6515193859e91ed61637be6ad74fd4",
|
||||||
strip_prefix = "sqlite-amalgamation-3200000",
|
strip_prefix = "sqlite-amalgamation-3200000",
|
||||||
build_file = str(Label("//third_party:sqlite.BUILD")),
|
build_file = clean_dep("//third_party:sqlite.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -215,7 +240,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "34a7377ba834397db019e8eb122e551a49c98f49df75ec3fcc92b9a794a4f6d1",
|
sha256 = "34a7377ba834397db019e8eb122e551a49c98f49df75ec3fcc92b9a794a4f6d1",
|
||||||
strip_prefix = "giflib-5.1.4",
|
strip_prefix = "giflib-5.1.4",
|
||||||
build_file = str(Label("//third_party:gif.BUILD")),
|
build_file = clean_dep("//third_party:gif.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -226,7 +251,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
|
sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
|
||||||
strip_prefix = "six-1.10.0",
|
strip_prefix = "six-1.10.0",
|
||||||
build_file = str(Label("//third_party:six.BUILD")),
|
build_file = clean_dep("//third_party:six.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -237,7 +262,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "ff6d2e2962d834acb125cc4dcc80c54a8c17c253f4cc9d9c43b5102a560bb75d",
|
sha256 = "ff6d2e2962d834acb125cc4dcc80c54a8c17c253f4cc9d9c43b5102a560bb75d",
|
||||||
strip_prefix = "astor-0.6.2",
|
strip_prefix = "astor-0.6.2",
|
||||||
build_file = str(Label("//third_party:astor.BUILD")),
|
build_file = clean_dep("//third_party:astor.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -248,7 +273,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "7068908321ecd2774f145193c4b34a11305bd104b4551b09273dfd1d6a374930",
|
sha256 = "7068908321ecd2774f145193c4b34a11305bd104b4551b09273dfd1d6a374930",
|
||||||
strip_prefix = "gast-0.2.0",
|
strip_prefix = "gast-0.2.0",
|
||||||
build_file = str(Label("//third_party:gast.BUILD")),
|
build_file = clean_dep("//third_party:gast.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -259,7 +284,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b",
|
sha256 = "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b",
|
||||||
strip_prefix = "termcolor-1.1.0",
|
strip_prefix = "termcolor-1.1.0",
|
||||||
build_file = str(Label("//third_party:termcolor.BUILD")),
|
build_file = clean_dep("//third_party:termcolor.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -280,7 +305,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "8813bf712a66b3d8b85dc289e1104ed220f1878cf981e2fe756dfaabe9a82892",
|
sha256 = "8813bf712a66b3d8b85dc289e1104ed220f1878cf981e2fe756dfaabe9a82892",
|
||||||
strip_prefix = "backports.weakref-1.0rc1/src",
|
strip_prefix = "backports.weakref-1.0rc1/src",
|
||||||
build_file = str(Label("//third_party:backports_weakref.BUILD")),
|
build_file = clean_dep("//third_party:backports_weakref.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -291,7 +316,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "2dadd04a2802de27e0fe5a19b76538f6da9d39ff244036afa00c1bba754de5ee",
|
sha256 = "2dadd04a2802de27e0fe5a19b76538f6da9d39ff244036afa00c1bba754de5ee",
|
||||||
strip_prefix = "codegen-1.0",
|
strip_prefix = "codegen-1.0",
|
||||||
build_file = str(Label("//third_party:codegen.BUILD")),
|
build_file = clean_dep("//third_party:codegen.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
filegroup_external(
|
filegroup_external(
|
||||||
@ -376,7 +401,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
"http://ftp.exim.org/pub/pcre/pcre-8.39.tar.gz",
|
"http://ftp.exim.org/pub/pcre/pcre-8.39.tar.gz",
|
||||||
],
|
],
|
||||||
strip_prefix = "pcre-8.39",
|
strip_prefix = "pcre-8.39",
|
||||||
build_file = str(Label("//third_party:pcre.BUILD")),
|
build_file = clean_dep("//third_party:pcre.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -388,7 +413,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
"http://pilotfiber.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz",
|
"http://pilotfiber.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz",
|
||||||
],
|
],
|
||||||
strip_prefix = "swig-3.0.8",
|
strip_prefix = "swig-3.0.8",
|
||||||
build_file = str(Label("//third_party:swig.BUILD")),
|
build_file = clean_dep("//third_party:swig.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -399,7 +424,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
"https://curl.haxx.se/download/curl-7.49.1.tar.gz",
|
"https://curl.haxx.se/download/curl-7.49.1.tar.gz",
|
||||||
],
|
],
|
||||||
strip_prefix = "curl-7.49.1",
|
strip_prefix = "curl-7.49.1",
|
||||||
build_file = str(Label("//third_party:curl.BUILD")),
|
build_file = clean_dep("//third_party:curl.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -420,7 +445,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
"https://github.com/antirez/linenoise/archive/c894b9e59f02203dbe4e2be657572cf88c4230c3.tar.gz",
|
"https://github.com/antirez/linenoise/archive/c894b9e59f02203dbe4e2be657572cf88c4230c3.tar.gz",
|
||||||
],
|
],
|
||||||
strip_prefix = "linenoise-c894b9e59f02203dbe4e2be657572cf88c4230c3",
|
strip_prefix = "linenoise-c894b9e59f02203dbe4e2be657572cf88c4230c3",
|
||||||
build_file = str(Label("//third_party:linenoise.BUILD")),
|
build_file = clean_dep("//third_party:linenoise.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO(phawkins): currently, this rule uses an unofficial LLVM mirror.
|
# TODO(phawkins): currently, this rule uses an unofficial LLVM mirror.
|
||||||
@ -433,7 +458,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "1efbb9b05af88368be984d2f6526061d4a857181ef10f8841889a3a46869bb01",
|
sha256 = "1efbb9b05af88368be984d2f6526061d4a857181ef10f8841889a3a46869bb01",
|
||||||
strip_prefix = "llvm-1c3cdea2f181d8e14ee184466c5fb237f1b4cda8",
|
strip_prefix = "llvm-1c3cdea2f181d8e14ee184466c5fb237f1b4cda8",
|
||||||
build_file = str(Label("//third_party/llvm:llvm.BUILD")),
|
build_file = clean_dep("//third_party/llvm:llvm.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -444,7 +469,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "108532fb94c6f227558d45be3f3347b52539f0f58290a7bb31ec06c462d05326",
|
sha256 = "108532fb94c6f227558d45be3f3347b52539f0f58290a7bb31ec06c462d05326",
|
||||||
strip_prefix = "lmdb-LMDB_0.9.19/libraries/liblmdb",
|
strip_prefix = "lmdb-LMDB_0.9.19/libraries/liblmdb",
|
||||||
build_file = str(Label("//third_party:lmdb.BUILD")),
|
build_file = clean_dep("//third_party:lmdb.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -455,7 +480,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "07d34db40593d257324ec5fb9debc4dc33f29f8fb44e33a2eeb35503e61d0fe2",
|
sha256 = "07d34db40593d257324ec5fb9debc4dc33f29f8fb44e33a2eeb35503e61d0fe2",
|
||||||
strip_prefix = "jsoncpp-11086dd6a7eba04289944367ca82cea71299ed70",
|
strip_prefix = "jsoncpp-11086dd6a7eba04289944367ca82cea71299ed70",
|
||||||
build_file = str(Label("//third_party:jsoncpp.BUILD")),
|
build_file = clean_dep("//third_party:jsoncpp.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -476,7 +501,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d",
|
sha256 = "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d",
|
||||||
strip_prefix = "zlib-1.2.8",
|
strip_prefix = "zlib-1.2.8",
|
||||||
build_file = str(Label("//third_party:zlib.BUILD")),
|
build_file = clean_dep("//third_party:zlib.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -486,7 +511,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
"http://www.kurims.kyoto-u.ac.jp/~ooura/fft.tgz",
|
"http://www.kurims.kyoto-u.ac.jp/~ooura/fft.tgz",
|
||||||
],
|
],
|
||||||
sha256 = "52bb637c70b971958ec79c9c8752b1df5ff0218a4db4510e60826e0cb79b5296",
|
sha256 = "52bb637c70b971958ec79c9c8752b1df5ff0218a4db4510e60826e0cb79b5296",
|
||||||
build_file = str(Label("//third_party/fft2d:fft2d.BUILD")),
|
build_file = clean_dep("//third_party/fft2d:fft2d.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -497,7 +522,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "2f7504c73d85bac842e893340333be8cb8561710642fc9562fccdd9d2c3fcc94",
|
sha256 = "2f7504c73d85bac842e893340333be8cb8561710642fc9562fccdd9d2c3fcc94",
|
||||||
strip_prefix = "snappy-1.1.4",
|
strip_prefix = "snappy-1.1.4",
|
||||||
build_file = str(Label("//third_party:snappy.BUILD")),
|
build_file = clean_dep("//third_party:snappy.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -508,7 +533,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "2ca86fb6179ecbff789cc67c836139c1bbc0324ed8c04643405a30bf26325176",
|
sha256 = "2ca86fb6179ecbff789cc67c836139c1bbc0324ed8c04643405a30bf26325176",
|
||||||
strip_prefix = "nccl-03d856977ecbaac87e598c0c4bafca96761b9ac7",
|
strip_prefix = "nccl-03d856977ecbaac87e598c0c4bafca96761b9ac7",
|
||||||
build_file = str(Label("//third_party:nccl.BUILD")),
|
build_file = clean_dep("//third_party:nccl.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -519,8 +544,8 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "dd035d57c8f19b0b612dd6eefe6e5eebad76f506e302cccb7c2066f25a83585e",
|
sha256 = "dd035d57c8f19b0b612dd6eefe6e5eebad76f506e302cccb7c2066f25a83585e",
|
||||||
strip_prefix = "librdkafka-0.11.1",
|
strip_prefix = "librdkafka-0.11.1",
|
||||||
build_file = str(Label("//third_party:kafka/BUILD")),
|
build_file = clean_dep("//third_party:kafka/BUILD"),
|
||||||
patch_file = str(Label("//third_party/kafka:config.patch")),
|
patch_file = clean_dep("//third_party/kafka:config.patch"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -531,7 +556,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "b888d8ce5fc10254c3dd6c9020c7764dd53cf39cf011249d0b4deda895de1b7c",
|
sha256 = "b888d8ce5fc10254c3dd6c9020c7764dd53cf39cf011249d0b4deda895de1b7c",
|
||||||
strip_prefix = "aws-sdk-cpp-1.3.15",
|
strip_prefix = "aws-sdk-cpp-1.3.15",
|
||||||
build_file = str(Label("//third_party:aws.BUILD")),
|
build_file = clean_dep("//third_party:aws.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
java_import_external(
|
java_import_external(
|
||||||
@ -567,7 +592,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "3c8f25c02e806c3ce0ab5fb7da1817f89fc9732709024e2a81b6b82f7cc792a8",
|
sha256 = "3c8f25c02e806c3ce0ab5fb7da1817f89fc9732709024e2a81b6b82f7cc792a8",
|
||||||
strip_prefix = "jemalloc-4.4.0",
|
strip_prefix = "jemalloc-4.4.0",
|
||||||
build_file = str(Label("//third_party:jemalloc.BUILD")),
|
build_file = clean_dep("//third_party:jemalloc.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
java_import_external(
|
java_import_external(
|
||||||
@ -613,7 +638,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "e0928ca4aa10ea1e0551e2d7ce4d1d7ea2d84b2abbdef082b0da84268791d0c4",
|
sha256 = "e0928ca4aa10ea1e0551e2d7ce4d1d7ea2d84b2abbdef082b0da84268791d0c4",
|
||||||
strip_prefix = "pprof-c0fb62ec88c411cc91194465e54db2632845b650",
|
strip_prefix = "pprof-c0fb62ec88c411cc91194465e54db2632845b650",
|
||||||
build_file = str(Label("//third_party:pprof.BUILD")),
|
build_file = clean_dep("//third_party:pprof.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -624,7 +649,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
],
|
],
|
||||||
sha256 = "6bfa06ab52a650ae7ee6963143a0bbc667d6504822cbd9670369b598f18c58c3",
|
sha256 = "6bfa06ab52a650ae7ee6963143a0bbc667d6504822cbd9670369b598f18c58c3",
|
||||||
strip_prefix = "cub-1.8.0",
|
strip_prefix = "cub-1.8.0",
|
||||||
build_file = str(Label("//third_party:cub.BUILD")),
|
build_file = clean_dep("//third_party:cub.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -635,7 +660,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
"https://github.com/cython/cython/archive/3732784c45cfb040a5b0936951d196f83a12ea17.tar.gz",
|
"https://github.com/cython/cython/archive/3732784c45cfb040a5b0936951d196f83a12ea17.tar.gz",
|
||||||
],
|
],
|
||||||
strip_prefix = "cython-3732784c45cfb040a5b0936951d196f83a12ea17",
|
strip_prefix = "cython-3732784c45cfb040a5b0936951d196f83a12ea17",
|
||||||
build_file = str(Label("//third_party:cython.BUILD")),
|
build_file = clean_dep("//third_party:cython.BUILD"),
|
||||||
delete = ["BUILD.bazel"],
|
delete = ["BUILD.bazel"],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -657,7 +682,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
"https://mirror.bazel.build/github.com/intel/ARM_NEON_2_x86_SSE/archive/0f77d9d182265259b135dad949230ecbf1a2633d.tar.gz",
|
"https://mirror.bazel.build/github.com/intel/ARM_NEON_2_x86_SSE/archive/0f77d9d182265259b135dad949230ecbf1a2633d.tar.gz",
|
||||||
"https://github.com/intel/ARM_NEON_2_x86_SSE/archive/0f77d9d182265259b135dad949230ecbf1a2633d.tar.gz",
|
"https://github.com/intel/ARM_NEON_2_x86_SSE/archive/0f77d9d182265259b135dad949230ecbf1a2633d.tar.gz",
|
||||||
],
|
],
|
||||||
build_file = str(Label("//third_party:arm_neon_2_x86_sse.BUILD")),
|
build_file = clean_dep("//third_party:arm_neon_2_x86_sse.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -668,7 +693,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
"https://mirror.bazel.build/github.com/google/flatbuffers/archive/971a68110e4fc1bace10fcb6deeb189e7e1a34ce.tar.gz",
|
"https://mirror.bazel.build/github.com/google/flatbuffers/archive/971a68110e4fc1bace10fcb6deeb189e7e1a34ce.tar.gz",
|
||||||
"https://github.com/google/flatbuffers/archive/971a68110e4fc1bace10fcb6deeb189e7e1a34ce.tar.gz",
|
"https://github.com/google/flatbuffers/archive/971a68110e4fc1bace10fcb6deeb189e7e1a34ce.tar.gz",
|
||||||
],
|
],
|
||||||
build_file = str(Label("//third_party/flatbuffers:flatbuffers.BUILD")),
|
build_file = clean_dep("//third_party/flatbuffers:flatbuffers.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -678,7 +703,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
"https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_v1_224_android_quant_2017_11_08.zip",
|
"https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_v1_224_android_quant_2017_11_08.zip",
|
||||||
"https://storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_v1_224_android_quant_2017_11_08.zip",
|
"https://storage.googleapis.com/download.tensorflow.org/models/tflite/mobilenet_v1_224_android_quant_2017_11_08.zip",
|
||||||
],
|
],
|
||||||
build_file = str(Label("//third_party:tflite_mobilenet.BUILD")),
|
build_file = clean_dep("//third_party:tflite_mobilenet.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
tf_http_archive(
|
tf_http_archive(
|
||||||
@ -688,7 +713,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
"https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip",
|
"https://mirror.bazel.build/storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip",
|
||||||
"https://storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip"
|
"https://storage.googleapis.com/download.tensorflow.org/models/tflite/smartreply_1.0_2017_11_01.zip"
|
||||||
],
|
],
|
||||||
build_file = str(Label("//third_party:tflite_smartreply.BUILD")),
|
build_file = clean_dep("//third_party:tflite_smartreply.BUILD"),
|
||||||
)
|
)
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@ -752,7 +777,7 @@ def tf_workspace(path_prefix="", tf_repo_name=""):
|
|||||||
# Needed by Protobuf
|
# Needed by Protobuf
|
||||||
native.bind(
|
native.bind(
|
||||||
name = "python_headers",
|
name = "python_headers",
|
||||||
actual = str(Label("//util/python:python_headers")),
|
actual = clean_dep("//util/python:python_headers"),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Needed by Protobuf
|
# Needed by Protobuf
|
||||||
|
47
third_party/mkl/BUILD
vendored
47
third_party/mkl/BUILD
vendored
@ -1,7 +1,5 @@
|
|||||||
licenses(["notice"]) # 3-Clause BSD
|
licenses(["notice"]) # 3-Clause BSD
|
||||||
|
|
||||||
exports_files(["LICENSE"])
|
|
||||||
|
|
||||||
config_setting(
|
config_setting(
|
||||||
name = "using_mkl",
|
name = "using_mkl",
|
||||||
values = {
|
values = {
|
||||||
@ -10,17 +8,52 @@ config_setting(
|
|||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
config_setting(
|
||||||
|
name = "using_mkl_lnx_x64",
|
||||||
|
values = {
|
||||||
|
"cpu": "k8",
|
||||||
|
"define": "using_mkl=true",
|
||||||
|
},
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
load(
|
load(
|
||||||
"//third_party/mkl:build_defs.bzl",
|
"//third_party/mkl:build_defs.bzl",
|
||||||
"if_mkl",
|
"if_mkl",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "LICENSE",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
srcs = ["MKL_LICENSE"] + select({
|
||||||
|
"@org_tensorflow//tensorflow:linux_x86_64": [
|
||||||
|
"@mkl_linux//:LICENSE",
|
||||||
|
],
|
||||||
|
"@org_tensorflow//tensorflow:darwin": [
|
||||||
|
"@mkl_darwin//:LICENSE",
|
||||||
|
],
|
||||||
|
"@org_tensorflow//tensorflow:windows": [
|
||||||
|
"@mkl_windows//:LICENSE",
|
||||||
|
]
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "intel_binary_blob",
|
name = "intel_binary_blob",
|
||||||
srcs = if_mkl([
|
|
||||||
"@mkl//:libmklml_intel.so",
|
|
||||||
"@mkl//:libiomp5.so",
|
|
||||||
]),
|
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = ["@mkl//:mkl_headers"],
|
deps = select({
|
||||||
|
"@org_tensorflow//tensorflow:linux_x86_64": [
|
||||||
|
"@mkl_linux//:mkl_headers",
|
||||||
|
"@mkl_linux//:mkl_libs_linux",
|
||||||
|
],
|
||||||
|
"@org_tensorflow//tensorflow:darwin": [
|
||||||
|
"@mkl_darwin//:mkl_headers",
|
||||||
|
"@mkl_darwin//:mkl_libs_darwin",
|
||||||
|
],
|
||||||
|
"@org_tensorflow//tensorflow:windows": [
|
||||||
|
"@mkl_windows//:mkl_headers",
|
||||||
|
"@mkl_windows//:mkl_libs_windows",
|
||||||
|
]
|
||||||
|
})
|
||||||
)
|
)
|
||||||
|
12
third_party/mkl/build_defs.bzl
vendored
12
third_party/mkl/build_defs.bzl
vendored
@ -24,6 +24,18 @@ def if_mkl(if_true, if_false = []):
|
|||||||
"//conditions:default": if_false
|
"//conditions:default": if_false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
def if_mkl_lnx_x64(if_true, if_false = []):
|
||||||
|
"""Shorthand for select()'ing on whether we're building with MKL.
|
||||||
|
|
||||||
|
Returns a select statement which evaluates to if_true if we're building
|
||||||
|
with MKL enabled. Otherwise, the select statement evaluates to if_false.
|
||||||
|
|
||||||
|
"""
|
||||||
|
return select({
|
||||||
|
str(Label("//third_party/mkl:using_mkl_lnx_x64")): if_true,
|
||||||
|
"//conditions:default": if_false
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
def _enable_local_mkl(repository_ctx):
|
def _enable_local_mkl(repository_ctx):
|
||||||
return _TF_MKL_ROOT in repository_ctx.os.environ
|
return _TF_MKL_ROOT in repository_ctx.os.environ
|
||||||
|
27
third_party/mkl/mkl.BUILD
vendored
27
third_party/mkl/mkl.BUILD
vendored
@ -17,14 +17,29 @@ cc_library(
|
|||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
filegroup(
|
cc_library(
|
||||||
name = "libmklml_intel.so",
|
name = "mkl_libs_linux",
|
||||||
srcs = ["lib/libmklml_intel.so"],
|
srcs = [
|
||||||
|
"lib/libiomp5.so",
|
||||||
|
"lib/libmklml_intel.so"
|
||||||
|
],
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
filegroup(
|
cc_library(
|
||||||
name = "libiomp5.so",
|
name = "mkl_libs_darwin",
|
||||||
srcs = ["lib/libiomp5.so"],
|
srcs = [
|
||||||
|
"lib/libiomp5.dylib",
|
||||||
|
"lib/libmklml.dylib"
|
||||||
|
],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "mkl_libs_windows",
|
||||||
|
srcs = [
|
||||||
|
"lib/libiomp5md.lib",
|
||||||
|
"lib/mklml.lib"
|
||||||
|
],
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user