This is an archive of the discontinued LLVM Phabricator instance.

[mlir][docs] Fix formatting issue in Dialects/Vector.md.
ClosedPublic

Authored by ingomueller-net on Nov 18 2021, 7:50 AM.

Diff Detail

Event Timeline

ingomueller-net requested review of this revision.Nov 18 2021, 7:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2021, 7:50 AM

Actually, I think that this needs more fixing but I am not too sure how it should look like.

Fix another formatting issue.

aartbik accepted this revision.Nov 18 2021, 10:49 AM
This revision is now accepted and ready to land.Nov 18 2021, 10:49 AM
mlir/docs/Dialects/Vector.md
101

Sorry for this mess.. here is a subset of what it could look like:

mlir
// Produces a vector<3x7x8xf32> 
%a = arith.addf %0, %1 : vector<3x7x8xf32>
// Produces a vector<3x7x8xf32>
%b = arith.mulf %0, %1 : vector<3x7x8xf32> 
// Produces a vector<3x7x8xf32>
%c = std.splat %1 : vector<3x7x8xf32>

// -> vector<7x8xf32>
%d = vector.extract %0[1]: vector<3x7x8xf32> 
%e = vector.extract %0[1, 5]: vector<3x7x8xf32> // -> vector<8xf32>
%f = vector.outerproduct %0, %1: vector<4xf32>, vector<8xf32> // -> vector<4x8xf32>
%g = vector.outerproduct %0, %1, %2: vector<4xf32>, vector<8xf32> // fma when adding %2 

// Returns a slice of type vector<2x2x16xf32>
%h = vector.strided_slice %0 
    {offsets = [2, 2], sizes = [2, 2], strides = [1, 1]}: 
  vector<4x8x16xf32> 

%i = vector.transfer_read %A[%0, %1] 
    {permutation_map = (d0, d1) -> (d0)}:
  memref<7x?xf32>, vector<4xf32>

vector.transfer_write %f1, %A[%i0, %i1, %i2, %i3] 
    {permutation_map = (d0, d1, d2, d3) -> (d3, d1, d0)} : 
  vector<5x4x3xf32>, memref<?x?x?x?xf32>

Applying changes suggested by nicolasvasilache

Rebasing to latest main. I had not understood the review process
when I submitted the first revision some months ago, so this
change never got landed...

Herald added a project: Restricted Project. · View Herald TranscriptMar 17 2022, 2:19 AM

I don't have the permission; can someone land this for me?