Page MenuHomePhabricator

asaadaldien (Ahmed S. Taei)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 29 2019, 7:44 PM (38 w, 4 d)

Recent Activity

Mon, Sep 21

asaadaldien committed rG9b47525824df: Reorder linalg.conv indexing_maps loop order (authored by asaadaldien).
Reorder linalg.conv indexing_maps loop order
Mon, Sep 21, 9:54 PM
asaadaldien closed D87781: Reorder linalg.conv indexing_maps loop order.
Mon, Sep 21, 9:54 PM · Restricted Project
asaadaldien updated the diff for D87781: Reorder linalg.conv indexing_maps loop order.

Comments...

Mon, Sep 21, 9:44 PM · Restricted Project

Sun, Sep 20

asaadaldien added a comment to D87781: Reorder linalg.conv indexing_maps loop order.

It's a bit odd to see the loop ordering of a *lowering conversion* change because the output improves performance with a specific backend/compiler and for specific reasons. Moreover, that way, this would keep changing/evolving and be sensitive to common downstream paths and sensitive to LLVM's opt pipeline. In the absence of any target / scheduling info, the order to choose is typically expected to be just the most intuitive / canonical and shouldn't keep changing. You need an optimization mechanism if you need a better one.

I agree with you a lowering conversion shouldn't change because of specific perf/backend improvements. but this particular change take care of defaults (linear layouts, nhwc order...etc) so it sets the natural iteration order (n, h, w, kh, kw, ci, co) for most naive c++ multi array expression:
Y[n, h, w, co] += W[kh, kw, ci, co] * X[n, h + hk, w + kw, ci];

Sun, Sep 20, 12:58 PM · Restricted Project
asaadaldien added a comment to D87781: Reorder linalg.conv indexing_maps loop order.

It's a bit odd to see the loop ordering of a *lowering conversion* change because the output improves performance with a specific backend/compiler and for specific reasons. Moreover, that way, this would keep changing/evolving and be sensitive to common downstream paths and sensitive to LLVM's opt pipeline. In the absence of any target / scheduling info, the order to choose is typically expected to be just the most intuitive / canonical and shouldn't keep changing. You need an optimization mechanism if you need a better one.

Sun, Sep 20, 12:48 PM · Restricted Project

Fri, Sep 18

asaadaldien added a comment to D87781: Reorder linalg.conv indexing_maps loop order.

Putting a blocker to get some discussion here.

The original definition was following TF, it is not anymore.
Do we consider this to not be a problem ?

Putting the loops in the "right" order is independent from the op spec.
You should be able to just use tiling without any op definition change (tile by 1-1-1-1-1 + perm for scalar loop-level).

More generally, the way I am approaching this longer term is that this magic "embed the world op" would disappear in favor of more, smaller named ops.
Transformations would look like: named_op1 -> generic form -> named_op2 and I think a lot of these things can be automated from the TC form.
My overall concern is whether we are going towards relying more and more on an op with very fat one-off semantics.

I won't oppose it strongly for now but the conv op will most likely be a prime candidate for deletion when the infra is more mature, so I'd be cautious on putting a lot of effort on transformations / optimizations / perf results if they don't generalize to linalg.generic.

Also, the doc would need to be updated too.

Actually a better way to have handled is to just lower it to generic form and do the interchange while lowering it, i.e. use the LinalgLoopInterchangePattern on linalg.conv operation. The issue with this AFAICS is

  1. Since the indexing maps and iterator types are not mutable for named ops (as it should be) the linalg.conv needs to be lowered to its generic form while interchanging loops.
  2. To do (1) there needs to be a way to get the body of the generic op. For the "legacy" named ops, these are hard-coded when they are lowered to loops. Instead the named ops need an interface that can be used to generate the body. If we had that, then I would favor the approach of keeping the conv definition as is and reordering the loops as a transformation.
Fri, Sep 18, 8:00 AM · Restricted Project
asaadaldien added a comment to D87781: Reorder linalg.conv indexing_maps loop order.

Putting a blocker to get some discussion here.

The original definition was following TF, it is not anymore.
Do we consider this to not be a problem ?

Which definition did we follow ? I am not familiar with explicit loop order def the only one I can see is the expression in linalg doc that doesn't imply the order, no ?

Fri, Sep 18, 7:56 AM · Restricted Project

Wed, Sep 16

asaadaldien updated the diff for D87781: Reorder linalg.conv indexing_maps loop order.

rebase.

Wed, Sep 16, 2:12 PM · Restricted Project
asaadaldien requested review of D87781: Reorder linalg.conv indexing_maps loop order.
Wed, Sep 16, 11:25 AM · Restricted Project

Mon, Sep 7

asaadaldien added a comment to D86619: [mlir] Conv ops vectorization pass.

This is not how I was imagining convolution to be lowered in a first stab.
I was expecting 1. taking subviews, 2. either using reshape or extending subviews to allow it to be rank-reducing, 3. rewrite as a linalg.matmul and reuse the existing vectorization patterns.

This revision wants to introduce a vectorization pass with assumptions that look fishy to me.
I have left some comments assuming we're taking the route of direct vectorization of convolutions.

In any case we should have a VC to discuss these assumptions that I have not followed and how they differ from the existing work based on promotion + static shapes + vectorization + forwarding patterns.

Also + @asaadaldien who has started looking at similar things for depthwise convolutions on mobile.

Mon, Sep 7, 9:46 PM · Restricted Project

Aug 17 2020

asaadaldien accepted D86117: [mlir][Linalg] Canonicalize tensor_reshape(splat-constant) -> splat-constant..
Aug 17 2020, 4:15 PM · Restricted Project
asaadaldien removed a reviewer for D85780: [mlir][Linalg] Fix subview size used within Linalg Tiling pass.: asaadaldien.
Aug 17 2020, 4:11 PM · Restricted Project
asaadaldien added a reviewer for D85780: [mlir][Linalg] Fix subview size used within Linalg Tiling pass.: asaadaldien.
Aug 17 2020, 4:02 PM · Restricted Project

Jul 27 2020

asaadaldien added inline comments to D84631: [mlir][Vector] Add transformation + pattern to split vector.transfer_read into full and partial copies..
Jul 27 2020, 11:49 AM · Restricted Project

Jun 12 2020

asaadaldien added inline comments to D81618: [mlir] Add support for lowering tanh to LLVMIR..
Jun 12 2020, 9:45 AM · Restricted Project

Jun 11 2020

asaadaldien added a comment to D81618: [mlir] Add support for lowering tanh to LLVMIR..

Is it possible to get this lowered to a tanh function call instead of the exp rewrite ?

Unless we assume libc is linked, there's no tanh function.

Jun 11 2020, 11:00 AM · Restricted Project

Jun 10 2020

asaadaldien added a comment to D81618: [mlir] Add support for lowering tanh to LLVMIR..

Didn't go through the code yet. high level comments:

Jun 10 2020, 11:12 PM · Restricted Project

May 5 2020

asaadaldien accepted D79455: [mlir][StandardToLLVM] Add support for lowering FPToSIOp to LLVM..
May 5 2020, 5:17 PM · Restricted Project

Apr 7 2020

asaadaldien added inline comments to D77678: [mlir][Linalg] Add loop.parallel lowering for all Linalg Ops..
Apr 7 2020, 4:22 PM · Restricted Project
asaadaldien accepted D77676: [mlir][Linalg] Use subview instead of linalg.slice in Promotion.cpp.
Apr 7 2020, 4:22 PM · Restricted Project

Mar 30 2020

asaadaldien committed rG221fa96cd43c: Fix linalg.generic access of hoisted constants (authored by asaadaldien).
Fix linalg.generic access of hoisted constants
Mar 30 2020, 9:18 PM
asaadaldien closed D77109: Fix linalg.generic access of hoisted constants.
Mar 30 2020, 9:18 PM · Restricted Project
asaadaldien created D77109: Fix linalg.generic access of hoisted constants.
Mar 30 2020, 6:02 PM · Restricted Project
asaadaldien accepted D76637: [mlir][Linalg] Allow tiling of batch dimension for convolution ops with padding..

LGTM!

Mar 30 2020, 1:37 PM · Restricted Project

Mar 20 2020

asaadaldien committed rG08a9147349ea: [mlir][LLVMIR] Fix fusion for rank-0 tensors (authored by asaadaldien).
[mlir][LLVMIR] Fix fusion for rank-0 tensors
Mar 20 2020, 1:35 PM
asaadaldien closed D76479: [mlir][LLVMIR] Fix fusion for rank-0 tensors.
Mar 20 2020, 1:35 PM · Restricted Project
asaadaldien updated the diff for D76479: [mlir][LLVMIR] Fix fusion for rank-0 tensors.

resolve nit

Mar 20 2020, 1:01 PM · Restricted Project
asaadaldien added inline comments to D76479: [mlir][LLVMIR] Fix fusion for rank-0 tensors.
Mar 20 2020, 11:23 AM · Restricted Project
asaadaldien added inline comments to D76479: [mlir][LLVMIR] Fix fusion for rank-0 tensors.
Mar 20 2020, 10:17 AM · Restricted Project
asaadaldien created D76479: [mlir][LLVMIR] Fix fusion for rank-0 tensors.
Mar 20 2020, 12:30 AM · Restricted Project

Mar 13 2020

asaadaldien committed rG18fc42fa3370: [mlir][LLVMIR] Add a support for boolean type arguments conversion (authored by asaadaldien).
[mlir][LLVMIR] Add a support for boolean type arguments conversion
Mar 13 2020, 3:08 PM
asaadaldien closed D76159: [mlir][LLVMIR] Add a support for boolean type arguments conversion.
Mar 13 2020, 3:08 PM · Restricted Project
asaadaldien created D76159: [mlir][LLVMIR] Add a support for boolean type arguments conversion.
Mar 13 2020, 2:01 PM · Restricted Project

Feb 26 2020

asaadaldien added inline comments to D75219: [mlir] Add primitive transform pattern to rewrite linalg.copy into vector.broadcast form.
Feb 26 2020, 5:57 PM · Restricted Project

Jan 28 2020

asaadaldien committed rG16e82d855a1b: [mlir] Add primitive transform pattern to rewrite linalg.fill into vector. (authored by asaadaldien).
[mlir] Add primitive transform pattern to rewrite linalg.fill into vector.
Jan 28 2020, 11:35 AM
asaadaldien closed D73391: [mlir] Add primitive transform pattern to rewrite linalg.fill into vector.broadcast form..
Jan 28 2020, 11:34 AM · Restricted Project
asaadaldien added a comment to D73244: [mlir] Fix vectorize transform crashing on none-op operand.

@rriddle This already landed (not sure why not showing that here!) the example in the summary I will added it as a test in a follow up diff.

Jan 28 2020, 10:02 AM · Restricted Project
asaadaldien updated the diff for D73391: [mlir] Add primitive transform pattern to rewrite linalg.fill into vector.broadcast form..

Resolve comments & clang-format

Jan 28 2020, 10:02 AM · Restricted Project

Jan 24 2020

asaadaldien created D73391: [mlir] Add primitive transform pattern to rewrite linalg.fill into vector.broadcast form..
Jan 24 2020, 4:27 PM · Restricted Project

Jan 23 2020

asaadaldien committed rG8d1ed2940d95: [mlir] Fix vectorize transform crashing on none-op operand (authored by asaadaldien).
[mlir] Fix vectorize transform crashing on none-op operand
Jan 23 2020, 10:11 AM
asaadaldien accepted D73145: [mlir][Linalg] Introduce folding patterns to remove certain MemRefCastOp.

LGTM!

Jan 23 2020, 7:52 AM · Restricted Project

Jan 22 2020

asaadaldien updated the diff for D73244: [mlir] Fix vectorize transform crashing on none-op operand.

use dyn_cast_or_null

Jan 22 2020, 5:59 PM · Restricted Project
asaadaldien created D73244: [mlir] Fix vectorize transform crashing on none-op operand.
Jan 22 2020, 5:05 PM · Restricted Project
asaadaldien accepted D73149: [mlir][Linalg] Add tensor support to Linalg EDSC Builders.

LGTM! clang-format + few nits...

Jan 22 2020, 11:56 AM · Restricted Project

Jan 21 2020

asaadaldien accepted D72863: [mlir][Linalg] Add tensor support to Linalg EDSC Builders.

LGTM!

Jan 21 2020, 11:07 AM · Restricted Project

Jan 16 2020

asaadaldien added inline comments to D72780: [mlir][Linalg] Fix Linalg EDSC builders.
Jan 16 2020, 9:44 AM · Restricted Project

Jan 15 2020

asaadaldien accepted D72780: [mlir][Linalg] Fix Linalg EDSC builders.

LGTM! an inline question trying to understand the Builder blocks scoping here.

Jan 15 2020, 11:27 AM · Restricted Project

Jan 14 2020

asaadaldien committed rGab0356470612: [mlir] : Fix ViewOp shape folder for identity affine maps (authored by asaadaldien).
[mlir] : Fix ViewOp shape folder for identity affine maps
Jan 14 2020, 5:11 PM
asaadaldien closed D72735: [mlir] : Fix ViewOp shape folder for identity affine maps.
Jan 14 2020, 5:11 PM · Restricted Project
asaadaldien added inline comments to D72555: [mlir][Linalg] Update the semantics, verifier and test for Linalg with tensors..
Jan 14 2020, 3:24 PM · Restricted Project
asaadaldien created D72735: [mlir] : Fix ViewOp shape folder for identity affine maps.
Jan 14 2020, 1:28 PM · Restricted Project

Jan 8 2020

asaadaldien committed rGf84d3200528a: [MLIR] Don't use SSA names directly for std.view canonicalization test (authored by asaadaldien).
[MLIR] Don't use SSA names directly for std.view canonicalization test
Jan 8 2020, 2:52 PM
asaadaldien closed D72408: [MLIR] Don't use SSA names directly for std.view canonicalization test.
Jan 8 2020, 2:51 PM · Restricted Project
asaadaldien created D72408: [MLIR] Don't use SSA names directly for std.view canonicalization test.
Jan 8 2020, 12:32 PM · Restricted Project
asaadaldien added inline comments to D72379: [mlir] Canonicalize static alloc followed by memref_cast and std.view.
Jan 8 2020, 12:13 PM · Restricted Project
asaadaldien committed rG1e25109f93ff: Canonicalize static alloc followed by memref_cast and std.view (authored by asaadaldien).
Canonicalize static alloc followed by memref_cast and std.view
Jan 8 2020, 11:55 AM
asaadaldien closed D72379: [mlir] Canonicalize static alloc followed by memref_cast and std.view.
Jan 8 2020, 11:55 AM · Restricted Project
asaadaldien added inline comments to D72379: [mlir] Canonicalize static alloc followed by memref_cast and std.view.
Jan 8 2020, 10:49 AM · Restricted Project
asaadaldien updated the diff for D72379: [mlir] Canonicalize static alloc followed by memref_cast and std.view.

Resolve comments....

Jan 8 2020, 10:49 AM · Restricted Project

Jan 7 2020

asaadaldien created D72379: [mlir] Canonicalize static alloc followed by memref_cast and std.view.
Jan 7 2020, 5:50 PM · Restricted Project

Jan 3 2020

asaadaldien abandoned D72173: [mlir] Fix gcc 5.5 build break.

Thanks @nicolasvasilache

Jan 3 2020, 2:08 PM · Restricted Project
asaadaldien added a comment to D72094: [mlir][linalg] Lower linalg to affine loops.

@jpienaar D72173 should fix that

Jan 3 2020, 11:51 AM · Restricted Project
asaadaldien created D72173: [mlir] Fix gcc 5.5 build break.
Jan 3 2020, 11:50 AM · Restricted Project
asaadaldien updated the diff for D72094: [mlir][linalg] Lower linalg to affine loops.

applying clang-format

Jan 3 2020, 9:56 AM · Restricted Project
asaadaldien added inline comments to D72094: [mlir][linalg] Lower linalg to affine loops.
Jan 3 2020, 9:37 AM · Restricted Project
asaadaldien added inline comments to D72094: [mlir][linalg] Lower linalg to affine loops.
Jan 3 2020, 9:37 AM · Restricted Project
asaadaldien updated the diff for D72094: [mlir][linalg] Lower linalg to affine loops.

Resolve comments

Jan 3 2020, 9:29 AM · Restricted Project

Jan 2 2020

asaadaldien updated the diff for D72094: [mlir][linalg] Lower linalg to affine loops.

lint fixes...

Jan 2 2020, 11:53 AM · Restricted Project
asaadaldien updated the diff for D72094: [mlir][linalg] Lower linalg to affine loops.

Resolve comments...

Jan 2 2020, 11:14 AM · Restricted Project
asaadaldien created D72094: [mlir][linalg] Lower linalg to affine loops.
Jan 2 2020, 10:08 AM · Restricted Project