Skip to content

Commit

Permalink
move sources under enzyme_jax (#15)
Browse files Browse the repository at this point in the history
This makes it easier to import this project into other bazel-built
projects.
  • Loading branch information
ftynse authored Dec 1, 2023
1 parent 8107881 commit 3bf54c4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 26 deletions.
26 changes: 2 additions & 24 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@rules_python//python:packaging.bzl", "py_wheel")
load(":package.bzl", "py_package")

licenses(["notice"])

Expand All @@ -6,30 +8,6 @@ package(
default_visibility = ["//:__subpackages__"],
)

cc_library(
name = "clang_compile",
srcs = ["clang_compile.cc"],
hdrs = ["clang_compile.h"],
deps = [
"@pybind11",
"@llvm-project//clang:ast",
"@llvm-project//clang:basic",
"@llvm-project//clang:driver",
"@llvm-project//clang:frontend",
"@llvm-project//clang:frontend_tool",
"@llvm-project//clang:lex",
"@llvm-project//clang:serialization",
"@llvm-project//llvm:Support",
"@llvm-project//llvm:Core",
"@llvm-project//llvm:IRReader",
"@llvm-project//llvm:OrcJIT",
"@enzyme//:EnzymeStatic"
],
)

load("@rules_python//python:packaging.bzl", "py_wheel")
load(":package.bzl", "py_package")

py_package(
name = "enzyme_jax_data",
deps = [
Expand Down
30 changes: 28 additions & 2 deletions enzyme_jax/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@

load("@pybind11_bazel//:build_defs.bzl", "pybind_extension", "pybind_library")

licenses(["notice"])

package(
default_visibility = ["//:__subpackages__"],
)

cc_library(
name = "clang_compile",
srcs = ["clang_compile.cc"],
hdrs = ["clang_compile.h"],
deps = [
"@pybind11",
"@llvm-project//clang:ast",
"@llvm-project//clang:basic",
"@llvm-project//clang:driver",
"@llvm-project//clang:frontend",
"@llvm-project//clang:frontend_tool",
"@llvm-project//clang:lex",
"@llvm-project//clang:serialization",
"@llvm-project//llvm:Support",
"@llvm-project//llvm:Core",
"@llvm-project//llvm:IRReader",
"@llvm-project//llvm:OrcJIT",
"@enzyme//:EnzymeStatic"
],
)

py_library(
name = "enzyme_jax_internal",
srcs = ["primitives.py", "__init__.py"],
Expand Down Expand Up @@ -72,7 +98,7 @@ pybind_extension(
deps = [
"@llvm-project//llvm:Support",
"@llvm-project//llvm:OrcJIT",
"//:clang_compile",
":clang_compile",
":compile_with_xla",
"@com_google_absl//absl/status"
],
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 3bf54c4

Please sign in to comment.