Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a separate target for RaisingTransformOps #302

Merged
merged 1 commit into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ cc_binary(
"@llvm-project//mlir:SCFDialect",
"@llvm-project//mlir:TransformDialect",
"@llvm-project//mlir:Transforms",
"//src/enzyme_ad/jax:RaisingTransformOps",
"//src/enzyme_ad/jax:TransformOps",
"//src/enzyme_ad/jax:XLADerivatives",
"@stablehlo//:chlo_ops",
Expand Down
24 changes: 21 additions & 3 deletions src/enzyme_ad/jax/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ gentbl_cc_library(
)

cc_library(
name = "TransformOps",
srcs = glob(["TransformOps/*.cpp"]),
hdrs = glob(["TransformOps/*.h"]),
name = "RaisingTransformOps",
srcs = ["TransformOps/RaisingTransformOps.cpp"],
hdrs = ["TransformOps/RaisingTransformOps.h"],
deps = [
"@llvm-project//mlir:FuncDialect",
"@llvm-project//mlir:IR",
Expand All @@ -192,6 +192,23 @@ cc_library(
":RaisingTransformOpsIncGen",
":RaisingTransformOpsImplIncGen",
":RaisingTransformPatternsIncGen",
],
)

cc_library(
name = "TransformOps",
srcs = [
"TransformOps/TransformOps.cpp",
"TransformOps/GenerateApplyPatterns.cpp",
],
hdrs = ["TransformOps/TransformOps.h"],
deps = [
"@llvm-project//mlir:FuncDialect",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:LinalgTransformOps",
"@llvm-project//mlir:Pass",
"@llvm-project//mlir:TransformDialect",
"@llvm-project//mlir:TransformDialectInterfaces",
":TransformOpsIncGen",
":TransformOpsImplIncGen",
":XLADerivatives",
Expand Down Expand Up @@ -373,6 +390,7 @@ cc_library(
":EnzymeXLAOpsIncGen",
":EnzymeXLAPassesIncGen",
":EnzymeHLOPatternsIncGen",
":RaisingTransformOps",
"@llvm-project//mlir:DLTIDialect",
"@llvm-project//mlir:GPUPipelines",
"@llvm-project//llvm:Core",
Expand Down
1 change: 0 additions & 1 deletion src/enzyme_ad/jax/TransformOps/RaisingTransformOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/PatternMatch.h"
#include "src/enzyme_ad/jax/Passes/EnzymeHLOPatterns.h"

#define GET_OP_CLASSES
#include "src/enzyme_ad/jax/TransformOps/RaisingTransformOps.cpp.inc"
Expand Down
1 change: 0 additions & 1 deletion src/enzyme_ad/jax/TransformOps/RaisingTransformOps.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "mlir/Dialect/Transform/Interfaces/TransformInterfaces.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/OpImplementation.h"
#include "src/enzyme_ad/jax/TransformOps/OpInterfaces.h.inc"

#define GET_OP_CLASSES
#include "src/enzyme_ad/jax/TransformOps/RaisingTransformOps.h.inc"
Expand Down