Skip to content

Add mixed static-dynamic arguments interface - #5335

Merged
asaadaldien merged 4 commits into
mainfrom
ataei-flow_dispatch_ops_interface
Apr 7, 2021
Merged

asaadaldien merged 4 commits into
mainfrom
ataei-flow_dispatch_ops_interface

Conversation

@asaadaldien

Copy link
Copy Markdown
Contributor

Use OffsetSizeAndStrideOpInterface for flow.dispatch.tensor.{load|store} ops to enable mixed static / dynamic operands.

bbArg);
repl = b.create<IREE::Flow::DispatchTensorLoadOp>(
loc, operand.getType(), bbArg, ArrayRef<Value>({}),
ArrayRef<Value>({}), ArrayRef<Value>({}), b.getI64ArrayAttr({}),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a builder to the op that defaulted these? this is pretty nasty to try to get right

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I am looking into this Interestingly there is a build for b.create<IREE::Flow::DispatchTensorLoadOp>(loc, operand.getType(), bbArg) but it creates an op that crashes because $source is Nil might be incorrectly parsing due to a bug in the interface ?!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats weird, the source should not be nil right.

Nit: You can also just do ArrayRef<Value>() instead of ArrayRef<Value>({})

@MaheshRavishankar MaheshRavishankar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! I'll defer to Ben for any other comments.

bbArg);
repl = b.create<IREE::Flow::DispatchTensorLoadOp>(
loc, operand.getType(), bbArg, ArrayRef<Value>({}),
ArrayRef<Value>({}), ArrayRef<Value>({}), b.getI64ArrayAttr({}),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats weird, the source should not be nil right.

Nit: You can also just do ArrayRef<Value>() instead of ArrayRef<Value>({})

@asaadaldien
asaadaldien force-pushed the ataei-flow_dispatch_ops_interface branch from 31f0e15 to ab7bcfc Compare April 7, 2021 17:23
@MaheshRavishankar

Copy link
Copy Markdown
Collaborator

I think this addresses Ben's comment. Feel free to submit.

@benvanik
benvanik self-requested a review April 7, 2021 18:59
@asaadaldien
asaadaldien merged commit 0c92b88 into main Apr 7, 2021
@asaadaldien
asaadaldien deleted the ataei-flow_dispatch_ops_interface branch April 7, 2021 21:24
@antiagainst

Copy link
Copy Markdown
Member

FYI: this causes test failures in main branch. Looks recent landed files need to be updated too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants