-
Notifications
You must be signed in to change notification settings - Fork 645
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
EncodingAttr
to track type of source op
#17756
Conversation
7446669
to
2ae291c
Compare
Signed-off-by: Alan Li <[email protected]>
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.
Cant we use the indexing maps to deduce that this is a matmul?
I think it is possible. We can use |
@hanhanW @MaheshRavishankar if we can figure out by simply looking at the source op type, then we probably don't need this change? |
I was talking to Benoit about this. I think he clarified something. A linalg op is characterized with three things, iterator types, indexing maps and region. We dont care about iterator types here for now in the encoding, and we are considering how to represent the indexing maps. We might need to represent the region in the attribute though. So saying |
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.
Ok, this change itself is OK for me.
@@ -168,7 +168,7 @@ func.func @elem_pack_ukernels() attributes {hal.executable.target = #executable_ | |||
%cst = arith.constant 0.000000e+00 : f32 | |||
%c0 = arith.constant 0 : index | |||
%0 = hal.interface.binding.subspan set(0) binding(0) type(storage_buffer) alignment(64) offset(%c0) flags(ReadOnly) : !flow.dispatch.tensor<readonly:tensor<1024x2048xf32>> | |||
%1:2 = iree_codegen.query_tile_sizes tensor<1024x2048xf32, #iree_encoding.encoding<operand_index = 0, element_types = [f32, f32, f32], original_type = tensor<1024x2048xf32>>> -> index, index | |||
%1:2 = iree_codegen.query_tile_sizes tensor<1024x2048xf32, #iree_encoding.encoding<operand_index = 0, op_type = matmul, element_types = [f32, f32, f32], original_type = tensor<1024x2048xf32>>> -> index, index |
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.
Unrelated, but I dont know what original_type
is for. We should really drop it I think.
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.
It's needed by current path because we could generate query_tile_sizes + pad ops. IMO, we will deprecate it in the new data-tiling flow that we're building now.
This is to get encoding ready for ops other than MATMUL. Resolves iree-org#17604 Signed-off-by: Alan Li <[email protected]> Signed-off-by: Lubo Litchev <[email protected]>
This is to get encoding ready for ops other than MATMUL.
Resolves #17604