Page MenuHomePhabricator

silvas (Sean Silva)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 20 2012, 11:51 AM (461 w, 8 h)

Recent Activity

Fri, Jun 18

silvas added a comment to D104499: [mlir][NFC] Move SubTensorOp and SubTensorInsertOp to TensorDialect.

Thanks you Matthias for doing this! I apologize for leaving this in the sorry state that it was left in.

Fri, Jun 18, 7:52 AM · Restricted Project
silvas committed rG7f7be19e6a5e: [mlir] Add notes about using external interface application. (authored by silvas).
[mlir] Add notes about using external interface application.
Fri, Jun 18, 7:43 AM
silvas closed D104489: [mlir] Add notes about using external interface application..
Fri, Jun 18, 7:43 AM · Restricted Project
silvas updated subscribers of D102590: [YAMLParser] Add multi-line literal folding support.

@HassanElDesouky sorry, I'm not that familiar with this code.

Fri, Jun 18, 7:21 AM · Restricted Project

Thu, Jun 17

silvas added a comment to rG3ed3e438a75d: [mlir] Move `memref.dim` canonicalization using `InferShapedTypeOpInterface` to….

This makes me so sad that the memref.dim infection is forcing this to go in memref/transforms :'(

Thu, Jun 17, 2:51 PM
silvas requested review of D104489: [mlir] Add notes about using external interface application..
Thu, Jun 17, 2:34 PM · Restricted Project

Tue, Jun 15

Herald added a reviewer for D98041: [MLIR] Create memref dialect and move dialect-specific ops from std.: clementval.

Hi @dfki-jugr, can we please split memref.dim into tensor.dim (and memref.rank into tensor.rank). I've now independently heard complaints about this from 5+ people across many different teams I interact with.

Tue, Jun 15, 6:34 PM · Restricted Project

Mon, Jun 14

silvas committed rG853a61486475: [mlir:OpFormatGen] Add Support for `$_ctxt` in the transformer. (authored by silvas).
[mlir:OpFormatGen] Add Support for `$_ctxt` in the transformer.
Mon, Jun 14, 6:03 PM
silvas closed D104274: [mlir:OpFormatGen] Add Support for `$_ctxt` in the transformer..
Mon, Jun 14, 6:03 PM · Restricted Project
silvas requested review of D104274: [mlir:OpFormatGen] Add Support for `$_ctxt` in the transformer..
Mon, Jun 14, 5:34 PM · Restricted Project

Fri, Jun 11

silvas accepted D104139: Introduce tensor.insert op to Tensor dialect..
Fri, Jun 11, 5:24 PM · Restricted Project
silvas requested changes to D104139: Introduce tensor.insert op to Tensor dialect..
Fri, Jun 11, 12:40 PM · Restricted Project

Thu, May 27

silvas added a comment to D103132: [mlir][linalg] Derive padded subtensor shape from linalg op outputs.

DimOp should already have a canonicalizer that will use InferShapedTypeOpInterface to rewrite dim(linalgop(x)) to some_expr_of(dim(x)). Do you have a test case where that doesn't happen?

Thu, May 27, 10:14 AM · Restricted Project

May 19 2021

silvas committed rG35454268cf93: [mlir][CAPI] Expose [u]int8 DenseElementsAttr. (authored by silvas).
[mlir][CAPI] Expose [u]int8 DenseElementsAttr.
May 19 2021, 1:42 PM
silvas closed D102797: [mlir][CAPI] Expose [u]int8 DenseElementsAttr..
May 19 2021, 1:42 PM · Restricted Project
silvas accepted D101854: [mlir] Refactor the implementation of pass crash reproducers.
May 19 2021, 12:17 PM · Restricted Project
silvas requested review of D102797: [mlir][CAPI] Expose [u]int8 DenseElementsAttr..
May 19 2021, 12:01 PM · Restricted Project

May 13 2021

silvas accepted D102395: [mlir][Linalg] Add support for vector.transfer ops to comprehensive bufferization (2/n)..

LG once updated to not use the interface.

May 13 2021, 3:06 PM · Restricted Project
silvas accepted D101693: [mlir] Add ComprehensiveBufferize pass for function and modules (step 1/n).

Nicolas and I had a long conversation regarding the "in place op interface". We managed to tease out two separate concepts that are independent.

May 13 2021, 2:04 PM · Restricted Project
silvas committed rG12874e93a152: [mlir][NFC] Add helper for common pattern of replaceAllUsesExcept (authored by silvas).
[mlir][NFC] Add helper for common pattern of replaceAllUsesExcept
May 13 2021, 12:42 PM
silvas closed D102373: [mlir][NFC] Add helper for common pattern of replaceAllUsesExcept.
May 13 2021, 12:42 PM · Restricted Project
silvas added inline comments to D102373: [mlir][NFC] Add helper for common pattern of replaceAllUsesExcept.
May 13 2021, 12:37 PM · Restricted Project
silvas added inline comments to D102373: [mlir][NFC] Add helper for common pattern of replaceAllUsesExcept.
May 13 2021, 12:35 PM · Restricted Project

May 12 2021

silvas added inline comments to D101693: [mlir] Add ComprehensiveBufferize pass for function and modules (step 1/n).
May 12 2021, 5:15 PM · Restricted Project
silvas accepted D102375: [mlir][tosa] Fix tosa.cast semantics to perform rounding/clipping.

Code looks fine. Will let @sjarus review the rounding algorithm details.

May 12 2021, 4:33 PM · Restricted Project
silvas requested review of D102373: [mlir][NFC] Add helper for common pattern of replaceAllUsesExcept.
May 12 2021, 3:07 PM · Restricted Project

May 11 2021

silvas committed rG49755871ad0c: [mlir][ODS]: Add per-op cppNamespace. (authored by silvas).
[mlir][ODS]: Add per-op cppNamespace.
May 11 2021, 10:51 AM
silvas closed D102200: [mlir][ODS]: Add per-op cppNamespace..
May 11 2021, 10:51 AM · Restricted Project
silvas added a comment to D102200: [mlir][ODS]: Add per-op cppNamespace..

It seems there is agreement that this is a useful feature to support. Can someone LGTM?

May 11 2021, 10:37 AM · Restricted Project
silvas added a comment to D102200: [mlir][ODS]: Add per-op cppNamespace..

I don't quire get why can't just use the dialect namespace?
Anyway, not really opposed either, but can you add an op in the test dialect that would use this?

What I want is for different ops in the dialect to be in different namespaces. See dialect.td in the patch for an example.

I understand what the patch is doing and what you want, I don't really understand why...

See my above comment:

I have a dialect in npcomp that would greatly benefit from this. The basic problem is that we are importing a notion of "op" that is present in PyTorch, and has a "namespace" and "unqualified portion" of the op names. The "namespace" isn't really a dialect, but is useful to map to C++ namespaces in the code. We still model all these ops as part of a single dialect of "registered torch ops".

The basic problem is that PyTorch has notions of "ops" like prim::ListUnpack, aten::add, etc. The logical thing (because these "namespaces" are not "dialects" in the MLIR sense; they are just random prefixes that don't really have a strong structure to them) is to import them into the same dialect as torch.prim.ListUnpack and torch.aten.add. However, at the C++ level, I still want to retain ...::prim::ListUnpackOp and ...::aten::AddOp. Does that make sense? I could instead do PrimListUnpackOp and AtenAddOp but it just seems ugly.

I'd have thought it most natural to import each into its own dialect (e.g., torch_prim.ListUnpack) or having "subdialect" concept (which has been tossed around but unclear what it means - although with dialect fallbacks these become interesting because a subdialect could fallback to main dialect ...). These seem to be in same dialect just because from same frontend?

May 11 2021, 10:05 AM · Restricted Project
silvas added a comment to D102200: [mlir][ODS]: Add per-op cppNamespace..

I don't quire get why can't just use the dialect namespace?
Anyway, not really opposed either, but can you add an op in the test dialect that would use this?

What I want is for different ops in the dialect to be in different namespaces. See dialect.td in the patch for an example.

I understand what the patch is doing and what you want, I don't really understand why...

May 11 2021, 9:02 AM · Restricted Project

May 10 2021

silvas updated the diff for D102200: [mlir][ODS]: Add per-op cppNamespace..

factor helper

May 10 2021, 4:24 PM · Restricted Project
silvas added a comment to D102200: [mlir][ODS]: Add per-op cppNamespace..

I don't quire get why can't just use the dialect namespace?
Anyway, not really opposed either, but can you add an op in the test dialect that would use this?

May 10 2021, 4:16 PM · Restricted Project
silvas added a comment to D102200: [mlir][ODS]: Add per-op cppNamespace..

I have a dialect in npcomp that would greatly benefit from this. The basic problem is that we are importing a notion of "op" that is present in PyTorch, and has a "namespace" and "unqualified portion" of the op names. The "namespace" isn't really a dialect, but is useful to map to C++ namespaces in the code. We still model all these ops as part of a single dialect of "registered torch ops".

May 10 2021, 2:41 PM · Restricted Project
silvas requested review of D102200: [mlir][ODS]: Add per-op cppNamespace..
May 10 2021, 2:36 PM · Restricted Project

May 7 2021

silvas added inline comments to D102068: [MLIR][Shape] Concretize broadcast result type if possible.
May 7 2021, 9:59 AM · Restricted Project
silvas accepted D102060: [WIP][mlir] Resolve memref dependency in canonicalize pass..

We should commit this, but it is unfortunate, because now we have a dependency cycle between std and memref, e.g. MemRefDialect::materializeConstant uses mlir::ConstantOp (actually, it seems like a bug that we don't have a dependentDialects for the memref dialect depending on std)

May 7 2021, 9:55 AM · Restricted Project
silvas accepted D102068: [MLIR][Shape] Concretize broadcast result type if possible.
May 7 2021, 9:50 AM · Restricted Project

May 6 2021

silvas added inline comments to D101859: [MLIR] Introduce join/meet type interface..
May 6 2021, 4:57 PM · Restricted Project
silvas added inline comments to D101859: [MLIR] Introduce join/meet type interface..
May 6 2021, 4:07 PM · Restricted Project
silvas added inline comments to D101859: [MLIR] Introduce join/meet type interface..
May 6 2021, 4:07 PM · Restricted Project
silvas added inline comments to D101859: [MLIR] Introduce join/meet type interface..
May 6 2021, 3:26 PM · Restricted Project
silvas added inline comments to D101859: [MLIR] Introduce join/meet type interface..
May 6 2021, 3:22 PM · Restricted Project
silvas added inline comments to D101859: [MLIR] Introduce join/meet type interface..
May 6 2021, 8:45 AM · Restricted Project
silvas added inline comments to D101859: [MLIR] Introduce join/meet type interface..
May 6 2021, 8:37 AM · Restricted Project

May 5 2021

silvas added inline comments to D101859: [MLIR] Introduce join/meet type interface..
May 5 2021, 4:53 PM · Restricted Project
silvas added inline comments to D101859: [MLIR] Introduce join/meet type interface..
May 5 2021, 4:19 PM · Restricted Project
silvas added a comment to D101859: [MLIR] Introduce join/meet type interface..

btw, I think you might need to reupload the patch. I don't see the new code.

May 5 2021, 3:36 PM · Restricted Project
silvas added inline comments to D101859: [MLIR] Introduce join/meet type interface..
May 5 2021, 3:35 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?

May 5 2021, 2:59 PM · Restricted Project

May 4 2021

silvas added inline comments to D101859: [MLIR] Introduce join/meet type interface..
May 4 2021, 4:27 PM · Restricted Project
silvas added inline comments to D101859: [MLIR] Introduce join/meet type interface..
May 4 2021, 4:23 PM · Restricted Project

Apr 30 2021

silvas accepted D101673: [mlir] Add support for querying the ModRef behavior from the AliasAnalysis class.
Apr 30 2021, 5:38 PM · Restricted Project
silvas added a comment to D101621: [STLExtras] Add a two argument form of make_early_inc_range.

Seems fine to me in principle. Wait for others to weigh in though. @rriddle @dexonsmith

Apr 30 2021, 4:59 PM · Restricted Project

Apr 27 2021

silvas added inline comments to D101008: [mlir][tensors] Introduce attribute interface/attribute for tensor encoding.
Apr 27 2021, 1:31 PM · Restricted Project
silvas added inline comments to D101008: [mlir][tensors] Introduce attribute interface/attribute for tensor encoding.
Apr 27 2021, 12:08 PM · Restricted Project

Apr 26 2021

silvas accepted D101008: [mlir][tensors] Introduce attribute interface/attribute for tensor encoding.

LGTM from me. Please get LGTM from someone with sparse compiler expertise on the exact API for SparseTensorEncodingAttr (choice of default, what would be most ergonomic, etc.).

Apr 26 2021, 3:33 PM · Restricted Project

Apr 23 2021

silvas accepted D100915: [mlir] Refactor the forward dataflow propagation in SCCP into a generic framework.

I still caught a few places using bare "lattice" (noted some; more exist). There are a lot of cases where you say "lattice value" or "lattice state" as well which probably should all be normalized to "lattice element".

Apr 23 2021, 2:43 PM · Restricted Project
silvas accepted D101158: [MLIR][Shape] Ensure to preserve op type of `shape.broadcast`.
Apr 23 2021, 10:25 AM · Restricted Project
silvas accepted D101170: [MLIR] Remove empty shape operands from `cstr_broadcastable` ops.
Apr 23 2021, 10:11 AM · Restricted Project

Apr 22 2021

silvas accepted D101009: [mlir][tosa] Add tosa.resize lowering to linalg generic.

LGTM. The code looks reasonable, assuming you verified the outputs are correct on a few cases (always tricky to statically inspect the code).

Apr 22 2021, 1:43 PM · Restricted Project
silvas added a comment to D101008: [mlir][tensors] Introduce attribute interface/attribute for tensor encoding.

          SparseTensorEncoding: an API for a sparse tensor (nothing else), making it a first-class citizen; note that this is extended TACO style, so you have to trust us a bit that it has the right components 

Apr 22 2021, 12:26 PM · Restricted Project
silvas added a comment to D101008: [mlir][tensors] Introduce attribute interface/attribute for tensor encoding.

I still would rather see this as just attributes on the SparseTensorAttr class, until there is a demonstrated need to make this an interface (and that this particular interface is the right choice). But I don't have the energy to argue it further. Carry on.

Apr 22 2021, 11:02 AM · Restricted Project
silvas requested changes to D101008: [mlir][tensors] Introduce attribute interface/attribute for tensor encoding.
Apr 22 2021, 10:52 AM · Restricted Project
silvas added inline comments to D101008: [mlir][tensors] Introduce attribute interface/attribute for tensor encoding.
Apr 22 2021, 10:52 AM · Restricted Project

Apr 20 2021

silvas accepted D100921: [mlir] Linalg : do not forward memrefs to outputs when do bufferization.
Apr 20 2021, 9:52 PM · Restricted Project
silvas added inline comments to D100915: [mlir] Refactor the forward dataflow propagation in SCCP into a generic framework.
Apr 20 2021, 6:15 PM · Restricted Project
silvas accepted D100832: [mlir] Assume terminators in nested regions are always legal in FuncBufferizePass.

Thanks!

Apr 20 2021, 12:15 PM · Restricted Project

Apr 19 2021

silvas accepted D100457: [MLIR][LinAlg] Detensoring CF cost-model: look forward..

Awesome. Looks great!

Apr 19 2021, 2:21 PM · Restricted Project
silvas accepted D100786: [mlir][python] ExecutionEngine can dump to object file.
Apr 19 2021, 12:34 PM · Restricted Project

Apr 14 2021

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

Apr 12 2021

silvas accepted D100061: [mlir][tosa] Add conv2d lowering to linalg.conv2d operator for FP.
Apr 12 2021, 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.

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

Thanks! Great work!

Apr 12 2021, 2:09 PM · Restricted Project

Apr 9 2021

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

"encoding" SGTM.

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

properties LGTM as well.

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

Apr 8 2021

silvas added inline comments to D99548: [mlir] introduce "encoding" attribute to tensor type.
Apr 8 2021, 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.

Apr 8 2021, 12:30 PM · Restricted Project

Apr 7 2021

silvas added inline comments to D99945: [MLIR][LinAlg] Implement detensoring cost-modelling..
Apr 7 2021, 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.

Apr 7 2021, 11:46 AM · Restricted Project

Apr 6 2021

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

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

Apr 6 2021, 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

Apr 6 2021, 12:15 PM · Restricted Project

Apr 5 2021

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

Apr 2 2021

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

Apr 1 2021

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

Mar 25 2021

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.

Mar 25 2021, 1:18 PM · Restricted Project

Mar 24 2021

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.

Mar 24 2021, 10:10 AM · Restricted Project

Mar 23 2021

silvas accepted D99137: [mlir][tosa] Add tosa.argmax to linalg lowering.
Mar 23 2021, 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?

Mar 23 2021, 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.

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

Mar 22 2021

silvas committed rG0524a09cc7e1: [mlir] Tune error message for assertion. (authored by silvas).
[mlir] Tune error message for assertion.
Mar 22 2021, 6:11 PM