-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add LLVM to Affine access pass #303
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,4 +98,40 @@ def Pointer2MemrefOp : EnzymeXLA_Op<"pointer2memref", [ | |
}]; | ||
} | ||
|
||
//===----------------------------------------------------------------------===// | ||
// AtAddrOp | ||
//===----------------------------------------------------------------------===// | ||
|
||
def AtAddrOp : EnzymeXLA_Op<"ataddr", [Pure]> { | ||
let summary = | ||
"Construct a c-style memref at an addr"; | ||
let description = [{ | ||
}]; | ||
let arguments = (ins AnyType:$addr); | ||
let results = (outs AnyRankedOrUnrankedMemRef:$dest); | ||
let builders = [ | ||
OpBuilder<(ins "Value":$source), [{ | ||
return build($_builder, $_state, | ||
TypeRange(MemRefType::get({ShapedType::kDynamic}, $_builder.getI8Type())), | ||
ValueRange(source)); | ||
}]>, | ||
OpBuilder<(ins "Value":$source, "Type":$dstType), [{ | ||
return build($_builder, $_state, | ||
TypeRange(dstType), | ||
ValueRange(source)); | ||
}]> | ||
]; | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ftynse @ivanradanov There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It says
|
||
def AffineScopeOp : EnzymeXLA_Op<"scope", [ | ||
AffineScope, | ||
AutomaticAllocationScope, | ||
RecursiveMemoryEffects, | ||
]>, | ||
Arguments<(ins Variadic<AnyType>:$operands)>, | ||
Results<(outs Variadic<AnyType>:$results)> { | ||
let summary = "Inline affine scope"; | ||
let regions = (region SizedRegion<1>:$region); | ||
} | ||
|
||
#endif // ENZYMEXLA_OPS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should instead use pointer2memref