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

Batched autodiff #2181

Merged
merged 22 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
llvm::SmallVector --> ArrayRef
  • Loading branch information
jumerckx committed Dec 22, 2024
commit aa4e59883e4eebcf385e3440410f5a87b5e4f3e7
2 changes: 1 addition & 1 deletion enzyme/Enzyme/MLIR/Dialect/EnzymeOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def BroadcastOp : Enzyme_Op<"broadcast"> {
let results = (outs AnyRankedTensor:$output);

let builders = [
OpBuilder<(ins "Value":$input, "llvm::SmallVector<int64_t>":$shape)>
OpBuilder<(ins "Value":$input, "ArrayRef<int64_t>":$shape)>
];
}

Expand Down
2 changes: 1 addition & 1 deletion enzyme/Enzyme/MLIR/Dialect/Ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ LogicalResult BatchOp::verifySymbolUses(SymbolTableCollection &symbolTable) {
// BroadcastOp
//===----------------------------------------------------------------------===//

void BroadcastOp::build(OpBuilder &builder, OperationState &result, Value input, llvm::SmallVector<int64_t> shape) {
void BroadcastOp::build(OpBuilder &builder, OperationState &result, Value input, ArrayRef<int64_t> shape) {
auto shapeAttr = builder.getDenseI64ArrayAttr(shape);
RankedTensorType output;
// TODO: support things other than scalars and ranked tensors, maybe reuse getShadowType here?
jumerckx marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Loading