Page MenuHomePhabricator
Feed Advanced Search

Wed, Apr 14

silvas added inline comments to D100457: [MLIR][LinAlg] Detensoring CF cost-model: look forward..
Wed, Apr 14, 11:42 AM · Restricted Project
silvas added inline comments to D100457: [MLIR][LinAlg] Detensoring CF cost-model: look forward..
Wed, Apr 14, 11:39 AM · Restricted Project
silvas added inline comments to D100457: [MLIR][LinAlg] Detensoring CF cost-model: look forward..
Wed, Apr 14, 11:32 AM · Restricted Project

Mon, Apr 12

silvas accepted D100061: [mlir][tosa] Add conv2d lowering to linalg.conv2d operator for FP.
Mon, Apr 12, 2:52 PM · Restricted Project
silvas added a comment to D98041: [MLIR] Create memref dialect and move dialect-specific ops from std..

Any progress on splitting memref.dim into tensor.dim? Multiple downstream projects are now complaining about this.

Mon, Apr 12, 2:43 PM · Restricted Project
silvas accepted D99945: [MLIR][LinAlg] Implement detensoring cost-modelling..

Thanks! Great work!

Mon, Apr 12, 2:09 PM · Restricted Project

Fri, Apr 9

silvas added a comment to D99548: [mlir] introduce "encoding" attribute to tensor type.

"encoding" SGTM.

Fri, Apr 9, 5:00 PM · Restricted Project
silvas updated subscribers of D99548: [mlir] introduce "encoding" attribute to tensor type.

properties LGTM as well.

Fri, Apr 9, 1:13 PM · Restricted Project
silvas added inline comments to D99945: [MLIR][LinAlg] Implement detensoring cost-modelling..
Fri, Apr 9, 1:08 PM · Restricted Project
silvas added inline comments to D99945: [MLIR][LinAlg] Implement detensoring cost-modelling..
Fri, Apr 9, 1:08 PM · Restricted Project
silvas added inline comments to D99548: [mlir] introduce "encoding" attribute to tensor type.
Fri, Apr 9, 10:59 AM · Restricted Project

Thu, Apr 8

silvas added inline comments to D99548: [mlir] introduce "encoding" attribute to tensor type.
Thu, Apr 8, 4:14 PM · Restricted Project
silvas added a comment to D100104: [MLIR][Shape] Canonicalize `assuming_all` when all operands are `cstr_bcastable`.

This is not a correct xform because broadcastability is not transitive.

Thu, Apr 8, 12:30 PM · Restricted Project

Wed, Apr 7

silvas added inline comments to D99945: [MLIR][LinAlg] Implement detensoring cost-modelling..
Wed, Apr 7, 12:18 PM · Restricted Project
silvas added a comment to D99172: [mlir] Introduce CloneOp and adapt test cases in BufferDeallocation..

@dfki-jugr But why does this revision remove the copy removal pass when there are things that generate copies? The extension to canonicalization done eliminates clone ops, but IR with copy ops will no longer have a way to remove copies? For eg. -linalg-bufferize would still generate copy operations, right? @silvas

I believe all uses of copy in linalg-bufferize can be replaced with memref.clone easily -- it's a much more natural representation and we should do that cleanup.

Yes, but I wish -copy-removal was removed *after* this cleanup was done --- since there are now common copy patterns for which there is no longer anything in the infrastructure to eliminate/optimize.

Wed, Apr 7, 11:46 AM · Restricted Project

Tue, Apr 6

silvas accepted D99986: [shape] Add min and max ops.

Not sure if you want to add folders in this patch.

Tue, Apr 6, 1:02 PM · Restricted Project
silvas added a comment to D99172: [mlir] Introduce CloneOp and adapt test cases in BufferDeallocation..

@dfki-jugr But why does this revision remove the copy removal pass when there are things that generate copies? The extension to canonicalization done eliminates clone ops, but IR with copy ops will no longer have a way to remove copies? For eg. -linalg-bufferize would still generate copy operations, right? @silvas

Tue, Apr 6, 12:15 PM · Restricted Project

Mon, Apr 5

silvas accepted D99819: [mlir][Linalg] NFC: Move populatePatterns* method into linalg namespace..
Mon, Apr 5, 9:49 AM · Restricted Project

Fri, Apr 2

silvas committed rG223dcdcfbe23: [mlir] Add optional TypeConverter for materializations. (authored by silvas).
[mlir] Add optional TypeConverter for materializations.
Fri, Apr 2, 1:40 PM
silvas closed D99782: [mlir] Add optional TypeConverter for materializations..
Fri, Apr 2, 1:39 PM · Restricted Project
silvas accepted D99228: [mlir][tosa] Add tosa.reduce_any and tosa.reduce_all linalg lowering.
Fri, Apr 2, 1:13 PM · Restricted Project

Thu, Apr 1

silvas requested review of D99782: [mlir] Add optional TypeConverter for materializations..
Thu, Apr 1, 5:47 PM · Restricted Project

Thu, Mar 25

silvas added a comment to D98041: [MLIR] Create memref dialect and move dialect-specific ops from std..

I think just a patch splitting the op into tensor.dim and memref.dim would be fine. There isn't much to discuss.

So there was a discussion that this could be done via interfaces, for example. We could have a generic dim and rank operation that can be applied to any ShapedType type. That would also make it easier to rewrite between these types, as the dim and rank operation would no longer need to change.

Just to be clear, I am not saying we should not do this split, I am just trying to avoid the extra work if soon later we decide that there is a different and better way to model this. This is more work than "just a patch", especially for downstream users, so we should avoid unnecessary churn. As far as I understand it, this is about an extra link time dependency that is not worse than the monolithic dialect before.

Thu, Mar 25, 1:18 PM · Restricted Project

Wed, Mar 24

silvas added a comment to D98041: [MLIR] Create memref dialect and move dialect-specific ops from std..

I think just a patch splitting the op into tensor.dim and memref.dim would be fine. There isn't much to discuss.

Wed, Mar 24, 10:10 AM · Restricted Project

Tue, Mar 23

silvas accepted D99137: [mlir][tosa] Add tosa.argmax to linalg lowering.
Tue, Mar 23, 3:44 PM · Restricted Project
silvas added a comment to D98041: [MLIR] Create memref dialect and move dialect-specific ops from std..

It looks like this patch simply moved std.dim to memref.dim, without doing the "splitting" which we had discussed. I now have code that only operates on tensors that is needing to pull in the memref dialect just for this. Can you split memref.dim into tensor.dim for the tensor case?

Tue, Mar 23, 1:31 PM · Restricted Project
silvas added a comment to rG0524a09cc7e1: [mlir] Tune error message for assertion..

I haven't audited it yet, but I suspect we can do better. In this case, the binding for PassManager::run would need to check that the context for the op is the same as its context.

Tue, Mar 23, 11:19 AM
silvas added inline comments to D99137: [mlir][tosa] Add tosa.argmax to linalg lowering.
Tue, Mar 23, 10:41 AM · Restricted Project
silvas accepted D99113: [mlir][tosa] Add tosa.tile to linalg.generic lowering.
Tue, Mar 23, 10:39 AM · Restricted Project

Mon, Mar 22

silvas committed rG0524a09cc7e1: [mlir] Tune error message for assertion. (authored by silvas).
[mlir] Tune error message for assertion.
Mon, Mar 22, 6:11 PM
silvas accepted D99113: [mlir][tosa] Add tosa.tile to linalg.generic lowering.

LG. I think there is a way to represent this as a broadcast + reshape which supposedly has some sort of advantage, but this looks fine for now.

Mon, Mar 22, 4:43 PM · Restricted Project
silvas accepted D99011: [mlir][tosa] Fix tosa.mul to use tosa.apply_scale.
Mon, Mar 22, 10:30 AM · Restricted Project
silvas accepted D99039: [PatternMatching] Add convenience insert method to OwningRewritePatternList. NFC..

+1 on the c function to allow better type inference. Unless somebody has an immediate suggestion for how to achieve the same with more advanced metaprogramming, this LGTM.

Mon, Mar 22, 10:04 AM · Restricted Project

Fri, Mar 19

silvas accepted D98997: [mlir][tosa] Add tosa.reverse lowering to linalg.generic.
Fri, Mar 19, 6:14 PM · Restricted Project

Mar 18 2021

silvas accepted D98753: [mlir][tosa] Add lowering for tosa.rescale to linalg.generic.
Mar 18 2021, 3:05 PM · Restricted Project

Mar 17 2021

silvas added inline comments to D98753: [mlir][tosa] Add lowering for tosa.rescale to linalg.generic.
Mar 17 2021, 4:17 PM · Restricted Project

Mar 16 2021

silvas requested changes to D98753: [mlir][tosa] Add lowering for tosa.rescale to linalg.generic.
Mar 16 2021, 5:27 PM · Restricted Project

Mar 12 2021

silvas accepted D98478: [mlir] Remove unsafe tensor_to_memref -> load canonicalization pattern..

LGTM. Retaining this in the "next node" case doesn't fix the core problem of undoing bufferization which I think was the issue you were hitting (and is my main objection to this pattern).

Mar 12 2021, 11:09 AM · Restricted Project

Mar 11 2021

silvas added inline comments to D98470: [mlir][amx] Add Intel AMX dialect (architectural-specific vector dialect).
Mar 11 2021, 7:55 PM · Restricted Project

Mar 10 2021

silvas accepted D98186: [MLIR] Allow compatible shapes in `Elementwise` operations.

Really, it feels a lot better to convert Elementwise ops, broadcasting, etc. into linalg.generic ops, and much of the folding that I describe above can happen there trivially on the scalarized payload without any of these considerations.

Mar 10 2021, 6:10 AM · Restricted Project

Mar 9 2021

silvas added a comment to D98186: [MLIR] Allow compatible shapes in `Elementwise` operations.

The key issue is:

Mar 9 2021, 11:28 AM · Restricted Project

Mar 8 2021

silvas requested changes to D98186: [MLIR] Allow compatible shapes in `Elementwise` operations.

This is explicitly prohibited. Do not add this (see the rationale: https://github.com/llvm/llvm-project/blob/f0ccdde3c9ab23f997a4a30a0e9ab7d9435ec1c6/mlir/include/mlir/IR/OpDefinition.h#L1250).

Mar 8 2021, 5:25 PM · Restricted Project

Mar 4 2021

silvas added a comment to D97953: [mlir][scf] Canonicalize scf.for last tensor iteration result..

LGTM conceptually. Please wait for River/Alex LGTM for the rewrite mechanics since they already started looking at it.

Mar 4 2021, 12:44 PM · Restricted Project
silvas added inline comments to D97953: [mlir][scf] Canonicalize scf.for last tensor iteration result..
Mar 4 2021, 12:12 PM · Restricted Project

Mar 3 2021

silvas accepted D97841: Clarify documentation for `Elementwise`, `Scalarizable`, `Vectorizable`, and `Tensorizable` traits..
Mar 3 2021, 11:01 AM · Restricted Project

Mar 2 2021

silvas added inline comments to D97532: [mlir] Enhance InferShapedTypeOpInterface and move LinalgOps to use them..
Mar 2 2021, 12:28 PM · Restricted Project
silvas added inline comments to D97148: [MLIR][LinAlg] Detensorize interal function control flow..
Mar 2 2021, 12:21 PM · Restricted Project
silvas added inline comments to D97674: Split `ElementwiseMappable` trait into four more precise traits..
Mar 2 2021, 11:59 AM · Restricted Project

Feb 26 2021

silvas accepted D97517: [MLIR][TOSA] Lower tosa.identity and tosa.identitiyn to linalg.
Feb 26 2021, 2:04 PM · Restricted Project
silvas added a comment to D97517: [MLIR][TOSA] Lower tosa.identity and tosa.identitiyn to linalg.

Can you add a comment regarding which scenarios identity is load bearing and for which backends?

Feb 26 2021, 2:04 PM · Restricted Project
silvas accepted D97148: [MLIR][LinAlg] Detensorize interal function control flow..

One conceptual concern, but otherwise this LGTM.

Feb 26 2021, 1:58 PM · Restricted Project

Feb 25 2021

silvas accepted D97352: [MLIR][TOSA] Added Tosa to Standard/SCF Lowerings (const, if, while).
Feb 25 2021, 1:45 PM · Restricted Project
silvas added inline comments to D97148: [MLIR][LinAlg] Detensorize interal function control flow..
Feb 25 2021, 12:06 PM · Restricted Project
silvas added a reviewer for D97439: [MLIR][TOSA] Lower tosa.reshape to linalg.reshape: mravishankar.

@mravishankar can you review this? I'm not up to date on linalg.reshape (I recall it has some subtleties)

Feb 25 2021, 11:57 AM · Restricted Project

Feb 24 2021

silvas committed rGc519460745ec: Allow !shape.size type operands in "shape.from_extents" op. (authored by Jing).
Allow !shape.size type operands in "shape.from_extents" op.
Feb 24 2021, 2:50 PM
silvas closed D97261: Allow !shape.size type operands in "shape.from_extents" op..
Feb 24 2021, 2:50 PM · Restricted Project
silvas added inline comments to D97148: [MLIR][LinAlg] Detensorize interal function control flow..
Feb 24 2021, 1:48 PM · Restricted Project
silvas added inline comments to D97352: [MLIR][TOSA] Added Tosa to Standard/SCF Lowerings (const, if, while).
Feb 24 2021, 1:38 PM · Restricted Project
silvas added a comment to D97352: [MLIR][TOSA] Added Tosa to Standard/SCF Lowerings (const, if, while).

test cases?

Feb 24 2021, 11:37 AM · Restricted Project
silvas accepted D97261: Allow !shape.size type operands in "shape.from_extents" op..
Feb 24 2021, 11:02 AM · Restricted Project
silvas added inline comments to D97148: [MLIR][LinAlg] Detensorize interal function control flow..
Feb 24 2021, 11:00 AM · Restricted Project

Feb 22 2021

silvas added inline comments to D96271: [MLIR][LinAlg] Start detensoring implementation..
Feb 22 2021, 10:24 AM · Restricted Project
silvas accepted D96271: [MLIR][LinAlg] Start detensoring implementation..

Perfect!

Feb 22 2021, 10:23 AM · Restricted Project

Feb 17 2021

silvas requested changes to D96271: [MLIR][LinAlg] Start detensoring implementation..

@silvas Your last comments all seem to be on an old diff :). FuncBufferize changes were already reverted and the detensoring code was moved to its own file.

Feb 17 2021, 11:21 AM · Restricted Project

Feb 16 2021

silvas added inline comments to D96271: [MLIR][LinAlg] Start detensoring implementation..
Feb 16 2021, 3:07 PM · Restricted Project
silvas added inline comments to D96763: [mlir] NFC - Rename OpFoldResult -> ValueOrAttr.
Feb 16 2021, 10:49 AM · Restricted Project

Feb 12 2021

silvas accepted D96425: [MLIR] Create memref dialect and move several dialect-specific ops from std..
Feb 12 2021, 6:03 PM · Restricted Project
silvas requested changes to D96425: [MLIR] Create memref dialect and move several dialect-specific ops from std..
Feb 12 2021, 5:56 PM · Restricted Project
silvas added inline comments to D96425: [MLIR] Create memref dialect and move several dialect-specific ops from std..
Feb 12 2021, 5:56 PM · Restricted Project
silvas added inline comments to D96271: [MLIR][LinAlg] Start detensoring implementation..
Feb 12 2021, 5:52 PM · Restricted Project

Feb 10 2021

silvas committed rGb83361b82bfe: Minor fixes to Type ODS docs. (authored by silvas).
Minor fixes to Type ODS docs.
Feb 10 2021, 3:23 PM
silvas committed rG6b07a978350f: [mlir] Introduce more intuitive wording for attributes. (authored by silvas).
[mlir] Introduce more intuitive wording for attributes.
Feb 10 2021, 3:23 PM
silvas closed D96391: Minor fixes to Type ODS docs..
Feb 10 2021, 3:23 PM · Restricted Project
silvas closed D96093: [mlir] Introduce more intuitive wording for attributes..
Feb 10 2021, 3:23 PM · Restricted Project
silvas added inline comments to D96425: [MLIR] Create memref dialect and move several dialect-specific ops from std..
Feb 10 2021, 3:20 PM · Restricted Project
silvas added inline comments to D96425: [MLIR] Create memref dialect and move several dialect-specific ops from std..
Feb 10 2021, 3:19 PM · Restricted Project
silvas added a comment to D96271: [MLIR][LinAlg] Start detensoring implementation..

I think we need to start with the pass (perhaps it only handles certain simple cases) and then gradually make the pass better.

Feb 10 2021, 3:11 PM · Restricted Project
silvas added a comment to D96271: [MLIR][LinAlg] Start detensoring implementation..

@silvas Sorry forgot to reply to this point:

I would like to see a bit more of the pass that actually uses these patterns (e.g. the cost model).

Do you mean something like an analysis that computes the benefit of detensoring for a certain operation (for some definition of benefit, I didn't think this through yet)?

If so, then that can be step number 3. Step 2, as I mentioned in my previous comment is supporting detensoring on more complex CFGs like the while loops I linked in the comment.

Is that reasonable?

Feb 10 2021, 3:04 PM · Restricted Project
silvas accepted D96190: [MLIR][TOSA] Tosa elementwise broadcasting.
Feb 10 2021, 2:32 PM · Restricted Project

Feb 9 2021

silvas requested review of D96391: Minor fixes to Type ODS docs..
Feb 9 2021, 6:58 PM · Restricted Project
silvas accepted D96358: Add NoSideEffect trait to shape.split_at and shape.concat.
Feb 9 2021, 12:11 PM · Restricted Project
silvas added inline comments to D96190: [MLIR][TOSA] Tosa elementwise broadcasting.
Feb 9 2021, 12:10 PM · Restricted Project

Feb 8 2021

silvas added a reviewer for D96271: [MLIR][LinAlg] Start detensoring implementation.: silvas.
Feb 8 2021, 11:33 AM · Restricted Project
silvas added a comment to D96271: [MLIR][LinAlg] Start detensoring implementation..

I would like to see a bit more of the pass that actually uses these patterns (e.g. the cost model).

Feb 8 2021, 11:33 AM · Restricted Project

Feb 5 2021

silvas updated the diff for D96093: [mlir] Introduce more intuitive wording for attributes..

Address River's comment

Feb 5 2021, 6:26 PM · Restricted Project
silvas added a comment to D96111: Reorder MLIRContext location in BuiltinAttributes.h.

Thanks Tres!!!

Feb 5 2021, 1:58 PM · Restricted Project
silvas updated the diff for D96093: [mlir] Introduce more intuitive wording for attributes..

minor wording tweak

Feb 5 2021, 1:45 PM · Restricted Project
silvas updated the summary of D96093: [mlir] Introduce more intuitive wording for attributes..
Feb 5 2021, 1:44 PM · Restricted Project
silvas updated the diff for D96093: [mlir] Introduce more intuitive wording for attributes..

Switch to inherent/discardable.

Feb 5 2021, 1:44 PM · Restricted Project

Feb 4 2021

silvas added a comment to D96093: [mlir] Introduce more intuitive wording for attributes..
In D96093#2543846, @jdd wrote:

“Intrinsic” makes me think of compiler intrinsics, which this is not. I like “property” since they are necessary properties of ops. I don’t have a strong preference other than the rejection reasons you give.

Feb 4 2021, 5:56 PM · Restricted Project
silvas accepted D96088: [mlir][IR] Remove the concept of `OperationProperties`.

Nice. Looks good. I assume you checked this doesn't regress anything significantly in practice?

Feb 4 2021, 5:25 PM · Restricted Project
silvas updated the summary of D96093: [mlir] Introduce more intuitive wording for attributes..
Feb 4 2021, 4:57 PM · Restricted Project
silvas updated the summary of D96093: [mlir] Introduce more intuitive wording for attributes..
Feb 4 2021, 4:54 PM · Restricted Project
silvas updated the diff for D96093: [mlir] Introduce more intuitive wording for attributes..

slight tweak

Feb 4 2021, 4:54 PM · Restricted Project
silvas added a reviewer for D96093: [mlir] Introduce more intuitive wording for attributes.: ftynse.
Feb 4 2021, 4:51 PM · Restricted Project
silvas added reviewers for D96093: [mlir] Introduce more intuitive wording for attributes.: lattner, rriddle, mehdi_amini.
Feb 4 2021, 4:51 PM · Restricted Project
silvas requested review of D96093: [mlir] Introduce more intuitive wording for attributes..
Feb 4 2021, 4:50 PM · Restricted Project
silvas committed rG042db54b2692: [mlir] Small touchups to LangRef attribute section (authored by silvas).
[mlir] Small touchups to LangRef attribute section
Feb 4 2021, 1:33 PM
silvas closed D96076: [mlir] Small touchups to LangRef attribute section.
Feb 4 2021, 1:33 PM · Restricted Project
silvas requested review of D96076: [mlir] Small touchups to LangRef attribute section.
Feb 4 2021, 1:31 PM · Restricted Project