Page MenuHomePhabricator

mikeurbach (Mike Urbach)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 16 2020, 10:22 AM (63 w, 4 d)

Recent Activity

Oct 13 2021

mikeurbach accepted D111513: [mlir] Allow out-of-tree python building from installed MLIR..
Oct 13 2021, 10:27 PM · Restricted Project

Oct 12 2021

mikeurbach added inline comments to D111513: [mlir] Allow out-of-tree python building from installed MLIR..
Oct 12 2021, 9:44 AM · Restricted Project
mikeurbach committed rG55e76c70a4f7: [mlir] Limit Python dependency to Development.Module when possible. (authored by mikeurbach).
[mlir] Limit Python dependency to Development.Module when possible.
Oct 12 2021, 8:31 AM
mikeurbach closed D111585: [mlir] Limit Python dependency to Development.Module when possible..
Oct 12 2021, 8:31 AM · Restricted Project
mikeurbach updated the diff for D111585: [mlir] Limit Python dependency to Development.Module when possible..

Update commit message.

Oct 12 2021, 8:10 AM · Restricted Project

Oct 11 2021

mikeurbach added inline comments to D111585: [mlir] Limit Python dependency to Development.Module when possible..
Oct 11 2021, 10:59 PM · Restricted Project
mikeurbach updated the diff for D111585: [mlir] Limit Python dependency to Development.Module when possible..

Get rid of MLIR_BINDINGS_PYTHON_LOCK_VERSION and take add_mlir_python_extension from https://reviews.llvm.org/D111513.

Oct 11 2021, 10:58 PM · Restricted Project
mikeurbach added inline comments to D111513: [mlir] Allow out-of-tree python building from installed MLIR..
Oct 11 2021, 10:55 PM · Restricted Project
mikeurbach added inline comments to D111513: [mlir] Allow out-of-tree python building from installed MLIR..
Oct 11 2021, 10:43 PM · Restricted Project
mikeurbach added inline comments to D111585: [mlir] Limit Python dependency to Development.Module when possible..
Oct 11 2021, 6:18 PM · Restricted Project
mikeurbach added a comment to D111585: [mlir] Limit Python dependency to Development.Module when possible..

Take two. I tested this one locally and I think it should work. Do the buildbots run after commit to main or is there anywhere I can check before committing?

Oct 11 2021, 4:35 PM · Restricted Project
mikeurbach requested review of D111585: [mlir] Limit Python dependency to Development.Module when possible..
Oct 11 2021, 4:32 PM · Restricted Project

Oct 7 2021

mikeurbach added a comment to D111383: [mlir] Limit Python dependency to Development.Module when possible..

Thanks Mehdi. I will take a look at that. We also had some issues downstream so I was planning to revert but you beat me to it.

Oct 7 2021, 10:56 PM · Restricted Project
mikeurbach committed rG7aebdfc4fcc4: [mlir] Limit Python dependency to Development.Module when possible. (authored by mikeurbach).
[mlir] Limit Python dependency to Development.Module when possible.
Oct 7 2021, 10:06 PM
mikeurbach closed D111383: [mlir] Limit Python dependency to Development.Module when possible..
Oct 7 2021, 10:06 PM · Restricted Project
mikeurbach added a comment to D111383: [mlir] Limit Python dependency to Development.Module when possible..

We should propagate this to downstreams (at least a couple of which already require this version of cmake and don't need the conditional).

Oct 7 2021, 9:46 PM · Restricted Project
mikeurbach requested review of D111383: [mlir] Limit Python dependency to Development.Module when possible..
Oct 7 2021, 9:36 PM · Restricted Project

Jul 29 2021

mikeurbach accepted D107113: [MLIR][python] Disable SONAME on extensions..
Jul 29 2021, 3:35 PM · Restricted Project
mikeurbach accepted D107100: [MLIR][Python] Use DEST_PREFIX when installing..
Jul 29 2021, 3:10 PM · Restricted Project
mikeurbach accepted D107090: [MLIR][python] Export CAPI headers..

Makes sense to me.

Jul 29 2021, 11:03 AM · Restricted Project

Jul 28 2021

mikeurbach accepted D106992: Break apart the MLIR ExecutionEngine from core python module..
Jul 28 2021, 1:13 PM · Restricted Project

Jul 27 2021

mikeurbach accepted D106520: Re-engineer MLIR python build support..

This has been working out of the box for the CIRCT project. No more TypeID suprises, etc. Thanks Stella, this is super nice!

Jul 27 2021, 6:54 AM · Restricted Project

Jul 22 2021

mikeurbach added a comment to D106520: Re-engineer MLIR python build support..

If you'd like to wait until tomorrow, I'll have an npcomp branch staged with changes and you should be able to draft onto those. Probably easier than being the first to apply in a new project.

Jul 22 2021, 5:02 PM · Restricted Project
mikeurbach added a comment to D106520: Re-engineer MLIR python build support..

I've reviewed, and I think I'm understanding what's going on. I don't think I have enough CMake chops to provide serious suggestions/alternatives on the approach, so I'm just going to try it out with CIRCT and see how it goes. Assuming it works and we don't have to work around TypeID issues and whatnot, I'm satisfied!

Jul 22 2021, 3:29 PM · Restricted Project
mikeurbach added a comment to D106520: Re-engineer MLIR python build support..

I haven't reviewed yet, but it's great to see this. I'll dig in today, and I'll help integrate the changes into CIRCT. The CI builds of CIRCT use the github.com/circt/llvm repo, and we can stage this there for testing as needed.

Jul 22 2021, 11:26 AM · Restricted Project

Jul 15 2021

mikeurbach accepted D106106: [MLIR] [Python ODS] Use @builtins.property for cases where 'property' is already defined.

Makes sense to me.

Jul 15 2021, 3:24 PM · Restricted Project

May 10 2021

mikeurbach accepted D102144: [mlir][Python] Upstream the PybindAdaptors.h helpers and use it to implement sparse_tensor.encoding..

Thanks for pulling this upstream. It looks good to me, but I'm just a user, not a pybind expert.

May 10 2021, 8:26 AM · Restricted Project

May 3 2021

mikeurbach accepted D101734: [mlir][Python] Add casting constructor to Type and Attribute..
May 3 2021, 6:18 AM · Restricted Project

Apr 28 2021

mikeurbach added a comment to D101422: [mlir][python] Add `destroy` method to PyOperation..

Thanks for the assistance @stellaraccident and @mehdi_amini!

Apr 28 2021, 6:31 PM · Restricted Project
mikeurbach committed rG49745f87e610: [mlir][python] Add `destroy` method to PyOperation. (authored by mikeurbach).
[mlir][python] Add `destroy` method to PyOperation.
Apr 28 2021, 6:30 PM
mikeurbach closed D101422: [mlir][python] Add `destroy` method to PyOperation..
Apr 28 2021, 6:30 PM · Restricted Project
mikeurbach updated the diff for D101422: [mlir][python] Add `destroy` method to PyOperation..

Add TODO about invalidating children of an erased operation.

Apr 28 2021, 5:50 PM · Restricted Project
mikeurbach added a comment to D101422: [mlir][python] Add `destroy` method to PyOperation..

Oops, I see your comment. I will leave a TODO for now :)

Apr 28 2021, 5:41 PM · Restricted Project
mikeurbach added a comment to D101422: [mlir][python] Add `destroy` method to PyOperation..

Also, when considering trees of operations, it is rather hard to make these kind of mutations 100% memory safe. We had discussed some approaches, but as it stands, if you erase a tree of ops and have a deep reference into the tree you just deleted, you're going to have a bad time. The expensive solution is, prior to erasing, iterate over children recursively, see if they have a corresponding PyOperation and invalidate it. I had toyed with other approaches to optimize that but never implemented them (i.e. if every operation had a monotonically increasing number associated with it, you could do some cheaper things and not run afoul of pointer re-use issues).

Apr 28 2021, 5:40 PM · Restricted Project
mikeurbach updated the diff for D101422: [mlir][python] Add `destroy` method to PyOperation..

Implement Stella's feedback.

Apr 28 2021, 5:32 PM · Restricted Project
mikeurbach added a comment to D101422: [mlir][python] Add `destroy` method to PyOperation..

Thanks @stellaraccident, I had missed that we can use the valid bit for this. I will give it a shot.

Apr 28 2021, 5:15 PM · Restricted Project
mikeurbach added a comment to D101422: [mlir][python] Add `destroy` method to PyOperation..

I've updated the test case to show what I mean. The bottom line is I need to make sure the Python reference is dropped and liveOperations is cleaned out before I can create any more operations. In the test, the addition of Operation.create("custom.op2") would hit the previously linked assertion, unless I added the del op.

Apr 28 2021, 4:59 PM · Restricted Project
mikeurbach updated the diff for D101422: [mlir][python] Add `destroy` method to PyOperation..

Update test case to show previous issue.

Apr 28 2021, 4:59 PM · Restricted Project
mikeurbach added a comment to D101422: [mlir][python] Add `destroy` method to PyOperation..

This simple case works, but the previous concern about having the erased operation's pointer in the live operations map is a real issue. In fact, if I try to create any operations after erasing one, I hit this assertion: https://github.com/llvm/llvm-project/blob/86f291ebb2dfc5a93e1ee83b2d5965dcfa5d8bb1/mlir/lib/Bindings/Python/IRCore.cpp#L805. I haven't dug this far, but I think maybe an implementation detail of MLIR means the same pointer will be re-used on the next operation created? Anyway, it seems we must remove the pointer when erase is called... I am adding a test for this and trying to address it.

Apr 28 2021, 4:33 PM · Restricted Project
mikeurbach added a comment to D101496: [mlir] Move PyConcreteType to header. NFC..

PSA noted. When I mentioned this on discourse, it seemed like this and the previous change for attributes were expansions we could get some mileage out of without totally going off the deep end. Are there immediate linkage concerns with deriving PyConcreteType out of tree, or just the general concerns we have been discussing?

Apr 28 2021, 4:20 PM · Restricted Project
mikeurbach updated the diff for D101422: [mlir][python] Add `destroy` method to PyOperation..

Rename "destroy" to "erase".

Apr 28 2021, 4:10 PM · Restricted Project
mikeurbach added a comment to D101422: [mlir][python] Add `destroy` method to PyOperation..

I did some more digging, and I think my confusion came from when operations are removed from the liveOperations map. This happens in the PyOperation destructor, and only there. When I was testing this before, I found that I was hitting the assertion in the destructor, because I had already called it once and removed the operation! Part of my confusion was how I previously wrote the test. I was checking the live operations map while I still had a Python reference, so the destructor hadn't been called.

Apr 28 2021, 4:08 PM · Restricted Project
mikeurbach updated the diff for D101422: [mlir][python] Add `destroy` method to PyOperation..

Replace call to destructor with call to mlirOperationDestroy.

Apr 28 2021, 3:59 PM · Restricted Project
mikeurbach committed rG6ff74f96fd9e: [mlir][python] Update `PyOpResult.owner` to get the parent object. (authored by mikeurbach).
[mlir][python] Update `PyOpResult.owner` to get the parent object.
Apr 28 2021, 1:40 PM
mikeurbach closed D101416: [mlir][python] Update `PyOpResult.owner` to get the parent object..
Apr 28 2021, 1:40 PM · Restricted Project

Apr 27 2021

mikeurbach added a comment to D101422: [mlir][python] Add `destroy` method to PyOperation..

The backstory is we often need to create cycles in graph regions, and I have been working on something to aid this in Python. Circuit IR often looks like:

Apr 27 2021, 10:00 PM · Restricted Project
mikeurbach added a comment to D101422: [mlir][python] Add `destroy` method to PyOperation..

It isn't clear to me where/how was this assertions hit before?

Apr 27 2021, 7:58 PM · Restricted Project
mikeurbach added a comment to D101422: [mlir][python] Add `destroy` method to PyOperation..

Frankly I'm not sure if this is the best implementation. I do have a use-case where I think an explicit destroy call is needed, and to support that I think I had to make the destructor change. At that point, it seemed like I might as well just call the destructor in the new destroy method, but I'm not sure if that is some sort of anti-pattern.

Apr 27 2021, 7:42 PM · Restricted Project
mikeurbach requested review of D101422: [mlir][python] Add `destroy` method to PyOperation..
Apr 27 2021, 7:39 PM · Restricted Project
mikeurbach updated the diff for D101416: [mlir][python] Update `PyOpResult.owner` to get the parent object..

Rebase main

Apr 27 2021, 7:21 PM · Restricted Project
mikeurbach committed rG63d16d06f5b8: [mlir] Support setting operand values in C and Python APIs. (authored by mikeurbach).
[mlir] Support setting operand values in C and Python APIs.
Apr 27 2021, 7:18 PM
mikeurbach closed D101398: [mlir] Support setting operand values in C and Python APIs..
Apr 27 2021, 7:18 PM · Restricted Project
mikeurbach added a comment to D101090: [MLIR][Python] Add capsule methods for pybind11 to PyValue..

Thanks Stella!

Apr 27 2021, 7:15 PM · Restricted Project
mikeurbach committed rG3f3d1c901d7a: [MLIR][Python] Add capsule methods for pybind11 to PyValue. (authored by mikeurbach).
[MLIR][Python] Add capsule methods for pybind11 to PyValue.
Apr 27 2021, 7:14 PM
mikeurbach closed D101090: [MLIR][Python] Add capsule methods for pybind11 to PyValue..
Apr 27 2021, 7:14 PM · Restricted Project
mikeurbach requested review of D101416: [mlir][python] Update `PyOpResult.owner` to get the parent object..
Apr 27 2021, 5:21 PM · Restricted Project
mikeurbach added a reviewer for D101090: [MLIR][Python] Add capsule methods for pybind11 to PyValue.: mehdi_amini.

@mehdi_amini since you approved https://reviews.llvm.org/D101398, do you mind taking a look at this one as well?

Apr 27 2021, 4:43 PM · Restricted Project
mikeurbach updated the diff for D101090: [MLIR][Python] Add capsule methods for pybind11 to PyValue..

Rebase main

Apr 27 2021, 4:36 PM · Restricted Project
mikeurbach updated the diff for D101398: [mlir] Support setting operand values in C and Python APIs..

Add cleanup code to new C unittest.

Apr 27 2021, 3:37 PM · Restricted Project
mikeurbach updated the diff for D101398: [mlir] Support setting operand values in C and Python APIs..

Add C unittest for operands API

Apr 27 2021, 3:34 PM · Restricted Project
mikeurbach updated subscribers of D101398: [mlir] Support setting operand values in C and Python APIs..

This is something @jdd and I will use in circt, and seemed generally useful upstream in mlir. However, we weren't sure about the addition of mlirOperationSetOperand to the C API. Are there deeper considerations preventing this from being added? Or is it just something that was demand-driven and has yet to be demanded? I've been testing this patch locally with some small programs for about a week and haven't found any issues with setting operands from Python via the proposed C API.

Apr 27 2021, 1:49 PM · Restricted Project
mikeurbach requested review of D101398: [mlir] Support setting operand values in C and Python APIs..
Apr 27 2021, 1:43 PM · Restricted Project
mikeurbach accepted D101075: [mlir] Split out Python bindings entry point into a separate file.

The diff shown by phab confused me at first, but I think this looks good.

Apr 27 2021, 12:47 PM · Restricted Project

Apr 23 2021

mikeurbach updated subscribers of D101090: [MLIR][Python] Add capsule methods for pybind11 to PyValue..

Adding @ftynse for visibility.

Apr 23 2021, 11:05 AM · Restricted Project

Apr 22 2021

mikeurbach added a comment to D101063: [mlir] Move PyConcreteAttribute to header. NFC..

I saw this, and agree this is great. I had the same question as John when I saw it. I've tested a branch of circt that included headers from this directory before, but I wasn't sure if they should move to the normal header directory eventually.

Apr 22 2021, 4:06 PM · Restricted Project
mikeurbach added a comment to D101090: [MLIR][Python] Add capsule methods for pybind11 to PyValue..

This is basically https://reviews.llvm.org/D99927 for Values instead of Operations. I've been testing it downstream in CIRCT. We have use-cases where we'd want a Python API that accepts a Value, or returns a Value, and this seemed to be missing for that.

Apr 22 2021, 10:42 AM · Restricted Project
mikeurbach requested review of D101090: [MLIR][Python] Add capsule methods for pybind11 to PyValue..
Apr 22 2021, 10:36 AM · Restricted Project

Mar 25 2021

mikeurbach accepted D99387: [mlir][python] Add docs for op class extension mechanism..

Looks great, thanks for adding this. I had just one question as I read through this.

Mar 25 2021, 4:48 PM · Restricted Project

Mar 8 2021

mikeurbach added a comment to D98096: [mlir][python] Reorganize MLIR python into namespace packages..

Not sure that I am qualified to accept this revision, but I do approve in general. The points in the summary make sense and sound good to me.

Mar 8 2021, 8:46 PM · Restricted Project

Feb 22 2021

mikeurbach added inline comments to D96271: [MLIR][LinAlg] Start detensoring implementation..
Feb 22 2021, 12:22 PM · Restricted Project

Feb 21 2021

mikeurbach added inline comments to D96271: [MLIR][LinAlg] Start detensoring implementation..
Feb 21 2021, 9:17 PM · Restricted Project

Jan 21 2021

mikeurbach added a comment to D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..

Thanks @rriddle for the iterations on this. Looking forward to using this in CIRCT with our FunctionLike ops.

Jan 21 2021, 5:37 PM · Restricted Project
mikeurbach committed rG0a7a1ac73d09: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops. (authored by mikeurbach).
[mlir] Support FuncOpSignatureConversion for more FunctionLike ops.
Jan 21 2021, 5:35 PM
mikeurbach closed D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..
Jan 21 2021, 5:35 PM · Restricted Project
mikeurbach updated the diff for D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..

Add note that the new functionality only supports FunctionLike ops that use FunctionType for their signature.

Jan 21 2021, 3:46 PM · Restricted Project

Jan 20 2021

mikeurbach updated the diff for D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..

Fix typo in commit message.

Jan 20 2021, 9:15 PM · Restricted Project
mikeurbach updated the diff for D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..

Update title and description to match commit message.

Jan 20 2021, 9:14 PM · Restricted Project
mikeurbach updated the diff for D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..

Clean up the diff a bit.

Jan 20 2021, 9:07 PM · Restricted Project
mikeurbach updated the diff for D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..

Updates after most recent feedback.

Jan 20 2021, 8:59 PM · Restricted Project
mikeurbach added inline comments to D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..
Jan 20 2021, 6:27 PM · Restricted Project
mikeurbach added inline comments to D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..
Jan 20 2021, 6:03 PM · Restricted Project
mikeurbach added inline comments to D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..
Jan 20 2021, 4:35 PM · Restricted Project
mikeurbach added inline comments to D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..
Jan 20 2021, 4:32 PM · Restricted Project
mikeurbach updated the diff for D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..

Remove unused include.

Jan 20 2021, 4:20 PM · Restricted Project
mikeurbach updated the diff for D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..

Update revision description to match commit message.

Jan 20 2021, 4:18 PM · Restricted Project
mikeurbach updated the diff for D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..

Switch to parameterizing the pattern by op type.

Jan 20 2021, 4:17 PM · Restricted Project

Jan 19 2021

mikeurbach added a comment to D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..

This is the patch discussed with @silvas in https://llvm.discourse.group/t/bufferization-framework-replacement/2446/7. I proceeded here along the same lines as when I wanted to generalize the eraseArguments and eraseResults helpers from FuncOp to FunctionLike, but perhaps there is a better way to achieve this. CC'ing @rriddle and @ftynse who had helpful feedback when I was working on FunctionSupport.h before.

Jan 19 2021, 9:47 PM · Restricted Project
mikeurbach updated the diff for D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..

Remove unrelated change.

Jan 19 2021, 9:42 PM · Restricted Project
mikeurbach requested review of D95021: [mlir] Support FuncOpSignatureConversion for more FunctionLike ops..
Jan 19 2021, 9:40 PM · Restricted Project

Nov 3 2020

mikeurbach abandoned D90076: [MLIR] Move eraseArguments helper from FuncOp to FunctionLike.

This revision was superseded by https://reviews.llvm.org/D90363.

Nov 3 2020, 4:04 PM · Restricted Project
mikeurbach committed rG2e36e0dad52b: [MLIR] Move eraseArguments and eraseResults to FunctionLike (authored by mikeurbach).
[MLIR] Move eraseArguments and eraseResults to FunctionLike
Nov 3 2020, 3:54 PM
mikeurbach closed D90363: [MLIR] Move eraseArguments and eraseResults to FunctionLike.
Nov 3 2020, 3:54 PM · Restricted Project
mikeurbach updated the diff for D90363: [MLIR] Move eraseArguments and eraseResults to FunctionLike.

Updates after review.

Nov 3 2020, 3:16 PM · Restricted Project
mikeurbach added a comment to D90363: [MLIR] Move eraseArguments and eraseResults to FunctionLike.

Awesome, thanks for taking a look. Those final comments all make sense.. I will clean those up.

Nov 3 2020, 12:47 PM · Restricted Project
mikeurbach added a comment to D90363: [MLIR] Move eraseArguments and eraseResults to FunctionLike.

@rriddle when you get a chance, please take another look. I think I've addressed your comments from the previous revision.

Nov 3 2020, 12:34 PM · Restricted Project
mikeurbach updated the diff for D90363: [MLIR] Move eraseArguments and eraseResults to FunctionLike.

Remove unused file from previous revision.

Nov 3 2020, 12:22 PM · Restricted Project
mikeurbach updated the diff for D90363: [MLIR] Move eraseArguments and eraseResults to FunctionLike.

Refactor implementations into FunctionSupport.cpp, and address other comments.

Nov 3 2020, 12:18 PM · Restricted Project

Oct 30 2020

mikeurbach added inline comments to D90363: [MLIR] Move eraseArguments and eraseResults to FunctionLike.
Oct 30 2020, 1:56 PM · Restricted Project
mikeurbach added inline comments to D90363: [MLIR] Move eraseArguments and eraseResults to FunctionLike.
Oct 30 2020, 9:07 AM · Restricted Project

Oct 29 2020

mikeurbach updated the diff for D90363: [MLIR] Move eraseArguments and eraseResults to FunctionLike.

Moved BitVector creation into a helper in Support.

Oct 29 2020, 12:33 PM · Restricted Project