mirror of
https://github.com/ROCm/jax.git
synced 2025-04-26 14:46:07 +00:00

This change introduces a uniform way of building the artifacts and controlling the filename version suffixes (see the changes for `jaxlib`, `jax-cuda-plugin` and `jax-cuda-pjrt` in https://github.com/jax-ml/jax/pull/25126) Previously `jax` wheel was built via `python3 -m build` command. The resulting wheel contained the python packages files in `jax` folder (e.g. the files in the subdirs that have `__init__.py` file). You can still build the `jax` wheel with `python3 -m build` command. Bazel `jax` wheel target: `//:jax_wheel` Environment variables combinations for creating wheels with different versions: * self-built wheel (default build rule behavior): `--repo_env=ML_WHEEL_TYPE=snapshot` * release: `--repo_env=ML_WHEEL_TYPE=release` * release candidate: `--repo_env=ML_WHEEL_TYPE=release --repo_env=ML_WHEEL_VERSION_SUFFIX=-rc1` * nightly build: `--repo_env=ML_WHEEL_TYPE=custom --repo_env=ML_WHEEL_BUILD_DATE=<YYYYmmdd> --repo_env=ML_WHEEL_GIT_HASH=$(git rev-parse HEAD)` PiperOrigin-RevId: 730916743
109 lines
2.7 KiB
Python
109 lines
2.7 KiB
Python
# Copyright 2023 The JAX Authors.
|
|
#
|
|
# 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.
|
|
|
|
load(
|
|
"//jaxlib:jax.bzl",
|
|
"if_building_jaxlib",
|
|
"pytype_strict_library",
|
|
)
|
|
|
|
package(
|
|
default_applicable_licenses = [],
|
|
default_visibility = ["//jax:jax_extend_users"],
|
|
)
|
|
|
|
pytype_strict_library(
|
|
name = "dialects",
|
|
srcs = ["__init__.py"],
|
|
deps = [
|
|
":arithmetic_dialect",
|
|
":builtin_dialect",
|
|
":chlo_dialect",
|
|
":func_dialect",
|
|
":math_dialect",
|
|
":memref_dialect",
|
|
":scf_dialect",
|
|
":sdy_dialect",
|
|
":sparse_tensor_dialect",
|
|
":stablehlo_dialect",
|
|
":vector_dialect",
|
|
],
|
|
)
|
|
|
|
pytype_strict_library(
|
|
name = "arithmetic_dialect",
|
|
srcs = ["arith.py"],
|
|
deps = if_building_jaxlib(["//jaxlib/mlir:arithmetic_dialect"]),
|
|
)
|
|
|
|
pytype_strict_library(
|
|
name = "builtin_dialect",
|
|
srcs = ["builtin.py"],
|
|
deps = if_building_jaxlib(["//jaxlib/mlir:builtin_dialect"]),
|
|
)
|
|
|
|
pytype_strict_library(
|
|
name = "chlo_dialect",
|
|
srcs = ["chlo.py"],
|
|
deps = if_building_jaxlib(["//jaxlib/mlir:chlo_dialect"]),
|
|
)
|
|
|
|
pytype_strict_library(
|
|
name = "func_dialect",
|
|
srcs = ["func.py"],
|
|
deps = if_building_jaxlib(["//jaxlib/mlir:func_dialect"]),
|
|
)
|
|
|
|
pytype_strict_library(
|
|
name = "math_dialect",
|
|
srcs = ["math.py"],
|
|
deps = if_building_jaxlib(["//jaxlib/mlir:math_dialect"]),
|
|
)
|
|
|
|
pytype_strict_library(
|
|
name = "memref_dialect",
|
|
srcs = ["memref.py"],
|
|
deps = if_building_jaxlib(["//jaxlib/mlir:memref_dialect"]),
|
|
)
|
|
|
|
pytype_strict_library(
|
|
name = "scf_dialect",
|
|
srcs = ["scf.py"],
|
|
deps = if_building_jaxlib(["//jaxlib/mlir:scf_dialect"]),
|
|
)
|
|
|
|
pytype_strict_library(
|
|
name = "sparse_tensor_dialect",
|
|
srcs = ["sparse_tensor.py"],
|
|
deps = if_building_jaxlib(["//jaxlib/mlir:sparse_tensor_dialect"]),
|
|
)
|
|
|
|
pytype_strict_library(
|
|
name = "sdy_dialect",
|
|
srcs = ["sdy.py"],
|
|
deps = if_building_jaxlib(["//jaxlib/mlir:sdy_dialect"]),
|
|
)
|
|
|
|
pytype_strict_library(
|
|
name = "stablehlo_dialect",
|
|
srcs = ["stablehlo.py"],
|
|
deps = if_building_jaxlib(["//jaxlib/mlir:stablehlo_dialect"]),
|
|
)
|
|
|
|
pytype_strict_library(
|
|
name = "vector_dialect",
|
|
srcs = ["vector.py"],
|
|
deps = if_building_jaxlib(["//jaxlib/mlir:vector_dialect"]),
|
|
)
|