2018-11-26 12:37:24 -08:00
|
|
|
# Copyright 2018 Google LLC
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
# JAX is Autograd and XLA
|
|
|
|
|
2019-11-24 13:06:23 -05:00
|
|
|
load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda")
|
2020-12-05 00:07:04 +01:00
|
|
|
load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm")
|
2021-11-25 00:07:25 +08:00
|
|
|
load("@org_tensorflow//tensorflow:tensorflow.bzl", "if_not_windows", "if_windows")
|
2019-08-02 11:16:15 -04:00
|
|
|
|
2018-11-26 12:37:24 -08:00
|
|
|
licenses(["notice"]) # Apache 2
|
|
|
|
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
2020-11-10 00:23:54 +08:00
|
|
|
py_binary(
|
2020-11-20 09:10:02 -05:00
|
|
|
name = "build_wheel",
|
|
|
|
srcs = ["build_wheel.py"],
|
2018-11-26 12:37:24 -08:00
|
|
|
data = [
|
2020-12-11 06:44:45 -08:00
|
|
|
"LICENSE.txt",
|
2018-11-26 12:37:24 -08:00
|
|
|
"@org_tensorflow//tensorflow/compiler/xla/python:xla_client",
|
2019-04-01 08:21:22 -07:00
|
|
|
"//jaxlib",
|
2020-12-11 10:18:52 -05:00
|
|
|
"//jaxlib:setup.py",
|
|
|
|
"//jaxlib:setup.cfg",
|
2021-11-04 13:29:24 -07:00
|
|
|
"//jaxlib/mlir:builtin_dialect",
|
|
|
|
"//jaxlib/mlir:ir",
|
|
|
|
"//jaxlib/mlir:mhlo_dialect",
|
2022-03-03 08:24:06 -08:00
|
|
|
"//jaxlib/mlir:func_dialect",
|
2022-04-21 11:48:16 -07:00
|
|
|
"//jaxlib/mlir:sparse_tensor_dialect",
|
2021-11-25 00:07:25 +08:00
|
|
|
] + if_windows([
|
|
|
|
"//jaxlib/mlir/_mlir_libs:jaxlib_mlir_capi.dll",
|
|
|
|
]) + if_not_windows([
|
2020-11-10 00:23:54 +08:00
|
|
|
"@org_tensorflow//tensorflow/compiler/xla/python/tpu_driver/client:py_tpu_client",
|
|
|
|
]) + if_cuda([
|
2021-10-14 13:19:11 -07:00
|
|
|
"//jaxlib:gpu_support",
|
2021-09-02 07:52:35 -07:00
|
|
|
"//jaxlib:_cublas",
|
|
|
|
"//jaxlib:_cusolver",
|
|
|
|
"//jaxlib:_cusparse",
|
|
|
|
"//jaxlib:_cuda_linalg",
|
|
|
|
"//jaxlib:_cuda_prng",
|
2021-04-28 11:43:50 -04:00
|
|
|
"@local_config_cuda//cuda:cuda-nvvm",
|
2020-12-05 00:07:04 +01:00
|
|
|
]) + if_rocm([
|
2022-02-15 17:54:02 +00:00
|
|
|
"//jaxlib:hip_gpu_support",
|
|
|
|
"//jaxlib:_hipblas",
|
|
|
|
"//jaxlib:_hipsolver",
|
|
|
|
"//jaxlib:_hipsparse",
|
|
|
|
"//jaxlib:_hip_linalg",
|
|
|
|
"//jaxlib:_hip_prng",
|
2019-08-02 11:16:15 -04:00
|
|
|
]),
|
2020-11-10 00:23:54 +08:00
|
|
|
deps = ["@bazel_tools//tools/python/runfiles"],
|
2018-11-26 12:37:24 -08:00
|
|
|
)
|