<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm5719-llvm/mlir/test/Conversion/VectorToLLVM, branch meklort-10.0.1</title>
<subtitle>Project Ortega BCM5719 LLVM</subtitle>
<id>https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1</id>
<link rel='self' href='https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/'/>
<updated>2020-01-09T08:13:01+00:00</updated>
<entry>
<title>[mlir][VectorOps] Implement insert_strided_slice conversion</title>
<updated>2020-01-09T08:13:01+00:00</updated>
<author>
<name>Nicolas Vasilache</name>
<email>ntv@google.com</email>
</author>
<published>2020-01-09T08:12:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=2d515e49d89c0738ccef8f1733d5f9afe00ee979'/>
<id>urn:sha1:2d515e49d89c0738ccef8f1733d5f9afe00ee979</id>
<content type='text'>
Summary:
This diff implements the progressive lowering of insert_strided_slice.
Two cases appear:
1. when the source and dest vectors have different ranks, extract the dest
subvector at the proper offset and reduce to case 2.
2. when they have the same rank N:
  a. if the source and dest type are the same, the insertion is trivial:
     just forward the source
  b. otherwise, iterate over all N-1 D subvectors and create an
     extract/insert_strided_slice/insert replacement, reducing the problem
     to vecotrs of the same N-1 rank.

This combines properly with the other conversion patterns to lower all the way to LLVM.

Reviewers: ftynse, rriddle, AlexEichenberger, andydavis1, tetuante, nicolasvasilache

Reviewed By: andydavis1

Subscribers: merge_guards_bot, mehdi_amini, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72317
</content>
</entry>
<entry>
<title>[mlir][VectorOps] Implement strided_slice conversion</title>
<updated>2020-01-09T08:03:51+00:00</updated>
<author>
<name>Nicolas Vasilache</name>
<email>ntv@google.com</email>
</author>
<published>2020-01-09T07:58:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=65678d938431c90408afa8d255cbed3d8ed8273f'/>
<id>urn:sha1:65678d938431c90408afa8d255cbed3d8ed8273f</id>
<content type='text'>
Summary:
This diff implements the progressive lowering of strided_slice to either:
  1. extractelement + insertelement for the 1-D case
  2. extract + optional strided_slice + insert for the n-D case.

This combines properly with the other conversion patterns to lower all the way to LLVM.

Appropriate tests are added.

Reviewers: ftynse, rriddle, AlexEichenberger, andydavis1, tetuante

Reviewed By: andydavis1

Subscribers: merge_guards_bot, mehdi_amini, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72310
</content>
</entry>
<entry>
<title>[VectorOps] unify vector dialect "subscripts"</title>
<updated>2019-12-20T23:33:04+00:00</updated>
<author>
<name>Aart Bik</name>
<email>ajcbik@google.com</email>
</author>
<published>2019-12-20T23:32:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=1d47564a53b0110d0aff51360c9fad0b6c767908'/>
<id>urn:sha1:1d47564a53b0110d0aff51360c9fad0b6c767908</id>
<content type='text'>
PiperOrigin-RevId: 286650682
</content>
</entry>
<entry>
<title>[VectorOps] minor cleanup: vector dialect "subscripts" are i32</title>
<updated>2019-12-19T19:51:08+00:00</updated>
<author>
<name>Aart Bik</name>
<email>ajcbik@google.com</email>
</author>
<published>2019-12-19T19:47:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=15f800f4bc71733c9f47f0dc4d44799be900bc00'/>
<id>urn:sha1:15f800f4bc71733c9f47f0dc4d44799be900bc00</id>
<content type='text'>
Introduces some centralized methods to move towards
consistent use of i32 as vector subscripts.

Note: sizes/strides/offsets attributes are still i64
PiperOrigin-RevId: 286434133
</content>
</entry>
<entry>
<title>[VectorOps] Add vector.print definition, with lowering support</title>
<updated>2019-12-18T19:31:34+00:00</updated>
<author>
<name>Aart Bik</name>
<email>ajcbik@google.com</email>
</author>
<published>2019-12-18T19:23:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=d9b500d3bb151bfb96073b0d66e8338a5c0186d5'/>
<id>urn:sha1:d9b500d3bb151bfb96073b0d66e8338a5c0186d5</id>
<content type='text'>
Examples:

  vector.print %f : f32
  vector.print %x : vector&lt;4xf32&gt;
  vector.print %y : vector&lt;3x4xf32&gt;
  vector.print %z : vector&lt;2x3x4xf32&gt;

LLVM lowering replaces these with fully unrolled calls
into a small runtime support library that provides some
basic printing operations (single value, opening closing
bracket, comma, newline).

PiperOrigin-RevId: 286230325
</content>
</entry>
<entry>
<title>[VectorOps] Add [insert/extract]element definition together with lowering to LLVM</title>
<updated>2019-12-16T17:52:46+00:00</updated>
<author>
<name>Aart Bik</name>
<email>ajcbik@google.com</email>
</author>
<published>2019-12-16T17:52:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=cd5dab8ad7fccc3b3e371ff37cb20ebfb4368d3f'/>
<id>urn:sha1:cd5dab8ad7fccc3b3e371ff37cb20ebfb4368d3f</id>
<content type='text'>
Similar to insert/extract vector instructions but
(1) work on 1-D vectors only
(2) allow for a dynamic index

  %c3 = constant 3 : index
  %0 = vector.insertelement %arg0, %arg1[%c : index] : vector&lt;4xf32&gt;
  %1 = vector.extractelement %arg0[%c3 : index] : vector&lt;4xf32&gt;

PiperOrigin-RevId: 285792205
</content>
</entry>
<entry>
<title>[VectorOps] Add lowering of vector.shuffle to LLVM IR</title>
<updated>2019-12-12T22:11:56+00:00</updated>
<author>
<name>Aart Bik</name>
<email>ajcbik@google.com</email>
</author>
<published>2019-12-12T22:11:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=1c81adf362ec79750850dc5ecb0bf3e60399e54f'/>
<id>urn:sha1:1c81adf362ec79750850dc5ecb0bf3e60399e54f</id>
<content type='text'>
For example, a shuffle

%1 = vector.shuffle %arg0, %arg1 [0 : i32, 1 : i32] : vector&lt;2xf32&gt;, vector&lt;2xf32&gt;

becomes a direct LLVM shuffle

0 = llvm.shufflevector %arg0, %arg1 [0 : i32, 1 : i32] : !llvm&lt;"&lt;2 x float&gt;"&gt;, !llvm&lt;"&lt;2 x float&gt;"&gt;

but

%1 = vector.shuffle %a, %b[1 : i32, 0 : i32, 2: i32] : vector&lt;1x4xf32&gt;, vector&lt;2x4xf32&gt;

becomes the more elaborate (note the index permutation that drives
argument selection for the extract operations)

%0 = llvm.mlir.undef : !llvm&lt;"[3 x &lt;4 x float&gt;]"&gt;
%1 = llvm.extractvalue %arg1[0] : !llvm&lt;"[2 x &lt;4 x float&gt;]"&gt;
%2 = llvm.insertvalue %1, %0[0] : !llvm&lt;"[3 x &lt;4 x float&gt;]"&gt;
%3 = llvm.extractvalue %arg0[0] : !llvm&lt;"[1 x &lt;4 x float&gt;]"&gt;
%4 = llvm.insertvalue %3, %2[1] : !llvm&lt;"[3 x &lt;4 x float&gt;]"&gt;
%5 = llvm.extractvalue %arg1[1] : !llvm&lt;"[2 x &lt;4 x float&gt;]"&gt;
%6 = llvm.insertvalue %5, %4[2] : !llvm&lt;"[3 x &lt;4 x float&gt;]"&gt;

PiperOrigin-RevId: 285268164
</content>
</entry>
<entry>
<title>[VectorOps] Add lowering of vector.insert to LLVM IR</title>
<updated>2019-12-11T01:12:49+00:00</updated>
<author>
<name>Aart Bik</name>
<email>ajcbik@google.com</email>
</author>
<published>2019-12-11T01:12:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=9826fe5c9fb65da8f1d53b21348f013c58c09791'/>
<id>urn:sha1:9826fe5c9fb65da8f1d53b21348f013c58c09791</id>
<content type='text'>
For example, an insert

  %0 = vector.insert %arg0, %arg1[3 : i32] : f32 into vector&lt;4xf32&gt;

becomes

  %0 = llvm.mlir.constant(3 : i32) : !llvm.i32
  %1 = llvm.insertelement %arg0, %arg1[%0 : !llvm.i32] : !llvm&lt;"&lt;4 x float&gt;"&gt;

A more elaborate example, inserting an element in a higher dimension
vector

  %0 = vector.insert %arg0, %arg1[3 : i32, 7 : i32, 15 : i32] : f32 into vector&lt;4x8x16xf32&gt;

becomes

  %0 = llvm.extractvalue %arg1[3 : i32, 7 : i32] : !llvm&lt;"[4 x [8 x &lt;16 x float&gt;]]"&gt;
  %1 = llvm.mlir.constant(15 : i32) : !llvm.i32
  %2 = llvm.insertelement %arg0, %0[%1 : !llvm.i32] : !llvm&lt;"&lt;16 x float&gt;"&gt;
  %3 = llvm.insertvalue %2, %arg1[3 : i32, 7 : i32] : !llvm&lt;"[4 x [8 x &lt;16 x float&gt;]]"&gt;

PiperOrigin-RevId: 284882443
</content>
</entry>
<entry>
<title>[VectorOps] Add a ShuffleOp to the VectorOps dialect</title>
<updated>2019-12-10T00:15:41+00:00</updated>
<author>
<name>Aart Bik</name>
<email>ajcbik@google.com</email>
</author>
<published>2019-12-10T00:15:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=1fe65688d42d1dacca528a871ac8de370043f793'/>
<id>urn:sha1:1fe65688d42d1dacca528a871ac8de370043f793</id>
<content type='text'>
For example

 %0 = vector.shuffle %x, %y [3 : i32, 2 : i32, 1 : i32, 0 : i32] : vector&lt;2xf32&gt;, vector&lt;2xf32&gt;

yields a vector&lt;4xf32&gt; result with a permutation of the elements of %x and %y

PiperOrigin-RevId: 284657191
</content>
</entry>
<entry>
<title>[VecOps] Rename vector.[insert|extract]element to just vector.[insert|extract]</title>
<updated>2019-12-06T20:39:25+00:00</updated>
<author>
<name>Aart Bik</name>
<email>ajcbik@google.com</email>
</author>
<published>2019-12-06T20:38:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=d37f27251f13ee6780267683fb9c4e69aa9c15a6'/>
<id>urn:sha1:d37f27251f13ee6780267683fb9c4e69aa9c15a6</id>
<content type='text'>
Since these operations lower to [insert|extract][element|value] at LLVM
dialect level, neither element nor value would correctly reflect the meaning.

PiperOrigin-RevId: 284240727
</content>
</entry>
</feed>
