<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/beignet.git/backend/src/ir/function.hpp, branch master</title>
<subtitle>gitlab.freedesktop.org: beignet/beignet.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/beignet.git/'/>
<entry>
<title>Backend: Refine LLVM version check macro</title>
<updated>2017-04-13T11:39:22+00:00</updated>
<author>
<name>Pan Xiuli</name>
<email>xiuli.pan@intel.com</email>
</author>
<published>2017-03-17T06:16:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/beignet.git/commit/?id=f40ed02f7de65296219a0a160118ae3234e765c5'/>
<id>f40ed02f7de65296219a0a160118ae3234e765c5</id>
<content type='text'>
LLVM 4.0 is coming, we should refine our version check to fit the
LLVM_MAJOR_VERSION bump to 4.

Signed-off-by: Pan Xiuli &lt;xiuli.pan@intel.com&gt;
Reviewed-by: Yang Rong &lt;rong.r.yang@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LLVM 4.0 is coming, we should refine our version check to fit the
LLVM_MAJOR_VERSION bump to 4.

Signed-off-by: Pan Xiuli &lt;xiuli.pan@intel.com&gt;
Reviewed-by: Yang Rong &lt;rong.r.yang@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>OCL20: handle device enqueue helper functions in the backend.</title>
<updated>2016-12-30T08:21:53+00:00</updated>
<author>
<name>Yang, Rong R</name>
<email>rong.r.yang@intel.com</email>
</author>
<published>2016-11-28T11:32:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/beignet.git/commit/?id=e487a32e35f38baba5a2819aae211cbb8985ad82'/>
<id>e487a32e35f38baba5a2819aae211cbb8985ad82</id>
<content type='text'>
Add useDeviceEnqueue to kernel to indicate the kernel use device
enqueue or not.

V2: Remove and correct debug info.
Signed-off-by: Yang Rong &lt;rong.r.yang@intel.com&gt;
Reviewed-by: Pan Xiuli &lt;xiuli.pan@intel.com&gt;
Reviewed-by: Ruiling Song &lt;ruiling.song@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add useDeviceEnqueue to kernel to indicate the kernel use device
enqueue or not.

V2: Remove and correct debug info.
Signed-off-by: Yang Rong &lt;rong.r.yang@intel.com&gt;
Reviewed-by: Pan Xiuli &lt;xiuli.pan@intel.com&gt;
Reviewed-by: Ruiling Song &lt;ruiling.song@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gbe: add vec_type_hint's type into functionAttributes.</title>
<updated>2016-11-08T12:38:22+00:00</updated>
<author>
<name>Luo Xionghu</name>
<email>xionghu.luo@intel.com</email>
</author>
<published>2015-12-08T06:11:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/beignet.git/commit/?id=38188dbef5ccb4b2a4a2d0d32ceac1d581617079'/>
<id>38188dbef5ccb4b2a4a2d0d32ceac1d581617079</id>
<content type='text'>
for SPIR kernel, user may call clGetKernelInfo with CL_KERNEL_ATTRIBUTES
to query the functionAttributes.

v2: remove debug code.
v3: fix llvm 3.5 build fail.
v4:  only llvm-3.6 or later has kernel_arg_base_type in metadata.

Signed-off-by: Luo Xionghu &lt;xionghu.luo@intel.com&gt;
Reviewed-by: Yang Rong &lt;rong.r.yang@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
for SPIR kernel, user may call clGetKernelInfo with CL_KERNEL_ATTRIBUTES
to query the functionAttributes.

v2: remove debug code.
v3: fix llvm 3.5 build fail.
v4:  only llvm-3.6 or later has kernel_arg_base_type in metadata.

Signed-off-by: Luo Xionghu &lt;xionghu.luo@intel.com&gt;
Reviewed-by: Yang Rong &lt;rong.r.yang@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gbe: use kernel_arg_base_type to recognize image arguments.</title>
<updated>2016-11-08T12:38:22+00:00</updated>
<author>
<name>Luo Xionghu</name>
<email>xionghu.luo@intel.com</email>
</author>
<published>2015-11-26T05:59:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/beignet.git/commit/?id=7fb6b3d2e3935baf0a8338b1d04500cf73139c2b'/>
<id>7fb6b3d2e3935baf0a8338b1d04500cf73139c2b</id>
<content type='text'>
we use string compare function to recognize the image type, but
image types could be defined to other type, so use kernel_arg_base_type
to recognize image arguments.

Signed-off-by: Luo Xionghu &lt;xionghu.luo@intel.com&gt;
Reviewed-by: Yang Rong &lt;rong.r.yang@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
we use string compare function to recognize the image type, but
image types could be defined to other type, so use kernel_arg_base_type
to recognize image arguments.

Signed-off-by: Luo Xionghu &lt;xionghu.luo@intel.com&gt;
Reviewed-by: Yang Rong &lt;rong.r.yang@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Backend: Add pipe packet size check</title>
<updated>2016-11-08T12:38:22+00:00</updated>
<author>
<name>Pan Xiuli</name>
<email>xiuli.pan@intel.com</email>
</author>
<published>2016-01-26T02:32:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/beignet.git/commit/?id=c6755edb1256fdbf4dfa542fd6453d17f0718b72'/>
<id>c6755edb1256fdbf4dfa542fd6453d17f0718b72</id>
<content type='text'>
Get pipe packet type from metadata and pass type size to kernel
check type size is fit in clSetKernelArg

Signed-off-by: Pan Xiuli &lt;xiuli.pan@intel.com&gt;
Reviewed-by: Yang Rong &lt;rong.r.yang@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Get pipe packet type from metadata and pass type size to kernel
check type size is fit in clSetKernelArg

Signed-off-by: Pan Xiuli &lt;xiuli.pan@intel.com&gt;
Reviewed-by: Yang Rong &lt;rong.r.yang@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Backend: Add Pipe Builtin support</title>
<updated>2016-11-08T12:38:22+00:00</updated>
<author>
<name>Pan Xiuli</name>
<email>xiuli.pan@intel.com</email>
</author>
<published>2016-03-02T00:12:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/beignet.git/commit/?id=0b25bed13e1e4e01b1afaa431f83b97c921a81b4'/>
<id>0b25bed13e1e4e01b1afaa431f83b97c921a81b4</id>
<content type='text'>
Add pipe builtin functions.

v2: Refine type size to be system determined.
v3: Remove legacy code.
Signed-off-by: Pan Xiuli &lt;xiuli.pan@intel.com&gt;
Reviewed-by: Yang Rong &lt;rong.r.yang@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add pipe builtin functions.

v2: Refine type size to be system determined.
v3: Remove legacy code.
Signed-off-by: Pan Xiuli &lt;xiuli.pan@intel.com&gt;
Reviewed-by: Yang Rong &lt;rong.r.yang@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>OCL20/GBE: Change the pointer relative op's type.</title>
<updated>2016-11-08T11:06:55+00:00</updated>
<author>
<name>Yang Rong</name>
<email>rong.r.yang@intel.com</email>
</author>
<published>2015-12-04T08:30:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/beignet.git/commit/?id=f855f75bd70fa78818bf2bbf64770e02f312b3cd'/>
<id>f855f75bd70fa78818bf2bbf64770e02f312b3cd</id>
<content type='text'>
Can't use 32bits ops on pointer relative instructions.
Prepare to enable SPIR64.

V2: Set the pointers' family to QWORD and remove useless code.

Signed-off-by: Ruiling Song &lt;ruiling.song@intel.com&gt;
Signed-off-by: Yang Rong &lt;rong.r.yang@intel.com&gt;
Reviewed-by: Luo, Xionghu &lt;xionghu.luo@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Can't use 32bits ops on pointer relative instructions.
Prepare to enable SPIR64.

V2: Set the pointers' family to QWORD and remove useless code.

Signed-off-by: Ruiling Song &lt;ruiling.song@intel.com&gt;
Signed-off-by: Yang Rong &lt;rong.r.yang@intel.com&gt;
Reviewed-by: Luo, Xionghu &lt;xionghu.luo@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Backend: Add support for LLVM 3.9 release</title>
<updated>2016-09-28T08:05:23+00:00</updated>
<author>
<name>Pan Xiuli</name>
<email>xiuli.pan@intel.com</email>
</author>
<published>2016-09-27T05:11:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/beignet.git/commit/?id=0056da7ae23ba6c6db019b4ee7f990edcf932c8f'/>
<id>0056da7ae23ba6c6db019b4ee7f990edcf932c8f</id>
<content type='text'>
LLVM 3.9 changes a lot from 3.8, modify on:
1. API getGlobalContext was removed, add GBEGetLLVMContext instead
2. API LLVMLinkModules was removed, use LLVMLinkModules2 instead.
3. LLVMLinkModules2 now will delete src module for default, clone all
src module and kernel names.
4. Few LLVM pass refine, change include headers and creadpass API.
5. clang refine image type name, change llvminfo check for image.
6. clang change kernel arg info metadata and some other metadata to
function metadata, refine metedata query function logic.
7. clang default define most cl_khr_* macro, need to undef them first.
8. SPIR mangle was changed by a fix patch for Itanium mangle, now most
SPIR can not be recognized by LLVM 3.9.

V2: Merge some code.
Signed-off-by: Pan Xiuli &lt;xiuli.pan@intel.com&gt;
Reviewed-by: Ruiling Song &lt;ruiling.song@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LLVM 3.9 changes a lot from 3.8, modify on:
1. API getGlobalContext was removed, add GBEGetLLVMContext instead
2. API LLVMLinkModules was removed, use LLVMLinkModules2 instead.
3. LLVMLinkModules2 now will delete src module for default, clone all
src module and kernel names.
4. Few LLVM pass refine, change include headers and creadpass API.
5. clang refine image type name, change llvminfo check for image.
6. clang change kernel arg info metadata and some other metadata to
function metadata, refine metedata query function logic.
7. clang default define most cl_khr_* macro, need to undef them first.
8. SPIR mangle was changed by a fix patch for Itanium mangle, now most
SPIR can not be recognized by LLVM 3.9.

V2: Merge some code.
Signed-off-by: Pan Xiuli &lt;xiuli.pan@intel.com&gt;
Reviewed-by: Ruiling Song &lt;ruiling.song@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>GBE: Improve spill policy by considering use count.</title>
<updated>2016-06-24T10:27:52+00:00</updated>
<author>
<name>Ruiling Song</name>
<email>ruiling.song@intel.com</email>
</author>
<published>2016-06-24T08:19:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/beignet.git/commit/?id=4048b7b5e6825fb1a0fd7a11654c5442fe056e9d'/>
<id>4048b7b5e6825fb1a0fd7a11654c5442fe056e9d</id>
<content type='text'>
In this patch, We use usecount/liverange as the spill cost.
And try to minimize the spill cost when do register spilling.
For registers inside loop, we will use 10**loop_depth to approximate
the use count.

When we spill for a scalar register, that is easy, just find
the candidate with least spill cost. But when spilling for a vector
of registers, we need to search in physical register space to make
enough room for the requested size, and then we will choose the group
of registers with least spill cost.

Note I change to always allocate for dst SelectionVector. As dst
SelectionVector normally don't introduce too much register pressure.
Allocating SelectionVector will greatly reduce MOVs. I think we
need to do further optimization for SelectionVector. We need to
do dynamic decision based on register pressure. If allowed, we should
try to allocate SelectionVector as much as possible, if register
pressure not allowed, then we need to try to add extra MOVs or even spilling.

v2:
fix assert in getSpillCost() for tmp register.

Signed-off-by: Ruiling Song &lt;ruiling.song@intel.com&gt;
Reviewed-by: Yang Rong &lt;rong.r.yang@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In this patch, We use usecount/liverange as the spill cost.
And try to minimize the spill cost when do register spilling.
For registers inside loop, we will use 10**loop_depth to approximate
the use count.

When we spill for a scalar register, that is easy, just find
the candidate with least spill cost. But when spilling for a vector
of registers, we need to search in physical register space to make
enough room for the requested size, and then we will choose the group
of registers with least spill cost.

Note I change to always allocate for dst SelectionVector. As dst
SelectionVector normally don't introduce too much register pressure.
Allocating SelectionVector will greatly reduce MOVs. I think we
need to do further optimization for SelectionVector. We need to
do dynamic decision based on register pressure. If allowed, we should
try to allocate SelectionVector as much as possible, if register
pressure not allowed, then we need to try to add extra MOVs or even spilling.

v2:
fix assert in getSpillCost() for tmp register.

Signed-off-by: Ruiling Song &lt;ruiling.song@intel.com&gt;
Reviewed-by: Yang Rong &lt;rong.r.yang@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>GBE: Optimize extraLiveOut register info.</title>
<updated>2016-06-12T08:52:24+00:00</updated>
<author>
<name>Ruiling Song</name>
<email>ruiling.song@intel.com</email>
</author>
<published>2016-06-02T02:21:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/beignet.git/commit/?id=0d65ba8238dcbe8b40a8425f33c4c10c23ae9b1a'/>
<id>0d65ba8238dcbe8b40a8425f33c4c10c23ae9b1a</id>
<content type='text'>
extraLiveout anlysis is used to detect registers defined in loop and
used out-of the loop. Previous logic may also include registers defined
BEFORE loop and live-through loop as extraLiveout, which is not accurate.
As the extraLiveout registers will be forced as non-uniform, which may
waste some register space. Excluding registers that are defined before loop
while used out-of loop will make such registers get correct uniform/non-uniform
information. This would benefit some gemm cl kernel.

also fix a small issue: do intersection when the exit-block has more
than one predecessors.

Signed-off-by: Ruiling Song &lt;ruiling.song@intel.com&gt;
Reviewed-by: Zhigang Gong &lt;zhigang.gong@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
extraLiveout anlysis is used to detect registers defined in loop and
used out-of the loop. Previous logic may also include registers defined
BEFORE loop and live-through loop as extraLiveout, which is not accurate.
As the extraLiveout registers will be forced as non-uniform, which may
waste some register space. Excluding registers that are defined before loop
while used out-of loop will make such registers get correct uniform/non-uniform
information. This would benefit some gemm cl kernel.

also fix a small issue: do intersection when the exit-block has more
than one predecessors.

Signed-off-by: Ruiling Song &lt;ruiling.song@intel.com&gt;
Reviewed-by: Zhigang Gong &lt;zhigang.gong@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
