Page MenuHomePhabricator

herhut (Stephan Herhut)
Animal

Projects

User does not belong to any projects.

User Details

User Since
Jan 7 2020, 7:38 AM (106 w, 2 d)

Recent Activity

Today

herhut committed rG6d45284618f0: [mlir][memref] Add better support for identity layouts in memref.collapse_shape… (authored by herhut).
[mlir][memref] Add better support for identity layouts in memref.collapse_shape…
Thu, Jan 20, 6:32 AM
herhut closed D117772: [mlir][memref] Add better support for identity layouts in memref.collapse_shape canonicalizer.
Thu, Jan 20, 6:32 AM · Restricted Project
herhut added a comment to D117519: [MLIR][GPU] Add debug output to enable dumping GPU assembly.

Please fix the commit message though. I just noticed this now.

Thu, Jan 20, 5:24 AM · Restricted Project
herhut accepted D117519: [MLIR][GPU] Add debug output to enable dumping GPU assembly.

Thanks.

Thu, Jan 20, 5:24 AM · Restricted Project
herhut added a comment to D117772: [mlir][memref] Add better support for identity layouts in memref.collapse_shape canonicalizer.

PTAL

Thu, Jan 20, 5:05 AM · Restricted Project
herhut updated the diff for D117772: [mlir][memref] Add better support for identity layouts in memref.collapse_shape canonicalizer.

Pull size checking out of helper.

Thu, Jan 20, 5:03 AM · Restricted Project
herhut added reviewers for D117772: [mlir][memref] Add better support for identity layouts in memref.collapse_shape canonicalizer: bkramer, ftynse, nicolasvasilache.
Thu, Jan 20, 4:23 AM · Restricted Project
herhut requested review of D117772: [mlir][memref] Add better support for identity layouts in memref.collapse_shape canonicalizer.
Thu, Jan 20, 4:22 AM · Restricted Project

Tue, Jan 18

herhut added a comment to D117519: [MLIR][GPU] Add debug output to enable dumping GPU assembly.

Thanks for adding this. I have wanted this a couple of times, too, but never went as far as creating a diff for it.

Tue, Jan 18, 10:52 AM · Restricted Project

Mon, Jan 17

herhut added a comment to D117427: Add verifier for gpu.alloc op.

Thanks for adding this. Could this rather reuse the logic from verifyAllocLike from the memref operations? It is the same logic but it would need to be exposed to other dialect.

Mon, Jan 17, 4:41 AM · Restricted Project

Fri, Jan 14

herhut committed rGaa3cabe3cbe8: [mlir][memref] Fix memref.copy of scalar memref (authored by herhut).
[mlir][memref] Fix memref.copy of scalar memref
Fri, Jan 14, 7:16 AM
herhut closed D117314: [mlir][memref] Fix memref.copy of scalar memref.
Fri, Jan 14, 7:15 AM · Restricted Project
herhut requested review of D117314: [mlir][memref] Fix memref.copy of scalar memref.
Fri, Jan 14, 7:02 AM · Restricted Project
herhut committed rGab95ba704da4: [mlir][memref] Implement fast lowering of memref.copy (authored by herhut).
[mlir][memref] Implement fast lowering of memref.copy
Fri, Jan 14, 5:22 AM
herhut closed D116099: [mlir][memref] Implement fast lowering of memref.copy.
Fri, Jan 14, 5:22 AM · Restricted Project

Thu, Jan 13

herhut updated the diff for D116099: [mlir][memref] Implement fast lowering of memref.copy.

fix test

Thu, Jan 13, 3:06 AM · Restricted Project

Wed, Jan 12

herhut accepted D117101: Fold arith.cmpf when at least one operand is known to be NaN..
Wed, Jan 12, 5:40 AM · Restricted Project

Tue, Jan 11

herhut added a comment to D117010: Mark arith.minf, arith.maxf as commutative..

The arith::minf operation is defined as

Tue, Jan 11, 9:23 AM · Restricted Project
herhut accepted D117011: Remove NaN constant from arith.minf, arith.maxf expansion.

Thanks!

Tue, Jan 11, 9:06 AM · Restricted Project
herhut added a comment to D116600: [linalg][fusion] Disallow fusion when it would create an invalid expand_shape.

I think Mahesh's suggestion is better because there is no guarantee in shape reification that you'd return 1 and you may well end up with propagating dynamic information further down.

There could well be a separate pass that inserts these casts to avoid the behavior in shape reification if that is critical to your use cases. I think it would still be better to fix shape reification to return a static value where possible. After all, if this is valid linalg IR, reification should do as good as it can with it.

Tue, Jan 11, 8:48 AM · Restricted Project
herhut updated the diff for D116099: [mlir][memref] Implement fast lowering of memref.copy.

rebase

Tue, Jan 11, 7:31 AM · Restricted Project
herhut accepted D117010: Mark arith.minf, arith.maxf as commutative..

Thanks!

Tue, Jan 11, 6:07 AM · Restricted Project
herhut added inline comments to D117011: Remove NaN constant from arith.minf, arith.maxf expansion.
Tue, Jan 11, 6:06 AM · Restricted Project

Mon, Jan 10

herhut added a comment to D116889: Add inliner interface for GPU dialect.

Is it legal though? Should we have something like gpu.thread_id outside of a GPU function/module? I would rather think it is legal to inline GPU functions into GPU functions.

Mon, Jan 10, 3:02 AM · Restricted Project
herhut committed rG33cec20dbd3b: [mlir][memref] Tighten verification of memref.reinterpret_cast (authored by herhut).
[mlir][memref] Tighten verification of memref.reinterpret_cast
Mon, Jan 10, 2:56 AM
herhut closed D116601: [mlir][memref] Tighten verification of memref.reinterpret_cast.
Mon, Jan 10, 2:56 AM · Restricted Project

Fri, Jan 7

herhut added inline comments to D116600: [linalg][fusion] Disallow fusion when it would create an invalid expand_shape.
Fri, Jan 7, 6:46 AM · Restricted Project
herhut added a comment to D116601: [mlir][memref] Tighten verification of memref.reinterpret_cast.

Thanks!

Fri, Jan 7, 4:36 AM · Restricted Project
herhut added a comment to D116099: [mlir][memref] Implement fast lowering of memref.copy.

You are just using isIdentity() -- the API doesn't name map outside. In the inside, it's still a map.

I was not clear. I was wondering about the case where the static type of the memref does not have a map but the descriptor at runtime still does not have identity strides. Currently, one can create this setting using memref.reinterpret_cast by omitting the map from the target type. Maybe that should be illegal.

This would be an invalid op and should have failed the verifier in the first place. (Note that the memref always has a map -- it's not printed if it's identity as you know. Also, identity strides (all ones) don't correspond to an identity map -- N^2, N, 1 for example would correspond to an identity map for a 3-d memref for example.)

Fri, Jan 7, 1:04 AM · Restricted Project
herhut updated the diff for D116099: [mlir][memref] Implement fast lowering of memref.copy.

Combined the two patterns.

Fri, Jan 7, 1:01 AM · Restricted Project
herhut added inline comments to D116601: [mlir][memref] Tighten verification of memref.reinterpret_cast.
Fri, Jan 7, 12:58 AM · Restricted Project
herhut updated the diff for D116601: [mlir][memref] Tighten verification of memref.reinterpret_cast.

Simplified as suggested

Fri, Jan 7, 12:56 AM · Restricted Project

Wed, Jan 5

herhut accepted D116657: [mlir] Fix missing check on nested op values in LICM.

Great find. Thanks for the fix.

Wed, Jan 5, 5:52 AM · Restricted Project

Tue, Jan 4

herhut requested review of D116601: [mlir][memref] Tighten verification of memref.reinterpret_cast.
Tue, Jan 4, 8:19 AM · Restricted Project

Wed, Dec 22

herhut added a comment to D116099: [mlir][memref] Implement fast lowering of memref.copy.

Do you want to instead create one pattern with two functions in it? It'll lead to less overhead in the greedy rewrite driver and perhaps also easier to later choose between the two.

I though about that, too. Another way would be to give the memcpy based pattern higher benefit and actually make then non-exclusive. That way one could optionally blend in the memcpy based pattern.

All of this still leads to two patterns.

Wed, Dec 22, 8:48 AM · Restricted Project
herhut added a comment to D116151: [mlir][arith] Fix CmpIOP folding for vector types..

Can you change the subject to have an additional tag, e.g., [mlir][arith]. That provides a little more context. You could also state that it did fail for vectors before but now it folds them correctly.

Wed, Dec 22, 6:40 AM · Restricted Project
herhut accepted D116151: [mlir][arith] Fix CmpIOP folding for vector types..

Thanks!

Wed, Dec 22, 6:39 AM · Restricted Project
herhut added a comment to D116099: [mlir][memref] Implement fast lowering of memref.copy.

Do you want to instead create one pattern with two functions in it? It'll lead to less overhead in the greedy rewrite driver and perhaps also easier to later choose between the two.

Wed, Dec 22, 5:24 AM · Restricted Project
herhut updated the diff for D116099: [mlir][memref] Implement fast lowering of memref.copy.

Add comments and failure reason.

Wed, Dec 22, 5:21 AM · Restricted Project

Dec 21 2021

herhut requested review of D116099: [mlir][memref] Implement fast lowering of memref.copy.
Dec 21 2021, 4:00 AM · Restricted Project
herhut committed rG8761f5ebf754: [mlir][Support] Avoid multiplication in floorDiv / ceilDiv (authored by herhut).
[mlir][Support] Avoid multiplication in floorDiv / ceilDiv
Dec 21 2021, 2:51 AM
herhut closed D116096: [mlir][Support] Avoid multiplication in floorDiv / ceilDiv.
Dec 21 2021, 2:51 AM · Restricted Project
herhut accepted D114678: [mlir][memref] ReinterpretCast: allow static sizes/strides/offset where affine map expects dynamic.

Thanks. I don't see any reason to disallow this either and was surprised by the error message.

Dec 21 2021, 2:36 AM · Restricted Project
herhut updated the diff for D116096: [mlir][Support] Avoid multiplication in floorDiv / ceilDiv.

Add tests and fix behaviour for zero case.

Dec 21 2021, 2:32 AM · Restricted Project
herhut requested review of D116096: [mlir][Support] Avoid multiplication in floorDiv / ceilDiv.
Dec 21 2021, 1:58 AM · Restricted Project

Dec 16 2021

herhut accepted D115821: [mlir] Extend `tensor.from_elements` to support N-D case..
Dec 16 2021, 5:51 AM · Restricted Project
herhut added inline comments to D115821: [mlir] Extend `tensor.from_elements` to support N-D case..
Dec 16 2021, 4:54 AM · Restricted Project

Dec 14 2021

herhut accepted D115722: [mlir][GPU] Extend GPU kernel outlining to generate DL specification.

It would be nice if we could just pass the data layout as a string.

Dec 14 2021, 7:27 AM · Restricted Project

Dec 8 2021

herhut accepted D115326: [mlir] Added documentation for bufferization to memref conversion pass..
Dec 8 2021, 5:11 AM · Restricted Project

Dec 1 2021

herhut committed rG9fce961d2f47: [mlir][linalg] Disable tensor-matmul test under asan (authored by herhut).
[mlir][linalg] Disable tensor-matmul test under asan
Dec 1 2021, 7:26 AM
herhut closed D114857: [mlir][linalg] Disable tensor-matmul test under asan.
Dec 1 2021, 7:25 AM · Restricted Project
herhut added a comment to D114857: [mlir][linalg] Disable tensor-matmul test under asan.

I assume that would be @nicolasvasilache as I suspect this is a matmul bufferization issue.

Dec 1 2021, 7:25 AM · Restricted Project
herhut added a comment to D114857: [mlir][linalg] Disable tensor-matmul test under asan.

Thanks @mehdi_amini ! That is much easier.

Dec 1 2021, 4:15 AM · Restricted Project
herhut updated the diff for D114857: [mlir][linalg] Disable tensor-matmul test under asan.

Use in-test tag as suggested.

Dec 1 2021, 4:14 AM · Restricted Project
herhut requested review of D114857: [mlir][linalg] Disable tensor-matmul test under asan.
Dec 1 2021, 1:57 AM · Restricted Project

Nov 30 2021

herhut accepted D114384: Fix expand folder to avoid folding memref cast.
Nov 30 2021, 9:25 AM · Restricted Project
herhut added a comment to D114384: Fix expand folder to avoid folding memref cast.

This was recently fixed in https://reviews.llvm.org/D114391. If you rebase, you should pick up that change.

Nov 30 2021, 9:24 AM · Restricted Project

Nov 29 2021

herhut accepted D114233: [mlir] Decompose Bufferization Clone operation into Memref Alloc and Copy..

Please sort the headers, otherwise looks good. Thanks!

Nov 29 2021, 6:50 AM · Restricted Project
herhut committed rG95f34e318c46: [mlir][memref] Fix bug in verification of memref.collapse_shape (authored by herhut).
[mlir][memref] Fix bug in verification of memref.collapse_shape
Nov 29 2021, 6:48 AM
herhut closed D114702: [mlir][memref] Fix bug in verification of memref.collapse_shape.
Nov 29 2021, 6:47 AM · Restricted Project
herhut added reviewers for D114702: [mlir][memref] Fix bug in verification of memref.collapse_shape: bkramer, pifon2a, nicolasvasilache.
Nov 29 2021, 5:41 AM · Restricted Project
herhut requested review of D114702: [mlir][memref] Fix bug in verification of memref.collapse_shape.
Nov 29 2021, 5:40 AM · Restricted Project
herhut requested changes to D114233: [mlir] Decompose Bufferization Clone operation into Memref Alloc and Copy..
Nov 29 2021, 1:12 AM · Restricted Project

Nov 25 2021

herhut accepted D114552: [mlir] Move memref.[tensor_load|buffer_cast|clone] to "bufferization" dialect..

Thank you for cleaning this up. Just some nits and please address the comments others already had.

Nov 25 2021, 12:39 AM · Restricted Project

Nov 24 2021

herhut accepted D114500: [MLIR] [docs] Fix misguided examples in memref.subview operation..

Thanks for the clarification.

Nov 24 2021, 4:16 AM · Restricted Project

Nov 22 2021

herhut accepted D114147: [mlir] Move AllocationOpInterface to Bufferize/IR/AllocationOpInterface.td..

Just minor nits. Thank you!

Nov 22 2021, 1:57 AM · Restricted Project
herhut requested changes to D114233: [mlir] Decompose Bufferization Clone operation into Memref Alloc and Copy..
Nov 22 2021, 1:34 AM · Restricted Project
herhut added inline comments to D114233: [mlir] Decompose Bufferization Clone operation into Memref Alloc and Copy..
Nov 22 2021, 1:34 AM · Restricted Project

Nov 11 2021

herhut committed rGb241226aec1b: [mlir][linalg] Avoid illegal elementwise fusion into reductions (authored by herhut).
[mlir][linalg] Avoid illegal elementwise fusion into reductions
Nov 11 2021, 6:56 AM
herhut closed D113500: [mlir][linalg] Avoid illegal elementwise fusion into reductions.
Nov 11 2021, 6:56 AM · Restricted Project
herhut updated the diff for D113500: [mlir][linalg] Avoid illegal elementwise fusion into reductions.

Add comment in test

Nov 11 2021, 6:54 AM · Restricted Project
herhut added inline comments to D113500: [mlir][linalg] Avoid illegal elementwise fusion into reductions.
Nov 11 2021, 2:40 AM · Restricted Project
herhut updated the diff for D113500: [mlir][linalg] Avoid illegal elementwise fusion into reductions.

Fix test

Nov 11 2021, 2:40 AM · Restricted Project

Nov 10 2021

herhut accepted D113383: [mlir][nvvm] Remove special case ptr arithmetic lowering in gpu to nvvm.

Thanks for the explanation.

Nov 10 2021, 9:27 AM · Restricted Project
herhut added inline comments to D113383: [mlir][nvvm] Remove special case ptr arithmetic lowering in gpu to nvvm.
Nov 10 2021, 7:48 AM · Restricted Project
herhut committed rGc0cad9d535e3: [mlir][linalg] Enable insertion of dealloc for end2end tests (authored by herhut).
[mlir][linalg] Enable insertion of dealloc for end2end tests
Nov 10 2021, 12:51 AM
herhut closed D111059: [mlir][linalg] Enable insertion of dealloc for end2end tests.
Nov 10 2021, 12:51 AM · Restricted Project

Nov 9 2021

herhut requested review of D113500: [mlir][linalg] Avoid illegal elementwise fusion into reductions.
Nov 9 2021, 10:51 AM · Restricted Project

Oct 5 2021

herhut accepted D110459: [MLIR] Improve calling convention for unranked memory descriptor results..

Regarding @mehdi_amini comment: I agree that this adds another dimension to the ABI with C but unranked results already have a fairly complex calling convention and I don't think this makes it worse. If there are strong concerns that this will get out of sync, we could hard-wire this to a fixed rank to start with, which would prevent that issue.

Oct 5 2021, 1:33 AM · Restricted Project

Oct 4 2021

herhut added a reviewer for D111059: [mlir][linalg] Enable insertion of dealloc for end2end tests: mehdi_amini.

@mehdi_amini not sure how to test this. Do the builders do this automatically?

Oct 4 2021, 7:54 AM · Restricted Project
herhut requested review of D111059: [mlir][linalg] Enable insertion of dealloc for end2end tests.
Oct 4 2021, 7:52 AM · Restricted Project

Sep 21 2021

herhut accepted D110136: [MLIR] NFC. gpu.launch op argument const folder cleanup.

Thanks!

Sep 21 2021, 1:58 AM · Restricted Project
herhut added a comment to D109994: [MLIR][GPU] Add constant propagator for gpu.launch op.

Nice, thanks! I just have a nit about the comment. In case you touch this again anyway.

Sep 21 2021, 1:27 AM · Restricted Project

Sep 14 2021

herhut accepted D109350: [mlir] Added new AllocationOpInterface and adapted BufferDeallocation pass to use the new interface..

Looks good to me. Please also wait for @rriddle.

Sep 14 2021, 4:35 AM · Restricted Project

Sep 13 2021

herhut accepted D109640: [mlir][linalg] TiledLoopOp peeling: Do not peel partial iterations.

Thanks, just a nit.

Sep 13 2021, 1:36 AM · Restricted Project

Sep 10 2021

herhut committed rG5e6c170b3f41: [mlir][linalg] Fix bufferize pattern to allow unknown operations in body of… (authored by herhut).
[mlir][linalg] Fix bufferize pattern to allow unknown operations in body of…
Sep 10 2021, 4:38 AM
herhut closed D109581: [mlir][linalg] Fix bufferize pattern to allow unknown operations in body of generic.
Sep 10 2021, 4:38 AM · Restricted Project
herhut updated the diff for D109581: [mlir][linalg] Fix bufferize pattern to allow unknown operations in body of generic.

clang tidy fix

Sep 10 2021, 3:58 AM · Restricted Project
herhut updated the diff for D109581: [mlir][linalg] Fix bufferize pattern to allow unknown operations in body of generic.

also support linalg ops with hidden regions like dot.

Sep 10 2021, 2:52 AM · Restricted Project
herhut added a reviewer for D109581: [mlir][linalg] Fix bufferize pattern to allow unknown operations in body of generic: pifon2a.

Note that this is already tested by existing tests that use the math dialect.

Sep 10 2021, 1:35 AM · Restricted Project
herhut requested review of D109581: [mlir][linalg] Fix bufferize pattern to allow unknown operations in body of generic.
Sep 10 2021, 1:34 AM · Restricted Project

Sep 8 2021

herhut updated subscribers of D109430: [mlir][scf] Fold dim(scf.for) to dim(iter_arg).
bool haveSameTypes(unsigned operandIdx, resultIdx);
Sep 8 2021, 7:57 AM · Restricted Project
herhut requested changes to D109410: [MLIR] Avoid adding extra memref::AllocOp in bufferize pass..

This change is not correct in general I believe.

Sep 8 2021, 7:31 AM · Restricted Project
herhut accepted D109430: [mlir][scf] Fold dim(scf.for) to dim(iter_arg).

This is adding a specialized pattern that implements the shape reification interface + rewrite based on it. My first hunch was that this should then also be in a pass and not a canonicalization. However, I think control flow is different than compute ops in that regard, so I came to the conclusion that it makes sense to have this as a pattern.

Sep 8 2021, 4:00 AM · Restricted Project

Sep 7 2021

herhut added inline comments to D109350: [mlir] Added new AllocationOpInterface and adapted BufferDeallocation pass to use the new interface..
Sep 7 2021, 7:46 AM · Restricted Project

Sep 6 2021

herhut accepted D108270: [mlir][linalg] linalg.tiled_loop peeling.

Thanks!

Sep 6 2021, 4:48 AM · Restricted Project

Aug 30 2021

herhut accepted D108892: folds memref.dim(gpu.alloc(%size), %idx) -> %size.

Thanks, @herhut for you suggestion. I added this check, hoverer appropriate test for this feature didn't come up to my mind. Do you have any ideas?

Aug 30 2021, 9:17 AM · Restricted Project
herhut added inline comments to D108892: folds memref.dim(gpu.alloc(%size), %idx) -> %size.
Aug 30 2021, 7:57 AM · Restricted Project

Aug 26 2021

herhut accepted D107548: [mlir] create gpu memset op.

Thanks!

Aug 26 2021, 2:34 AM · Restricted Project
herhut accepted D108684: [MLIR][GPU] Drop mgpuMemHostRegisterMemRef's dependence on LLVM Support.

Thanks, makes sense to keep the runtime as self contained as possible. Should this also reflect in cmake somewhere?

Aug 26 2021, 2:29 AM · Restricted Project