Page MenuHomePhabricator

herhut (Stephan Herhut)
Animal

Projects

User does not belong to any projects.

User Details

User Since
Jan 7 2020, 7:38 AM (54 w, 6 d)

Recent Activity

Today

herhut added reviewers for D95330: [MLIR][GPU][NVVM] Add warp synchronous matrix-multiply accumulate ops: ThomasRaoux, csigg.

Adding Thomas and Christian to see whether they have comments wrt. the GPU operations.

Mon, Jan 25, 5:30 AM · Restricted Project
herhut accepted D94495: [mlir] Set CUDA/ROCm context before creating resources..

Thanks for cleaning this up.

Mon, Jan 25, 12:53 AM · Restricted Project

Thu, Jan 21

herhut accepted D95130: Add log1p lowering from standard to NVVM intrinsics.
Thu, Jan 21, 4:59 AM · Restricted Project
herhut accepted D95129: Add log1p lowering from standard to ROCDL intrinsics.

Thanks!

Thu, Jan 21, 4:58 AM · Restricted Project
herhut added a comment to D95041: [MLIR][Standard] Add log1p operation to std.

Since the split of the standard dialect has begun, can you create a math dialect and move this kind of operations there?

Thu, Jan 21, 3:47 AM · Restricted Project
herhut added a comment to D94495: [mlir] Set CUDA/ROCm context before creating resources..

Hmm, this turned out more complex than I had thought. I had a simple push/pop in mind. If that is not enough, lets keep it at the simple version for now.

Thu, Jan 21, 3:17 AM · Restricted Project

Wed, Jan 20

herhut added a comment to D94662: [mlir] Remove over specified memory effects.

Thanks for cleaning this up!

Wed, Jan 20, 9:04 AM · Restricted Project
herhut added inline comments to D94495: [mlir] Set CUDA/ROCm context before creating resources..
Wed, Jan 20, 8:54 AM · Restricted Project
herhut accepted D94421: [mlir] Add gpu async integration test..

Thanks for the explanations!

Wed, Jan 20, 8:51 AM · Restricted Project
herhut accepted D94586: Added check if there are regions that do not implement the RegionBranchOpInterface..

Please fix comments.

Wed, Jan 20, 2:32 AM · Restricted Project

Tue, Jan 19

herhut accepted D94911: [mlir] Add `complex.abs`, `complex.div` and `complex.mul` to ComplexOps..

Thanks!

Tue, Jan 19, 2:25 AM · Restricted Project
herhut accepted D94399: [mlir] Link mlir_runner_utils statically into cuda/rocm-runtime-wrappers..

This still seems a bit like a hack to me but it is better than twiddling with runtime paths.

Tue, Jan 19, 1:24 AM · Restricted Project
herhut added a comment to D94911: [mlir] Add `complex.abs`, `complex.div` and `complex.mul` to ComplexOps..

Thanks for adding these. Beyond coding style this looks great!

Tue, Jan 19, 1:21 AM · Restricted Project

Mon, Jan 18

herhut added a comment to D94832: [mlir] Add a new builtin `unrealized_conversion_cast` operation.

I don't mind adding this generic default cast but I hope dialect conversion will remain configurable as to which cast is being used.

Mon, Jan 18, 12:47 AM · Restricted Project
herhut added a comment to D94831: [mlir] Add an interface for Cast-Like operations.

Nice cleanup, thanks!

Mon, Jan 18, 12:31 AM · Restricted Project

Fri, Jan 15

herhut added inline comments to D94421: [mlir] Add gpu async integration test..
Fri, Jan 15, 7:20 AM · Restricted Project
herhut added inline comments to D94495: [mlir] Set CUDA/ROCm context before creating resources..
Fri, Jan 15, 7:11 AM · Restricted Project
herhut accepted D94764: [mlir] Add Complex dialect..

This also adds the lowering to LLVM. Maybe mention this in the commit message or split it out.

Fri, Jan 15, 7:08 AM · Restricted Project
herhut committed rG061d1520858a: [SVE] Fix unused variable. (authored by herhut).
[SVE] Fix unused variable.
Fri, Jan 15, 6:11 AM
herhut closed D94773: [SVE] Fix unused variable..
Fri, Jan 15, 6:11 AM · Restricted Project
herhut requested review of D94773: [SVE] Fix unused variable..
Fri, Jan 15, 6:09 AM · Restricted Project
herhut added inline comments to D94586: Added check if there are regions that do not implement the RegionBranchOpInterface..
Fri, Jan 15, 3:38 AM · Restricted Project

Tue, Jan 12

herhut added a comment to D94351: [mlir][docs] Bring bufferization docs up to date..

Could you wordwrap this to make it easier to read?

Tue, Jan 12, 7:41 AM · Restricted Project

Mon, Jan 11

herhut committed rG2e17d9c0ee7a: [ARM] Add uses for locals introduced for debug messages. NFC. (authored by herhut).
[ARM] Add uses for locals introduced for debug messages. NFC.
Mon, Jan 11, 5:28 AM
herhut closed D94398: [ARM] Add uses for locals introduced for debug messages. NFC..
Mon, Jan 11, 5:28 AM · Restricted Project
herhut requested review of D94398: [ARM] Add uses for locals introduced for debug messages. NFC..
Mon, Jan 11, 3:32 AM · Restricted Project

Thu, Jan 7

herhut added a comment to D94220: [mlir] NFC: fix trivial typos.

Thanks for fixing these. Just some remarks while looking through the changes.

Thu, Jan 7, 3:59 AM · Restricted Project

Tue, Jan 5

herhut accepted D93996: Nit: fix spacing.
Tue, Jan 5, 12:55 AM · Restricted Project
herhut accepted D93982: Remove allow-unregistered-dialect from some tests that don't need it.

Thanks.

Tue, Jan 5, 12:54 AM · Restricted Project

Dec 23 2020

herhut accepted D93752: [mlir] Rename ConvertToLLVMPattern::isSupportedMemRefType() to isConvertibleAndHasIdentityMaps()..

Thank you! Big improvement in naming.

Dec 23 2020, 2:30 AM · Restricted Project
herhut accepted D93555: [mlir] Modernize std-to-llvm operation conversion doc.

Thanks for cleaning this up!

Dec 23 2020, 2:09 AM · Restricted Project

Dec 22 2020

herhut accepted D93197: [mlir] Add gpu.memcpy op..
Dec 22 2020, 2:18 AM · Restricted Project
herhut accepted D93204: [mlir] Lower gpu.memcpy to GPU runtime calls..
Dec 22 2020, 2:16 AM · Restricted Project

Dec 21 2020

herhut added inline comments to D93204: [mlir] Lower gpu.memcpy to GPU runtime calls..
Dec 21 2020, 6:57 AM · Restricted Project
herhut added inline comments to D93197: [mlir] Add gpu.memcpy op..
Dec 21 2020, 6:50 AM · Restricted Project

Dec 16 2020

herhut added inline comments to D93357: [mlir] Move `std.tensor_cast` -> `tensor.cast`..
Dec 16 2020, 12:38 AM · Restricted Project
herhut abandoned D91967: [mlir][std] Mark tensor_to_memref as no side-effect.

So, to conclude here, it seems to me the best way forward is to move this dialect conversion ops to their own dialect and make it clear that they are essentially cast operations between tensor and memref for the purpose of conversion. This is a discussion for discourse, though.

Dec 16 2020, 12:31 AM · Restricted Project
herhut accepted D93126: [mlir] Lookup the latest value with a legal type when remapping values..

Thanks!

Dec 16 2020, 12:29 AM · Restricted Project

Dec 15 2020

herhut added a comment to D92562: [MLIR] Refactored BufferDeallocation pass to enable support for individual alloc/clone/free operations..

The issue with free can be solved by first inserting frees and then rewriting them, which is what we would do today. The issue with copy is more complex, as it currently does not introduce a single operation. To enable the latter, we have discussed to always insert a copy operation and then users can rewrite them at will. I think there is a forthcoming post from @dfki-mako about that. The idea essentially would be to have a bufferize dialect, that contains copy, cast and maybe free operations that can have semantics that are tailored to the needs of bufferization.

The current approach assumes that all memrefs that this pass will attempt to free can be freed/cloned by the ops produced by these callbacks. That seems incredibly fragile, considering what you said about bufferization patterns being able to freely choose their allocation operation -- I think that's an incredibly strong argument that we need a more general solution, probably something that rationalizes the invariants needed by this pass with what bufferization patterns are allowed to do. It seems that we would need to require all allocating ops to specify what resource/tag they allocate from so we can know how to free it, and then do some dataflow analysis to propagate that information, and fail BufferDeallocation if we cannot figure out which clone/free is legal to insert.

Dec 15 2020, 8:14 AM · Restricted Project
herhut accepted D93119: [mlir] Add std op for X raised to the power of Y.
Dec 15 2020, 8:02 AM · Restricted Project
herhut added inline comments to D93126: [mlir] Lookup the latest value with a legal type when remapping values..
Dec 15 2020, 6:47 AM · Restricted Project
herhut accepted D76187: Always generate Enums for dialects in add_mlir_dialect().
Dec 15 2020, 1:30 AM · Restricted Project, Restricted Project
herhut accepted D93156: [mlir] Fix for gpu-async-region pass..

lgtm with extra test.

Dec 15 2020, 1:28 AM · Restricted Project
herhut accepted D93262: [mlir] Handle unknown ops in dynamic_tensor_from_elements bufferization.

Thanks!

Dec 15 2020, 1:21 AM · Restricted Project

Dec 14 2020

herhut added a comment to D93156: [mlir] Fix for gpu-async-region pass..

There should be some test that captures this.

Dec 14 2020, 5:25 AM · Restricted Project
herhut requested changes to D93126: [mlir] Lookup the latest value with a legal type when remapping values..
Dec 14 2020, 1:25 AM · Restricted Project

Dec 10 2020

herhut added a comment to D92562: [MLIR] Refactored BufferDeallocation pass to enable support for individual alloc/clone/free operations..

Having this customizable with a callback will allow users to potentially start doing all sorts of random stuff inside. What if a user starts depending on that? For example, what if the callback references some side data structure and generates different clone/free ops depending on that, possibly in a less structured way than we would like to support upstream. That suddenly becomes much more difficult to unwind. Of course, implementing that callback is likely to be done in a downstream project, where doing something like this as a shortcut might seem more acceptable. But that shortcut then becomes a cost that the MLIR community needs to pay to unwind!

Dec 10 2020, 1:13 AM · Restricted Project

Dec 9 2020

herhut added a comment to D92562: [MLIR] Refactored BufferDeallocation pass to enable support for individual alloc/clone/free operations..

First, the work @silvas did on improving how bufferization works in MLIR core brought a great cleanup with it and the outcome is much nicer than what we had before. Thank you for investing your time and thought on it. A lot of what got cleaned up had to do with how operations get bufferized and how we can do this partially and incrementally, a functionality that we did not have before and that we are already heavily using now. Awesome!

Dec 9 2020, 12:18 PM · Restricted Project
herhut added a comment to D92927: [mlir][Shape] Make sure tensor_cast(constant_shape) folding uses the correct type.

This seems to do the right thing, I just don't understand why.

Dec 9 2020, 7:10 AM · Restricted Project
herhut added a comment to D92921: Add sqrt lowering from standard to ROCDL.

Can you add a test?

Dec 9 2020, 1:52 AM · Restricted Project

Dec 8 2020

herhut added inline comments to D92843: [mlir][Shape] Canonicalize assume_all with one input and tensor_cast of constant_shape.
Dec 8 2020, 8:16 AM · Restricted Project

Dec 4 2020

herhut added a comment to D92562: [MLIR] Refactored BufferDeallocation pass to enable support for individual alloc/clone/free operations..

I disagree with @silvas on this. This particular change does not take any opinion on the discussion you reference. It merely makes the hard-wired current behavior configurable by choosing different ops. It does not mandate how the decision which free operation to use is done.

Dec 4 2020, 3:17 AM · Restricted Project

Dec 3 2020

herhut added inline comments to D92555: mlir-nvidia: added -DBUILD_SHARED_LIBS=ON.
Dec 3 2020, 1:33 AM
herhut accepted D92552: Fix forward for rGd9adde5ae216: adding missing dependency..
Dec 3 2020, 1:11 AM · Restricted Project

Dec 2 2020

herhut accepted D90346: [mlir][gpu] Move gpu.wait ops from async.execute regions to its dependencies..

Thanks!

Dec 2 2020, 1:15 AM · Restricted Project
herhut accepted D91969: [MLIR] Added support for dynamic shaped allocas to promote-buffers-to-stack pass..
Dec 2 2020, 1:12 AM · Restricted Project

Dec 1 2020

herhut added a comment to D90346: [mlir][gpu] Move gpu.wait ops from async.execute regions to its dependencies..

Thanks, much clearer now. I am confused a bit by the types that get used but otherwise this looks great.

Dec 1 2020, 9:55 AM · Restricted Project

Nov 30 2020

herhut added inline comments to D91969: [MLIR] Added support for dynamic shaped allocas to promote-buffers-to-stack pass..
Nov 30 2020, 2:14 AM · Restricted Project

Nov 27 2020

herhut accepted D92111: [mlir] Change ConvertOpToLLVMPattern::matchAndRewrite argument to concrete operand type..

Cleaning this up in a follow-on is fine too. Please let @ftynse comment, too.

Nov 27 2020, 1:04 AM · Restricted Project

Nov 26 2020

herhut committed rG20c926e0797e: [mlir][DialectConversion] Do not prematurely drop unused cast operations (authored by herhut).
[mlir][DialectConversion] Do not prematurely drop unused cast operations
Nov 26 2020, 8:39 AM
herhut closed D92184: [mlir][DialectConversion] Do not prematurely drop unused cast operations.
Nov 26 2020, 8:39 AM · Restricted Project
herhut updated the diff for D92184: [mlir][DialectConversion] Do not prematurely drop unused cast operations.

Fix test

Nov 26 2020, 8:38 AM · Restricted Project
herhut added reviewers for D92184: [mlir][DialectConversion] Do not prematurely drop unused cast operations: bkramer, rriddle.

PTAL. This fixes a use after free.

Nov 26 2020, 8:12 AM · Restricted Project
herhut requested review of D92184: [mlir][DialectConversion] Do not prematurely drop unused cast operations.
Nov 26 2020, 8:11 AM · Restricted Project
herhut added inline comments to D90346: [mlir][gpu] Move gpu.wait ops from async.execute regions to its dependencies..
Nov 26 2020, 7:02 AM · Restricted Project
herhut committed rG87568c07f052: [mlir][linalg] Mark linalg.yield as ReturnLike (authored by herhut).
[mlir][linalg] Mark linalg.yield as ReturnLike
Nov 26 2020, 5:44 AM
herhut closed D92173: [mlir][linalg] Mark linalg.yield as ReturnLike.
Nov 26 2020, 5:44 AM · Restricted Project
herhut updated the diff for D92173: [mlir][linalg] Mark linalg.yield as ReturnLike.

Clean up test invocation

Nov 26 2020, 5:41 AM · Restricted Project
herhut requested review of D92173: [mlir][linalg] Mark linalg.yield as ReturnLike.
Nov 26 2020, 5:29 AM · Restricted Project
herhut accepted D91698: [mlir] Add gpu.allocate, gpu.deallocate ops with LLVM lowering to runtime function calls..
Nov 26 2020, 5:04 AM · Restricted Project
herhut committed rG4dd5f79f0702: [mlir][bufferize] Add argument materialization for bufferization (authored by herhut).
[mlir][bufferize] Add argument materialization for bufferization
Nov 26 2020, 4:45 AM
herhut closed D92032: [mlir][bufferize] Add argument materialization for bufferization.
Nov 26 2020, 4:44 AM · Restricted Project
herhut added a comment to D92032: [mlir][bufferize] Add argument materialization for bufferization.

I realized that we cannot rewrite all ReturnLike operations, as they require rewriting of their parent which cannot be done generically. PTAL the changes.

Nov 26 2020, 4:27 AM · Restricted Project
herhut updated the diff for D92032: [mlir][bufferize] Add argument materialization for bufferization.

Do not rewrite ReturnLike ops in general.

Nov 26 2020, 4:26 AM · Restricted Project
herhut added inline comments to D92032: [mlir][bufferize] Add argument materialization for bufferization.
Nov 26 2020, 3:16 AM · Restricted Project
herhut added a comment to D92032: [mlir][bufferize] Add argument materialization for bufferization.

Thanks for the reviews!

Nov 26 2020, 3:02 AM · Restricted Project
herhut updated the diff for D92032: [mlir][bufferize] Add argument materialization for bufferization.

Comments

Nov 26 2020, 3:00 AM · Restricted Project
herhut added a comment to D92111: [mlir] Change ConvertOpToLLVMPattern::matchAndRewrite argument to concrete operand type..

Thank you for cleaning this up. I was not aware that the llvm conversion does not have Op specific patterns, yet.

Nov 26 2020, 2:29 AM · Restricted Project
herhut added a reviewer for D92032: [mlir][bufferize] Add argument materialization for bufferization: frgossen.

Frederik, can you take a look? Sean was happy for this to move forward with his comments addressed, which I did.

Nov 26 2020, 1:52 AM · Restricted Project
herhut updated the diff for D92032: [mlir][bufferize] Add argument materialization for bufferization.

Split out finalizing pass.

Nov 26 2020, 1:39 AM · Restricted Project

Nov 25 2020

herhut added a comment to D92032: [mlir][bufferize] Add argument materialization for bufferization.

PTAL.

Nov 25 2020, 10:31 AM · Restricted Project
herhut updated the diff for D92032: [mlir][bufferize] Add argument materialization for bufferization.

Rework to support terminators that implement interfaces.

Nov 25 2020, 10:24 AM · Restricted Project
herhut added inline comments to D91672: Add a shape function library op.
Nov 25 2020, 8:23 AM · Restricted Project
herhut added a comment to D91969: [MLIR] Added support for dynamic shaped allocas to promote-buffers-to-stack pass..

Thanks. Just some nits.

Nov 25 2020, 1:11 AM · Restricted Project

Nov 24 2020

herhut added a reviewer for D92032: [mlir][bufferize] Add argument materialization for bufferization: silvas.
Nov 24 2020, 6:59 AM · Restricted Project
herhut requested review of D92032: [mlir][bufferize] Add argument materialization for bufferization.
Nov 24 2020, 6:57 AM · Restricted Project
herhut accepted D91672: Add a shape function library op.

I am fine either way, just a suggestion.

Nov 24 2020, 2:15 AM · Restricted Project
herhut added a comment to D91967: [mlir][std] Mark tensor_to_memref as no side-effect.

I assumed these operations are in the same category as the LLVM::DialectCastOp (also known as llvm.mlir.cast). There it says

Nov 24 2020, 1:57 AM · Restricted Project

Nov 23 2020

herhut added a reviewer for D91967: [mlir][std] Mark tensor_to_memref as no side-effect: silvas.
Nov 23 2020, 7:38 AM · Restricted Project
herhut requested review of D91967: [mlir][std] Mark tensor_to_memref as no side-effect.
Nov 23 2020, 7:37 AM · Restricted Project
herhut accepted D91070: [mlir] Add print functions for i64, index..
Nov 23 2020, 7:18 AM · Restricted Project
herhut requested changes to D91698: [mlir] Add gpu.allocate, gpu.deallocate ops with LLVM lowering to runtime function calls..
Nov 23 2020, 6:36 AM · Restricted Project
herhut accepted D91955: [mlir] Avoid cloning ops in SCF parallel conversion to CFG.

Thank you!

Nov 23 2020, 4:51 AM · Restricted Project

Nov 20 2020

herhut accepted D91865: [mlir] add canonicalization patterns for trivial SCF 'for' and 'if'.

Nice, thanks!

Nov 20 2020, 6:49 AM · Restricted Project
herhut committed rGa89e55ca572e: [mlir][std] Canonicalize a dim(memref_reshape) into a load from the shape… (authored by herhut).
[mlir][std] Canonicalize a dim(memref_reshape) into a load from the shape…
Nov 20 2020, 5:03 AM
herhut closed D91854: [mlir][std] Canonicalize a dim(memref_reshape) into a load from the shape operand.
Nov 20 2020, 5:03 AM · Restricted Project
herhut committed rG6af81ea1d6d3: [mlir][std] Fold load(tensor_to_memref) into extract_element (authored by herhut).
[mlir][std] Fold load(tensor_to_memref) into extract_element
Nov 20 2020, 4:42 AM
herhut closed D91855: [mlir][std] Fold load(tensor_to_memref) into extract_element.
Nov 20 2020, 4:42 AM · Restricted Project
herhut added a comment to D91855: [mlir][std] Fold load(tensor_to_memref) into extract_element.

Thanks for the reviews!

Nov 20 2020, 4:30 AM · Restricted Project
herhut updated the diff for D91855: [mlir][std] Fold load(tensor_to_memref) into extract_element.

Comments

Nov 20 2020, 4:29 AM · Restricted Project