-
Notifications
You must be signed in to change notification settings - Fork 15
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 general convolution TTIR op. Add pass that legalizes it to Conv2D #1085
Conversation
943c501
to
5cda0d2
Compare
5cda0d2
to
169d240
Compare
b01134c
to
42a9bca
Compare
MutableOperandRange getDpsInitsMutable() { return getOutputMutable(); } | ||
|
||
static ArrayRef<bool> getDefaultWindowReversal(const ConvolutionLayoutAttr &convolutionLayout) { | ||
static bool boolArray[1000]; |
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.
Sorry I missed this last time around, let's just make this a SmallVector<bool> boolArray(convolutionLayout.getInputSpatialDimensions().size())
.
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.
I was able to use SmallVector
instead of std::vector
for all the attributes actually. Also was able to get rid of the helper because of that. Take a look :)
42a9bca
to
4f05514
Compare
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.
Looks great!
4f05514
to
3af254d
Compare
…o convolution to it Add pass to transform eligible ConvolutionOp --> Conv2dOp in TTIR
3af254d
to
a91b7fa
Compare
This converts broad TTIR Conv to a more specific and narrow one. Should we leverage Jovan's work to consolidate the decomposition into a narrower set of TTIR operations? |
Sure I suppose it can go in that pipeline. I'll put it in there if his PR gets merged first, otherwise I'll do it after. |
I belive @jserbedzijaTT will merge this soon, can we wait a day or two to consolidate things from the start? :) |
ConvolutionOp
, a very flexible convolution operation that can represent a convolution (and conv-transpose) of any dimensionalityConvolutionOp
is a legalConv2d
(or can be converted to one by permuting the input, weights, and/or output) and performs the transformation.ConvolutionOp
to any ConvNd or ConvNdTranspose.