Page MenuHomePhabricator

sgrechanik (Sergei Grechanik)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 3 2020, 3:19 PM (76 w, 3 d)

Recent Activity

Apr 4 2022

sgrechanik committed rGc2a8a104ec32: [MLIR][NFC] Remove unnecessary cast. (authored by antonio-cortes-perez).
[MLIR][NFC] Remove unnecessary cast.
Apr 4 2022, 10:01 AM · Restricted Project, Restricted Project
sgrechanik closed D121555: [NFC] Remove unnecessary cast..
Apr 4 2022, 10:01 AM · Restricted Project, Restricted Project
sgrechanik committed rGb08ede4374db: [MLIR] Fix MLIR vim syntax file (authored by sgrechanik).
[MLIR] Fix MLIR vim syntax file
Apr 4 2022, 9:23 AM · Restricted Project, Restricted Project
sgrechanik closed D122626: [MLIR] Fix MLIR vim syntax file.
Apr 4 2022, 9:23 AM · Restricted Project, Restricted Project

Mar 30 2022

sgrechanik updated the diff for D122626: [MLIR] Fix MLIR vim syntax file.

Added separate groups for different kinds of identifiers, they will have different colors now.

Mar 30 2022, 1:08 PM · Restricted Project, Restricted Project
sgrechanik added a comment to D122626: [MLIR] Fix MLIR vim syntax file.

Yes, it will. I can separate it into a separate group if you want it to stand out more.

Mar 30 2022, 12:34 PM · Restricted Project, Restricted Project

Mar 29 2022

sgrechanik updated the diff for D122626: [MLIR] Fix MLIR vim syntax file.

Added comments

Mar 29 2022, 12:36 PM · Restricted Project, Restricted Project

Mar 28 2022

sgrechanik requested review of D122626: [MLIR] Fix MLIR vim syntax file.
Mar 28 2022, 5:58 PM · Restricted Project, Restricted Project

Mar 8 2022

sgrechanik added a comment to D121174: [mlir] Emit Warning diagnostic in generic form.

@rriddle Should we also change the adjustPrintingFlags function in mlir/lib/IR/Diagnostics.cpp:130, so that things like emitWarning() << op print op generically as well?

Mar 8 2022, 10:35 AM · Restricted Project, Restricted Project

Mar 7 2022

sgrechanik committed rG27df7158feb2: [mlir] Fix dumping invalid ops (authored by sgrechanik).
[mlir] Fix dumping invalid ops
Mar 7 2022, 8:45 AM · Restricted Project
sgrechanik closed D117834: [mlir] Fix dumping invalid ops.
Mar 7 2022, 8:44 AM · Restricted Project, Restricted Project

Mar 4 2022

sgrechanik added a comment to D117834: [mlir] Fix dumping invalid ops.

Thanks, I'll merge it on Monday.

Mar 4 2022, 6:14 PM · Restricted Project, Restricted Project
sgrechanik added a comment to D117834: [mlir] Fix dumping invalid ops.

@rriddle Please take another look, if you have any concerns I can revert to the last accepted state and extract the change into a separate patch.

Mar 4 2022, 2:40 PM · Restricted Project, Restricted Project

Mar 2 2022

sgrechanik updated the diff for D117834: [mlir] Fix dumping invalid ops.
  • Standard -> Func
Mar 2 2022, 8:29 AM · Restricted Project, Restricted Project

Mar 1 2022

sgrechanik updated the diff for D117834: [mlir] Fix dumping invalid ops.
  • Switch to generic form only when severity level is Error
Mar 1 2022, 5:46 PM · Restricted Project, Restricted Project
Herald added a project to D117834: [mlir] Fix dumping invalid ops: Restricted Project.
Mar 1 2022, 5:44 PM · Restricted Project, Restricted Project

Feb 25 2022

sgrechanik updated the diff for D117834: [mlir] Fix dumping invalid ops.
  • Switched to generic printing in diagnostics, removed the thread_local trick
  • Added a flag to skip verification
  • Implemented more explicit testing of invalid op printing
Feb 25 2022, 1:44 PM · Restricted Project, Restricted Project

Feb 23 2022

sgrechanik added inline comments to D117834: [mlir] Fix dumping invalid ops.
Feb 23 2022, 3:36 PM · Restricted Project, Restricted Project

Feb 18 2022

sgrechanik added inline comments to D117834: [mlir] Fix dumping invalid ops.
Feb 18 2022, 4:52 PM · Restricted Project, Restricted Project
sgrechanik added a comment to D120057: [mlir][Affine] Fix -lower-affine -debug assertion.

We are trying to fix this in a general way by running verification before printing and switching to generic op printing on failure, here: https://reviews.llvm.org/D117834

Feb 18 2022, 10:46 AM · Restricted Project
sgrechanik added a comment to D117834: [mlir] Fix dumping invalid ops.

Rebased and moved the verification to the AsmState constructor.

Feb 18 2022, 10:43 AM · Restricted Project, Restricted Project
sgrechanik updated the diff for D117834: [mlir] Fix dumping invalid ops.
Feb 18 2022, 10:42 AM · Restricted Project, Restricted Project

Feb 15 2022

sgrechanik committed rG988a3ba0d815: [mlir] Expose printer flags in AsmState (authored by sgrechanik).
[mlir] Expose printer flags in AsmState
Feb 15 2022, 5:38 PM
sgrechanik closed D119870: [mlir] Expose printer flags in AsmState.
Feb 15 2022, 5:38 PM · Restricted Project
sgrechanik added a comment to D117834: [mlir] Fix dumping invalid ops.

Ok, let's do it gradually and expose printing flags in AsmState first: https://reviews.llvm.org/D119870

Feb 15 2022, 11:30 AM · Restricted Project, Restricted Project
sgrechanik requested review of D119870: [mlir] Expose printer flags in AsmState.
Feb 15 2022, 11:28 AM · Restricted Project

Feb 9 2022

sgrechanik added inline comments to D117834: [mlir] Fix dumping invalid ops.
Feb 9 2022, 6:15 PM · Restricted Project, Restricted Project

Feb 8 2022

sgrechanik added inline comments to D117834: [mlir] Fix dumping invalid ops.
Feb 8 2022, 4:16 PM · Restricted Project, Restricted Project
sgrechanik updated the diff for D117834: [mlir] Fix dumping invalid ops.
  • Error suppression is back
  • fixed formatting errors
Feb 8 2022, 4:16 PM · Restricted Project, Restricted Project

Feb 7 2022

sgrechanik added inline comments to D117834: [mlir] Fix dumping invalid ops.
Feb 7 2022, 3:52 PM · Restricted Project, Restricted Project
sgrechanik updated the diff for D117834: [mlir] Fix dumping invalid ops.
  • Moved the check to Operation::print and Block::print
  • Removed error suppression: errors may be helpful.
Feb 7 2022, 3:51 PM · Restricted Project, Restricted Project
sgrechanik committed rGbb39ad43ceea: [mlir][spirv] Fix verification of nested array constants (authored by sgrechanik).
[mlir][spirv] Fix verification of nested array constants
Feb 7 2022, 1:57 PM
sgrechanik closed D118939: [mlir][spirv] Fix verification of nested array constants.
Feb 7 2022, 1:57 PM · Restricted Project

Feb 3 2022

sgrechanik added a comment to D117834: [mlir] Fix dumping invalid ops.

Fixing this not only for dump uncovered a bug in verification of spirv::ConstantOp, which should be fixed first: https://reviews.llvm.org/D118939

Feb 3 2022, 12:40 PM · Restricted Project, Restricted Project
sgrechanik requested review of D118939: [mlir][spirv] Fix verification of nested array constants.
Feb 3 2022, 12:37 PM · Restricted Project

Jan 31 2022

sgrechanik added a comment to D116504: [MLIR] Create fold for cmp of ext.

@wsmoses This causes a crash for vector types (because of cast<IntegerType>()).

Jan 31 2022, 11:04 AM · Restricted Project

Jan 25 2022

sgrechanik updated the diff for D117834: [mlir] Fix dumping invalid ops.

Not sure at which level to put the verification, Operation::dump seems to be a good candidate, it will fix the original crash and won't affect other kinds of printing.

Jan 25 2022, 4:19 PM · Restricted Project, Restricted Project

Jan 24 2022

sgrechanik added a comment to D117834: [mlir] Fix dumping invalid ops.

We can call opInfo->verifyInvariants(op) in OperationPrinter::printOperation and switch to generic printing on failure, something along the lines:

Jan 24 2022, 5:58 PM · Restricted Project, Restricted Project

Jan 20 2022

sgrechanik added a reviewer for D117834: [mlir] Fix dumping invalid ops: ftynse.
Jan 20 2022, 1:32 PM · Restricted Project, Restricted Project
sgrechanik requested review of D117834: [mlir] Fix dumping invalid ops.
Jan 20 2022, 1:28 PM · Restricted Project, Restricted Project
sgrechanik committed rG5abf11632245: [mlir][vector] Allow values outside of [0; dim-size] in create_mask (authored by sgrechanik).
[mlir][vector] Allow values outside of [0; dim-size] in create_mask
Jan 20 2022, 10:00 AM
sgrechanik closed D116069: [mlir][vector] Allow values outside of [0; dim-size] in create_mask.
Jan 20 2022, 10:00 AM · Restricted Project

Jan 19 2022

sgrechanik added a comment to D116069: [mlir][vector] Allow values outside of [0; dim-size] in create_mask.

Thanks! I'll merge this tomorrow if there are no more comments.
(As an alternative we can merge only the half of this change related to values larger than the vector size, and keep the old behavior for negative values, but it's probably better to explicitly require that the mask index should be interpreted as a signed integer than to leave this unspecified).

Jan 19 2022, 12:28 PM · Restricted Project

Jan 13 2022

sgrechanik added a comment to D116069: [mlir][vector] Allow values outside of [0; dim-size] in create_mask.

Values that are greater than the vector size are already used by the vectorizer when vectorizing reductions and creating a mask. In this example the mask filters out garbage elements (with index >= 400) and is based on the value %elts_left, which is often greater than 64:

func @vecdim_reduction_masked(%arg0: memref<?xf32>, %arg1: memref<f32>) {
  %cst = arith.constant 0.000000e+00 : f32
  %cst_0 = arith.constant dense<0.000000e+00> : vector<64xf32>
  %0 = affine.for %arg2 = 0 to 400 step 64 iter_args(%arg3 = %cst_0) -> (vector<64xf32>) {
    %elts_left = affine.apply affine_map<(d0) -> (400 - d0)>(%arg2)
    %3 = vector.create_mask %elts_left : vector<64xi1>
    %4 = vector.transfer_read %arg0[%arg2], %cst : memref<?xf32>, vector<64xf32>
    %5 = arith.addf %arg3, %4 : vector<64xf32>
    %6 = select %3, %5, %arg3 : vector<64xi1>, vector<64xf32>
    affine.yield %6 : vector<64xf32>
  }
  %1 = vector.reduction "add", %0 : vector<64xf32> into f32
  affine.store %1, %arg1[] : memref<f32>
  return
}

(It then fails when peeling and unrolling multiple loop iterations, in which case create_mask ops become constant_mask ops which statically checks that the value is within bounds).

Jan 13 2022, 10:04 AM · Restricted Project

Jan 12 2022

sgrechanik added a comment to D116069: [mlir][vector] Allow values outside of [0; dim-size] in create_mask.

Kindly ping

Jan 12 2022, 10:02 AM · Restricted Project

Dec 20 2021

sgrechanik requested review of D116069: [mlir][vector] Allow values outside of [0; dim-size] in create_mask.
Dec 20 2021, 5:59 PM · Restricted Project

Sep 23 2021

sgrechanik added inline comments to D110303: [mlir] Create a generic reduction detection utility.
Sep 23 2021, 10:21 AM · Restricted Project

Sep 20 2021

sgrechanik added inline comments to D104614: [MLIR] Generalize detecting mods during slice computing.
Sep 20 2021, 5:20 PM · Restricted Project

Aug 3 2021

sgrechanik abandoned D98530: [mlir][Vector] Pass for lowering of transfer_read/write.
Aug 3 2021, 12:39 PM · Restricted Project

May 6 2021

sgrechanik committed rG5dc1ed3f627e: [mlir] Update dstNode after DenseMap insertion in loop fusion pass. (authored by ayzhuang).
[mlir] Update dstNode after DenseMap insertion in loop fusion pass.
May 6 2021, 3:34 PM
sgrechanik closed D101794: [mlir] Update dstNode after DenseMap insertion in loop fusion pass..
May 6 2021, 3:34 PM · Restricted Project

May 5 2021

sgrechanik committed rGd80b04ab0015: [mlir][Affine][Vector] Support vectorizing reduction loops (authored by sgrechanik).
[mlir][Affine][Vector] Support vectorizing reduction loops
May 5 2021, 9:13 AM
sgrechanik closed D100694: [mlir][Affine][Vector] Support vectorizing reduction loops.
May 5 2021, 9:13 AM · Restricted Project

May 4 2021

sgrechanik added a comment to D100694: [mlir][Affine][Vector] Support vectorizing reduction loops.

If there are no more comments I'll merge it tomorrow morning

May 4 2021, 1:41 PM · Restricted Project

May 3 2021

sgrechanik added a comment to D100694: [mlir][Affine][Vector] Support vectorizing reduction loops.

@ftynse Please check if the reduction detection changes look ok, I added the condition !yielded.hasOneUse() to exclude the case vecdim_partial_sums_1_rejected where we leak partial sums by storing them to a memref. I also added a helper getVectorReductionOp to generate vector reduction ops by AtomicRMWKind and move the getIdentityValue and getReductionOp helpers to make them publicly available.

May 3 2021, 1:24 PM · Restricted Project

Apr 29 2021

sgrechanik updated the diff for D100694: [mlir][Affine][Vector] Support vectorizing reduction loops.

I removed my reduction recognition machinery in favor of the code introduced by @ftynse. I still think that in the future we might want to replace AtomicRMWKind with something more extensible to support custom reductions, but I was unhappy with my solution, and it should probably be done in a separate patch (and maybe by someone else).

Apr 29 2021, 8:41 PM · Restricted Project

Apr 28 2021

sgrechanik added inline comments to D101171: [mlir] Affine: parallelize affine loops with reductions.
Apr 28 2021, 6:13 PM · Restricted Project

Apr 27 2021

sgrechanik added a comment to D100947: [MLIR] Add and propagate section attribute for LLVM_GlobalOp.

Looks like it's it ready to land? I'll merge it tomorrow if there are no more comments.

Apr 27 2021, 5:19 PM · Restricted Project
sgrechanik accepted D100947: [MLIR] Add and propagate section attribute for LLVM_GlobalOp.
Apr 27 2021, 10:31 AM · Restricted Project
sgrechanik updated the diff for D100694: [mlir][Affine][Vector] Support vectorizing reduction loops.
  • Split isLoopParallel into isLoopParallel and isLoopMemoryParallel
  • Removed unnecessary includes from Affine/Utils.h
Apr 27 2021, 10:27 AM · Restricted Project
sgrechanik added inline comments to D100694: [mlir][Affine][Vector] Support vectorizing reduction loops.
Apr 27 2021, 9:03 AM · Restricted Project

Apr 26 2021

sgrechanik added a comment to D101171: [mlir] Affine: parallelize affine loops with reductions.

This functionality overlaps with my reduction vectorization patch https://reviews.llvm.org/D100694
We can merge both (our changes to the isLoopParallel function are essentially the same), but having two separate reduction recognizers would be strange, so maybe we should discuss if there is a way to converge them.

Apr 26 2021, 9:57 PM · Restricted Project

Apr 25 2021

sgrechanik updated the diff for D100694: [mlir][Affine][Vector] Support vectorizing reduction loops.

Work around the MSVC issue

Apr 25 2021, 9:42 PM · Restricted Project

Apr 23 2021

sgrechanik updated the diff for D100694: [mlir][Affine][Vector] Support vectorizing reduction loops.

I ran into some obscure optimization-dependent linking errors while trying to reuse the StandardReductionInfo template, so I moved most of its implementation to the header file.

Apr 23 2021, 5:15 PM · Restricted Project
sgrechanik updated the diff for D100694: [mlir][Affine][Vector] Support vectorizing reduction loops.
Apr 23 2021, 9:28 AM · Restricted Project

Apr 22 2021

sgrechanik updated the diff for D100694: [mlir][Affine][Vector] Support vectorizing reduction loops.
Apr 22 2021, 8:21 PM · Restricted Project
sgrechanik updated the diff for D100694: [mlir][Affine][Vector] Support vectorizing reduction loops.

Changes:

  • Generate affine.apply instead of subi when creating a mask.
  • Moved ReductionInfo and ReductionRecognizer into separate files.
  • Created a separate isParallelReductionLoop utility to simplify isLoopParallel.
Apr 22 2021, 6:58 PM · Restricted Project

Apr 20 2021

sgrechanik committed rG9194071626a6: [mlir] Support hoisting whole affine for loops in LICM (authored by ayzhuang).
[mlir] Support hoisting whole affine for loops in LICM
Apr 20 2021, 6:16 PM
sgrechanik closed D100512: [mlir] Support hoisting whole affine for loops in LICM.
Apr 20 2021, 6:16 PM · Restricted Project

Apr 19 2021

sgrechanik added a comment to D100694: [mlir][Affine][Vector] Support vectorizing reduction loops.

Thank you for the feedback, I'll update the patch soon.

Apr 19 2021, 8:36 PM · Restricted Project

Apr 16 2021

sgrechanik requested review of D100694: [mlir][Affine][Vector] Support vectorizing reduction loops.
Apr 16 2021, 7:29 PM · Restricted Project

Apr 13 2021

sgrechanik committed rGf56791ae2ea0: [mlir] Prevent operations with users from being hoisted (authored by sumesh13).
[mlir] Prevent operations with users from being hoisted
Apr 13 2021, 3:38 PM
sgrechanik closed D99761: [mlir] Prevent operations with users from being hoisted.
Apr 13 2021, 3:38 PM · Restricted Project

Mar 29 2021

sgrechanik added a comment to D98530: [mlir][Vector] Pass for lowering of transfer_read/write.

@nicolasvasilache @aartbik Kindly ping. This patch changes the directory structure quite a bit, so I'm not comfortable proceeding without a second opinion.

Mar 29 2021, 5:51 PM · Restricted Project

Mar 28 2021

sgrechanik accepted D99019: [mlir][vector] Add lowering of Transfer_read with leading dim broadcast and permutation map.
Mar 28 2021, 11:55 AM · Restricted Project

Mar 24 2021

sgrechanik added inline comments to D99019: [mlir][vector] Add lowering of Transfer_read with leading dim broadcast and permutation map.
Mar 24 2021, 8:29 PM · Restricted Project

Mar 17 2021

sgrechanik updated the diff for D98530: [mlir][Vector] Pass for lowering of transfer_read/write.
  • Fixed the clang-tidy warning
Mar 17 2021, 3:11 PM · Restricted Project
sgrechanik added inline comments to D98530: [mlir][Vector] Pass for lowering of transfer_read/write.
Mar 17 2021, 8:57 AM · Restricted Project
sgrechanik updated the diff for D98530: [mlir][Vector] Pass for lowering of transfer_read/write.

Fixed formatting

Mar 17 2021, 8:56 AM · Restricted Project

Mar 16 2021

sgrechanik updated the diff for D98530: [mlir][Vector] Pass for lowering of transfer_read/write.
  • Moved the pass to a separate file.
  • Restructured the mlir/lib/Dialect/Vector directory.
  • Split the MLIRVector library into MLIRVector and MLIRVectorTransforms
Mar 16 2021, 7:00 PM · Restricted Project

Mar 15 2021

sgrechanik updated the diff for D98530: [mlir][Vector] Pass for lowering of transfer_read/write.
Mar 15 2021, 4:24 PM · Restricted Project

Mar 12 2021

sgrechanik requested review of D98530: [mlir][Vector] Pass for lowering of transfer_read/write.
Mar 12 2021, 10:31 AM · Restricted Project

Mar 11 2021

sgrechanik committed rGfd2b08969b8a: [mlir][Vector] Lowering of transfer_read/write to vector.load/store (authored by sgrechanik).
[mlir][Vector] Lowering of transfer_read/write to vector.load/store
Mar 11 2021, 6:20 PM
sgrechanik closed D97822: [mlir][Vector] Lowering of transfer_read/write to vector.load/store.
Mar 11 2021, 6:19 PM · Restricted Project
sgrechanik committed rG46ef6ffdaf7c: [NFC] Test commit. Add empty lines. (authored by sgrechanik).
[NFC] Test commit. Add empty lines.
Mar 11 2021, 5:34 PM

Mar 10 2021

sgrechanik added inline comments to D98239: [MLIR][Affine] Add utility to check if the slice is valid.
Mar 10 2021, 2:55 PM · Restricted Project
sgrechanik added a comment to D97822: [mlir][Vector] Lowering of transfer_read/write to vector.load/store.

As I mentioned before, I would suggest that we create a regular pass for this lowering, not only a test pass, so that we can compose it as needed in the pipeline.

Mar 10 2021, 10:38 AM · Restricted Project

Mar 9 2021

sgrechanik updated the diff for D97822: [mlir][Vector] Lowering of transfer_read/write to vector.load/store.
Mar 9 2021, 10:59 AM · Restricted Project

Mar 8 2021

sgrechanik updated the diff for D97822: [mlir][Vector] Lowering of transfer_read/write to vector.load/store.
  • Rolled back to the previous version (i.e. no new canonicalization patterns).
  • Moved isMinorIdentityWithBroadcasting inside the AffineMap class (although not sure if it really deserves this).
Mar 8 2021, 1:33 PM · Restricted Project

Mar 5 2021

sgrechanik updated the diff for D97822: [mlir][Vector] Lowering of transfer_read/write to vector.load/store.

Moved the lowering pattern to canonicalization patterns.

Mar 5 2021, 3:57 PM · Restricted Project

Mar 4 2021

sgrechanik updated the diff for D97822: [mlir][Vector] Lowering of transfer_read/write to vector.load/store.

Updated the diff according to Diego's feedback

Mar 4 2021, 8:51 AM · Restricted Project

Mar 3 2021

sgrechanik added inline comments to D97820: [mlir] Add 'Skip' result to Operation visitor.
Mar 3 2021, 10:31 AM · Restricted Project

Mar 2 2021

sgrechanik requested review of D97822: [mlir][Vector] Lowering of transfer_read/write to vector.load/store.
Mar 2 2021, 5:32 PM · Restricted Project
sgrechanik added inline comments to D97442: [mlir][Vector][Affine] Improve affine vectorizer algorithm.
Mar 2 2021, 3:16 PM · Restricted Project

Jan 8 2021

sgrechanik added a comment to D92233: [MLIR][Affine] Add affine.for normalization support.

Hey guys,
I found a problem with this pass; if you feed it the following loop:

Jan 8 2021, 5:26 PM · Restricted Project

Dec 7 2020

sgrechanik added inline comments to D92702: [mlir][Affine] Fix vectorizability check for multiple load/stores.
Dec 7 2020, 3:40 PM · Restricted Project
sgrechanik updated the diff for D92702: [mlir][Affine] Fix vectorizability check for multiple load/stores.
  • Set *memRefDim to -1 in the beginning
  • Fix indentation for the test case
Dec 7 2020, 3:40 PM · Restricted Project

Dec 4 2020

sgrechanik requested review of D92702: [mlir][Affine] Fix vectorizability check for multiple load/stores.
Dec 4 2020, 3:29 PM · Restricted Project