Page MenuHomePhabricator
Feed Advanced Search

Tue, May 30

eric-k256 committed rG68ef0e95b20a: [mlir][tosa] Implement lowering for tosa.rfft2d (authored by sabauma).
[mlir][tosa] Implement lowering for tosa.rfft2d
Tue, May 30, 4:11 PM · Restricted Project, Restricted Project
eric-k256 closed D151095: [mlir][tosa] Implement lowering for tosa.rfft2d.
Tue, May 30, 4:11 PM · Restricted Project, Restricted Project
eric-k256 committed rG6b4b63a832f1: Lowering for 'tosa.scatter' (authored by rafaelubalmw).
Lowering for 'tosa.scatter'
Tue, May 30, 2:34 PM · Restricted Project, Restricted Project
eric-k256 closed D151117: Lowering for 'tosa.scatter'.
Tue, May 30, 2:34 PM · Restricted Project, Restricted Project

Fri, May 26

eric-k256 added a comment to D151117: Lowering for 'tosa.scatter'.

to have a working legalization to linalg.

Is there a path from there to linalg? It's not clear to me how it works?
And actually I'm wondering if this lowering could be expressed with a linalg.generic indeed?

Fri, May 26, 12:19 AM · Restricted Project, Restricted Project

Thu, May 25

eric-k256 accepted D151117: Lowering for 'tosa.scatter'.

Thanks for taking this on. Scatter is a complicated op, and it is good to have a working legalization to linalg.

Thu, May 25, 9:06 PM · Restricted Project, Restricted Project
eric-k256 accepted D151095: [mlir][tosa] Implement lowering for tosa.rfft2d.

Seems reasonable. It's a fairly complex legalization, but necessary. Thanks for adding this.

Thu, May 25, 9:04 PM · Restricted Project, Restricted Project
eric-k256 committed rG98aad40806f1: [tosa] Improve inferred shapes of TOSA operations (authored by sabauma).
[tosa] Improve inferred shapes of TOSA operations
Thu, May 25, 4:28 PM · Restricted Project, Restricted Project
eric-k256 closed D151228: [tosa] Improve inferred shapes of TOSA operations.
Thu, May 25, 4:28 PM · Restricted Project, Restricted Project
eric-k256 accepted D151228: [tosa] Improve inferred shapes of TOSA operations.

Looks good, thanks for the fix.

Thu, May 25, 9:38 AM · Restricted Project, Restricted Project

Wed, May 24

eric-k256 committed rGa383a481eed1: [mlir][tosa] Update the limit of 62 on shift. (authored by psunn).
[mlir][tosa] Update the limit of 62 on shift.
Wed, May 24, 3:37 PM · Restricted Project, Restricted Project
eric-k256 closed D151113: [mlir][tosa] Update the limit of 62 on shift..
Wed, May 24, 3:36 PM · Restricted Project, Restricted Project
eric-k256 added a comment to D150836: [mlir][tosa] Fold consecutive tosa.abs.

I think the issue is that floor/ceil/clamp don't have the SameOperandsAndResultType trait which is required by the Idempotent trait. It should be okay to add for floor/ceil/clamp as they shouldn't change type.

Wed, May 24, 3:34 PM · Restricted Project, Restricted Project
eric-k256 accepted D151113: [mlir][tosa] Update the limit of 62 on shift..

Looks good, matches what is in the TOSA specification.

Wed, May 24, 3:20 PM · Restricted Project, Restricted Project
eric-k256 committed rGe0537d1ad4b9: [TOSA] Refactor TosaMakeBroadcastable pass (authored by Tai78641).
[TOSA] Refactor TosaMakeBroadcastable pass
Wed, May 24, 2:56 PM · Restricted Project, Restricted Project
eric-k256 closed D150283: [TOSA] Refactor TosaMakeBroadcastable pass.
Wed, May 24, 2:56 PM · Restricted Project, Restricted Project
eric-k256 accepted D150283: [TOSA] Refactor TosaMakeBroadcastable pass.

Looks good to me.

Wed, May 24, 2:55 PM · Restricted Project, Restricted Project
eric-k256 added a comment to D151228: [tosa] Improve inferred shapes of TOSA operations.

One minor change, otherwise it looks good to me.

Wed, May 24, 2:41 PM · Restricted Project, Restricted Project

Mon, May 22

eric-k256 added a comment to D139089: mlir/tosa: supply better documentation for tosa.pad.

Thanks! LGTM now. Let me know if you need help landing this.

Mon, May 22, 11:46 AM · Restricted Project, Restricted Project

Fri, May 19

eric-k256 committed rG1fef1f97dbf2: [MLIR][TOSA] add tosa erf operator (authored by manupak).
[MLIR][TOSA] add tosa erf operator
Fri, May 19, 2:52 PM · Restricted Project, Restricted Project
eric-k256 closed D150357: [MLIR][TOSA] add tosa erf operator.
Fri, May 19, 2:51 PM · Restricted Project, Restricted Project

Thu, May 18

eric-k256 added a comment to D150357: [MLIR][TOSA] add tosa erf operator.

I should be able to help land it, hopefully tomorrow.

Thu, May 18, 9:24 PM · Restricted Project, Restricted Project
eric-k256 committed rGc8dcdba12519: [mlir][tosa] Fix constant folding of tosa.mul (authored by sabauma).
[mlir][tosa] Fix constant folding of tosa.mul
Thu, May 18, 4:45 PM · Restricted Project, Restricted Project
eric-k256 closed D150439: [mlir][tosa] Fix constant folding of tosa.mul.
Thu, May 18, 4:45 PM · Restricted Project, Restricted Project

Tue, May 16

eric-k256 accepted D150357: [MLIR][TOSA] add tosa erf operator.

Looks good to me.

Tue, May 16, 4:27 PM · Restricted Project, Restricted Project
eric-k256 accepted D150439: [mlir][tosa] Fix constant folding of tosa.mul.

I thought I had accepted this already, but don't see it recorded. LGTM for the reasons described in the discourse thread.

Tue, May 16, 1:42 PM · Restricted Project, Restricted Project
eric-k256 added a comment to D139089: mlir/tosa: supply better documentation for tosa.pad.

Thanks for the ping, this got lost in my todo list.

Tue, May 16, 11:13 AM · Restricted Project, Restricted Project

Mon, May 15

eric-k256 accepted D150578: [mlir][tosa] Constant folding for reciprocal.

This seems like a reasonable fold to me, and a good heuristic to start with. Adding @jpienaar in case he sees anything I've missed.

Mon, May 15, 5:16 PM · Restricted Project, Restricted Project
eric-k256 committed rG4a899a35182b: [TOSA] Add QuantizationDialect to TOSA's dependentDialects (authored by Tai78641).
[TOSA] Add QuantizationDialect to TOSA's dependentDialects
Mon, May 15, 3:14 PM · Restricted Project, Restricted Project
eric-k256 closed D149354: [TOSA] Add QuantizationDialect to TOSA's dependentDialects.
Mon, May 15, 3:14 PM · Restricted Project, Restricted Project
eric-k256 added a comment to D150357: [MLIR][TOSA] add tosa erf operator.

Agreed that this looks good, with only changes in the description that seem to be needed. As mentioned inline, part of the blame lies on the spec, and I'm going to try to correct the spec to allow legalizations to choose the best option, listing the existing version as an option rather than appearing to be required. (Let me know if there is benefit to the spec as is)

Mon, May 15, 2:08 PM · Restricted Project, Restricted Project
eric-k256 accepted D150518: [mlir][tosa] Fold consecutive negate as no-op.

LGTM.

Mon, May 15, 8:03 AM · Restricted Project, Restricted Project

Thu, May 11

eric-k256 accepted D150342: [mlir][tosa] Fold exp(log) operation into no-op.

LGTM.

Thu, May 11, 11:58 AM · Restricted Project, Restricted Project

May 5 2023

eric-k256 accepted D149354: [TOSA] Add QuantizationDialect to TOSA's dependentDialects.

LGTM.

May 5 2023, 3:10 PM · Restricted Project, Restricted Project

May 2 2023

eric-k256 accepted D149632: [mlir][tosa] Fold log(exp) to no-op.

looks good to me.

May 2 2023, 10:58 AM · Restricted Project, Restricted Project

May 1 2023

eric-k256 accepted D149582: [mlir][tosa] Fix crash when inferring shape of tosa.equal.

LGTM.

May 1 2023, 8:45 AM · Restricted Project, Restricted Project

Apr 21 2023

eric-k256 added a comment to D148498: [mlir] tosa.reshape - Add InferTensorType interface.

Well, removing new_shape is a big refactor which I think reuqires propare discussion if we would like to do so.
I also agree with @jpienaar's comment, but until we decide otherwise I think that infer shape can be useful and missing functionality to check element type of TOSA reshape operation.
We can raise a discussion to get ride of new_shape attribute and part of the work will be to revert this change.

Apr 21 2023, 2:13 PM · Restricted Project, Restricted Project

Apr 14 2023

eric-k256 added a comment to D148296: Adopt Properties to store operations inherent Attributes in TOSA.

Yes this was somehow intentional: in the spirit of matching the minimum amount of information.
Best would be to use something like CHECK: tosa.cont followed by CHECK-SAME: value = 1

Apr 14 2023, 3:39 PM · Restricted Project, Restricted Project
eric-k256 added a comment to D148296: Adopt Properties to store operations inherent Attributes in TOSA.

Thanks for adding this Mehdi.

Apr 14 2023, 3:00 PM · Restricted Project, Restricted Project

Apr 4 2023

eric-k256 accepted D147407: [mlir][tosa] Add InferTensorType interface to tosa reduce operations.

Looks good to me.

Apr 4 2023, 5:16 PM · Restricted Project, Restricted Project

Mar 29 2023

eric-k256 accepted D145738: [TOSA] Loosen folding restrictions for tosa.add,tosa.sub, tosa.mul.

Thanks for making all of the changes. Issue if you want to follow along: https://github.com/llvm/llvm-project/issues/61822. Not assigned to me, but if you're not working on it I'm less worried that someone else will pick it up without me knowing.

Mar 29 2023, 3:51 PM · Restricted Project, Restricted Project
eric-k256 added a comment to D145738: [TOSA] Loosen folding restrictions for tosa.add,tosa.sub, tosa.mul.

Good catch @mgehre-amd. I had been thinking along a similar path to what you described, your comment helped solidify my thoughts.
If we track fixing the verifier, then agree that we can drop the check here. In terms of this change, we should change the tests so that if we fix the verifier, we don't then have to change these tests. (We're likely to find other tests that fail, but let's make our future work easier 😄 ). While doing that, changing the commit message to drop the mention of lower dimension helps avoid confusion.

Mar 29 2023, 9:13 AM · Restricted Project, Restricted Project

Mar 28 2023

eric-k256 added a comment to D145738: [TOSA] Loosen folding restrictions for tosa.add,tosa.sub, tosa.mul.

@eric-k256 thanks. I didn't see a hard requirement in the spec and was confused by the test above for add_zero_different_shape. Also turns out there is a AddZeroOptimization and MulOneOptimization that also allow mixed rank folding.. also kind of redundant. Shall I remove those as well?

Mar 28 2023, 4:44 PM · Restricted Project, Restricted Project
eric-k256 requested changes to D145738: [TOSA] Loosen folding restrictions for tosa.add,tosa.sub, tosa.mul.

I like the cleanup and the overall simplification of the code, but the broadcast issue still remains. Not specifically called out, but in addition to the marked issues, updating the commit message would also be good.

Mar 28 2023, 11:59 AM · Restricted Project, Restricted Project

Mar 27 2023

eric-k256 accepted D146901: [mlir] tosa.concat - fix isCompatibleReturnTypes().

Looks good to me. Thanks.

Mar 27 2023, 11:14 AM · Restricted Project, Restricted Project

Mar 24 2023

eric-k256 added a reviewer for D145738: [TOSA] Loosen folding restrictions for tosa.add,tosa.sub, tosa.mul: rsuderman.

Adding @rsuderman, the author of the existing fold code as a more appropriate reviewer.

Mar 24 2023, 11:17 AM · Restricted Project, Restricted Project

Mar 22 2023

eric-k256 accepted D146617: [mlir][tosa] TosaToLinalg: Lower TOSA.Cast via RoundEven according to TOSA spec 0.60.0.

Added Rob as an additional reviewer. As mentioned, this matches with the TOSA specification, and looks like a nice simplification at the same time.

Mar 22 2023, 3:23 PM · Restricted Project, Restricted Project

Mar 21 2023

eric-k256 added a comment to D146380: [mlir] Add signed int to TOSA supported types.

Given Rob's comments, I think that the path forward is to get comments from a wider set of people about making the switch to signed/unsigned from signless/signed so we aren't surprising any TOSA dialect users when we get to the point of removing signless support. An RFC on discourse seems to be the right way to do that, along with some time to collect responses. All of the lit tests are going to need to change, which is going to be a big set of changes that need to land. Most of it is mechanical, but still a lot of overhead.

Mar 21 2023, 3:16 PM · Restricted Project, Restricted Project

Mar 20 2023

eric-k256 added a comment to D146380: [mlir] Add signed int to TOSA supported types.

As noted in the thread, I want to make sure that we're moving to remove i8 support in the near future, not supporting i8/ui8/si8. As a starting point to the move of i8 -> si8, this change is fine (mod Rob's comment), but it is starting down a path where multiple projects will be affected.

Mar 20 2023, 1:53 PM · Restricted Project, Restricted Project

Mar 13 2023

eric-k256 accepted D144784: [mlir][tosa] Add FFT2d operation.

Thanks for checking Rob. Yes, this looks good to me.

Mar 13 2023, 4:05 PM · Restricted Project, Restricted Project

Mar 9 2023

eric-k256 added a comment to D145336: [mlir][tosa] Add TOSA f64 type support for const op.

You're right that F64 isn't in any of the TOSA profiles today, which is why I was discouraging it's use in the overall definition of Tosa_Tensor. It's something we look at adding, but it adds significant requirements to any profiles it goes into. It would be good to get a sense of what networks need F64 vs ending up with that type as default. Many systems that support f64 do it at a performance cost against f32, and some systems don't implement it at all. Ideally the tooling would have a way to guide developers to minimize their use of f64 to where it has a significant improvement on results justifying the extra computation cost.

Mar 9 2023, 3:53 PM · Restricted Project, Restricted Project

Mar 7 2023

eric-k256 accepted D145336: [mlir][tosa] Add TOSA f64 type support for const op.

Looks reasonable to me, although I don't have merge priveleges.

Mar 7 2023, 11:46 AM · Restricted Project, Restricted Project

Mar 6 2023

eric-k256 added a comment to D145336: [mlir][tosa] Add TOSA f64 type support for const op.

This is definitely an improvement, I'm okay with this type, but it reads as only a 64-bit tensor. Perhaps Jacques is better at naming than I am, but I'd go something closer to Tosa_Tensor_Plus_F64, indicating that this is an extension of Tosa_Tensor with F64 (as opposed to I64).

Mar 6 2023, 5:39 PM · Restricted Project, Restricted Project

Feb 9 2023

eric-k256 added a comment to D142599: [mlir][tosa] Add TOSA f64 type support for cast op.

I don't have commit privileges. @rsuderman or @NatashaKnk, can you take a look?

Feb 9 2023, 10:11 AM · Restricted Project, Restricted Project

Feb 7 2023

eric-k256 added a comment to D143034: [mlir][tosa] Fix segmentation fault in case of folding unranked tensor.

While waiting for the others to review, you might want to remove the extra include.

Feb 7 2023, 4:07 PM · Restricted Project, Restricted Project

Feb 2 2023

eric-k256 accepted D142599: [mlir][tosa] Add TOSA f64 type support for cast op.

Thanks. Looks good to me now.

Feb 2 2023, 10:33 PM · Restricted Project, Restricted Project
eric-k256 added a comment to D142599: [mlir][tosa] Add TOSA f64 type support for cast op.

Can you add a simple check to TosaValidation::runOnOperation that goes into the existing for loop and checks for float64 type, and does a signalPassFailure there? You don't need to check profileType, as f64 isn't in the spec. This pass is for implementations to use to check against the spec, so dialect specific changes that aren't in the spec should be flagged when it is run.

Feb 2 2023, 3:09 PM · Restricted Project, Restricted Project

Jan 26 2023

eric-k256 added a comment to D142599: [mlir][tosa] Add TOSA f64 type support for cast op.

The TOSA specification doesn't support F64, so I think we should be careful in how we expand the data types in the dialect. Adding it has implications for TOSA consumers.

Jan 26 2023, 9:50 AM · Restricted Project, Restricted Project

Dec 15 2022

eric-k256 added a comment to D139739: [mlir] [tosa] Add a pass that partitions TOSA code into kernels that consist of a conv2d or similar anchor op and adjacent elementwise ops..

Decisions on what can be fused are often very hardware specific. I do like that the partitioning is parameterized, so that if I'm understanding properly, any set of ops can be defined as anchor as well as leading/trailing ops to be captured. Is a new function the right destination for these? Have you looked at using the ml_program dialect to capture this as a region? I would imagine the overall structure wouldn't need to change significantly. It's at least an option worth considering.

Dec 15 2022, 4:27 PM · Restricted Project, Restricted Project

Nov 4 2022

eric-k256 added inline comments to D137133: [mlir][TOSA]Add optional attributes to TOSA custom op.
Nov 4 2022, 8:38 AM · Restricted Project, Restricted Project

Nov 3 2022

eric-k256 added inline comments to D137133: [mlir][TOSA]Add optional attributes to TOSA custom op.
Nov 3 2022, 2:43 PM · Restricted Project, Restricted Project

Oct 31 2022

eric-k256 requested review of D137133: [mlir][TOSA]Add optional attributes to TOSA custom op.
Oct 31 2022, 4:05 PM · Restricted Project, Restricted Project

Aug 29 2022

eric-k256 added a comment to D116394: Adopt DimensionListAttr in TOSA op definition (NFC).

This looks nice. Is there something needed before this can be merged? Presumably any user of the tosa dialect that has lit tests would also need their tests to be modified.

Aug 29 2022, 4:51 PM · Restricted Project, Restricted Project

Aug 12 2022

eric-k256 updated the diff for D128683: [MLIR][TOSA] Remove ReluN operator from TOSA dialect.

Rebased change

Aug 12 2022, 1:56 PM · Restricted Project, Restricted Project

Aug 7 2022

eric-k256 added a comment to D128683: [MLIR][TOSA] Remove ReluN operator from TOSA dialect.

Yes, help landing would be appreciated.

Aug 7 2022, 9:44 PM · Restricted Project, Restricted Project

Jul 7 2022

eric-k256 accepted D128630: [MLIR][TOSA] Fix converting tosa.clamp and tosa.relu to linalg.

It looks good to me, although I don't have commit rights, so it might not be all the approvals you need.

Jul 7 2022, 11:17 AM · Restricted Project, Restricted Project

Jun 27 2022

eric-k256 added a comment to D128683: [MLIR][TOSA] Remove ReluN operator from TOSA dialect.

I didn't find any uses of ReluN downstream, it must have been cleaned up already.

Jun 27 2022, 2:22 PM · Restricted Project, Restricted Project
eric-k256 requested review of D128683: [MLIR][TOSA] Remove ReluN operator from TOSA dialect.
Jun 27 2022, 2:15 PM · Restricted Project, Restricted Project
eric-k256 added a comment to D128630: [MLIR][TOSA] Fix converting tosa.clamp and tosa.relu to linalg.

This doesn't directly impact this change, but in the TOSA specification, we've removed the ReluN operator, since it's trivially implementable with Clamp. I will look at removing ReluN from the dialect to line up with the specification.

Jun 27 2022, 1:12 PM · Restricted Project, Restricted Project

Jun 9 2022

eric-k256 updated the diff for D127332: [mlir][tosa] Update TOSA transpose_conv2d to match spec.

Fix padding in the DecomposeTransposeConv passes to be compatible with the new attribute.
Added a testcase to try to catch future problems with padded transpose_conv.

Jun 9 2022, 11:39 AM · Restricted Project, Restricted Project

Jun 8 2022

eric-k256 updated the diff for D127332: [mlir][tosa] Update TOSA transpose_conv2d to match spec.

Fix clang-format issue (clang-format 11 vs. clang-format 10 difference)

Jun 8 2022, 4:11 PM · Restricted Project, Restricted Project
eric-k256 requested review of D127332: [mlir][tosa] Update TOSA transpose_conv2d to match spec.
Jun 8 2022, 12:01 PM · Restricted Project, Restricted Project

Nov 17 2021

eric-k256 accepted D114127: [mlir][tosa] Revert add-0 canonicalization for floating-point.

Thanks for doing this, I think it's the right solution.

Nov 17 2021, 5:04 PM · Restricted Project

Jul 22 2021

eric-k256 accepted D106610: [mlir][tosa] Disable tosa shape verification between operands/results.

Thanks for the clarification and comment.

Jul 22 2021, 6:05 PM · Restricted Project
eric-k256 added inline comments to D106610: [mlir][tosa] Disable tosa shape verification between operands/results.
Jul 22 2021, 5:05 PM · Restricted Project

Jul 16 2021

eric-k256 added a comment to D105845: [mlir][tosa] Shape inference for a few remaining easy cases:.

I don't know the ops that well, I could verify these if interested, but was going to rely on Suraj else :)

Jul 16 2021, 11:59 AM · Restricted Project