mirror of
https://github.com/ROCm/jax.git
synced 2025-04-16 20:06:05 +00:00

Add a build wheel, pyproject.toml and setup.py. The directory structure in jax repo is: jax/ └── plugins/ └── cuda/ ├── __init__.py ├── pyproject.toml └── setup.py Installed package structure is: jax_plugins/ └── xla_cuda_cu12/ ├── __init__.py └── xla_cuda_plugin.so The major cuda version will be part of the package name. The plugin wheel can be built with command: python3 build/build.py --enable_cuda --build_gpu_plugin --gpu_plugin_cuda_version=12 --bazel_options="--override_repository=xla=$HOME/xla" PiperOrigin-RevId: 565187954
55 lines
1.6 KiB
Python
55 lines
1.6 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.
|
|
|
|
from setuptools import setup, find_namespace_packages
|
|
|
|
__version__ = "0.0"
|
|
cuda_version = 0 # placeholder
|
|
project_name = f"jax-cuda-plugin-cu{cuda_version}"
|
|
package_name = f"jax_plugins.xla_cuda_cu{cuda_version}"
|
|
|
|
packages = find_namespace_packages(
|
|
include=[
|
|
package_name,
|
|
f"{package_name}.*",
|
|
]
|
|
)
|
|
|
|
setup(
|
|
name=project_name,
|
|
version=__version__,
|
|
description="JAX XLA PJRT Plugin for NVIDIA GPUs",
|
|
long_description="",
|
|
long_description_content_type="text/markdown",
|
|
author="JAX team",
|
|
author_email="jax-dev@google.com",
|
|
packages=packages,
|
|
install_requires=[],
|
|
url="https://github.com/google/jax",
|
|
license="Apache-2.0",
|
|
classifiers=[
|
|
"Development Status :: 3 - Alpha",
|
|
"Programming Language :: Python :: 3",
|
|
],
|
|
package_data={
|
|
package_name: ["xla_cuda_plugin.so"],
|
|
},
|
|
zip_safe=False,
|
|
entry_points={
|
|
"jax_plugins": [
|
|
f"xla_cuda_cu{cuda_version} = {package_name}",
|
|
],
|
|
},
|
|
)
|