-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve package layout and bazel build (#20)
* Improve package layout and bazel build Follow PEP420 and other common practices to set up a namespace package `enzyme_ad` containing a subpackage `jax` that is specific for JAX connection. This will allow one to use Enzyme bindings without necessarily connecting to JAX in the future. Package import now starts at `enzyme_ad` and JAX-related functionality can be obtained as `from enzyme_ad import jax as enzyme_jax` if desired. Update the wheel building rules accordingly and rename the distribution to `enzyme_ad`. Declare a dependency on JAX until that functionality is separated into a separate distribution. * fix path * Update signature --------- Co-authored-by: William S. Moses <[email protected]>
- Loading branch information
Showing
23 changed files
with
54 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
6.2.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,16 +4,16 @@ on: | |
push: | ||
pull_request: | ||
merge_group: | ||
|
||
jobs: | ||
build: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: DoozyX/[email protected] | ||
with: | ||
source: 'enzyme_jax' | ||
source: 'src' | ||
style: 'llvm' | ||
clangFormatVersion: 16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,23 +11,26 @@ package( | |
py_package( | ||
name = "enzyme_jax_data", | ||
deps = [ | ||
"//enzyme_jax:enzyme_call.so", | ||
"//src/enzyme_ad/jax:enzyme_call.so", | ||
"@llvm-project//clang:builtin_headers_gen", | ||
], | ||
# Only include these Python packages. | ||
packages = ["@//enzyme_jax:enzyme_call.so", "@llvm-project//clang:builtin_headers_gen"], | ||
prefix = "enzyme_jax/" | ||
packages = ["@//src/enzyme_ad/jax:enzyme_call.so", "@llvm-project//clang:builtin_headers_gen"], | ||
) | ||
|
||
py_wheel( | ||
name = "enzyme_jax", | ||
# Package data. We're building "example_minimal_package-0.0.1-py3-none-any.whl" | ||
distribution = "enzyme_jax", | ||
name = "enzyme_ad", | ||
distribution = "enzyme_ad", | ||
summary = "Enzyme automatic differentiation tool.", | ||
homepage = "https://enzyme.mit.edu/", | ||
project_urls = { | ||
"GitHub": "https://github.com/EnzymeAD/Enzyme-JAX/", | ||
}, | ||
author="Enzyme Authors", | ||
license='LLVM', | ||
license="LLVM", | ||
author_email="[email protected], [email protected]", | ||
python_tag = "py3", | ||
version = "0.0.5", | ||
version = "0.0.6", | ||
platform = select({ | ||
"@bazel_tools//src/conditions:windows_x64": "win_amd64", | ||
"@bazel_tools//src/conditions:darwin_arm64": "macosx_11_0_arm64", | ||
|
@@ -36,5 +39,10 @@ py_wheel( | |
"@bazel_tools//src/conditions:linux_x86_64": "manylinux2014_x86_64", | ||
"@bazel_tools//src/conditions:linux_ppc64le": "manylinux2014_ppc64le", | ||
}), | ||
deps = ["//enzyme_jax:enzyme_jax_internal", ":enzyme_jax_data"] | ||
deps = ["//src/enzyme_ad/jax:enzyme_jax_internal", ":enzyme_jax_data"], | ||
strip_path_prefixes = ["src/"], | ||
requires = [ | ||
"jax >= 0.4.21", | ||
"jaxlib >= 0.4.21", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from enzyme_ad.jax.primitives import cpp_call, enzyme_jax_ir |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters