<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">
<blockquote type="cite">
<pre wrap="">So there's no way to make vector elements to work items, and execute
only one instruction? I should read the specs more carefully.</pre>
</blockquote>
<br>
No, at least not a halve way sane one. Work items are controlled
by the application, e.g. it's the parallelization of work into
different execution thread as exposed by interfaces like OpenCL or
OpenGL.<br>
<br>
But the vector instructions of LLVM are parallelization of work by
working on multiple data elements in the same thread.<br>
<br>
Don't be confused allot of people mix that up,<br>
Christian.<br>
<br>
Am 22.04.2014 03:16, schrieb Jan Vesely:<br>
</div>
<blockquote cite="mid:1398129375.15840.6.camel@adriatix" type="cite">
<pre wrap="">On Mon, 2014-04-21 at 13:51 -0700, Tom Stellard wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On Sun, Apr 20, 2014 at 04:57:51PM -0400, Jan Vesely wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Signed-off-by: Jan Vesely <a class="moz-txt-link-rfc2396E" href="mailto:jan.vesely@rutgers.edu"><jan.vesely@rutgers.edu></a>
---
lib/Target/R600/R600ISelLowering.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/lib/Target/R600/R600ISelLowering.cpp b/lib/Target/R600/R600ISelLowering.cpp
index ecffee2..a6304d8 100644
--- a/lib/Target/R600/R600ISelLowering.cpp
+++ b/lib/Target/R600/R600ISelLowering.cpp
@@ -141,6 +141,17 @@ R600TargetLowering::R600TargetLowering(TargetMachine &TM) :
setTargetDAGCombine(ISD::SELECT_CC);
setTargetDAGCombine(ISD::INSERT_VECTOR_ELT);
+ static const MVT::SimpleValueType FloatTypes[] = {
+ MVT::v2f32, MVT::v4f32
+ };
+ const size_t NumFloatTypes = array_lengthof(FloatTypes);
+
+ for (unsigned int x = 0; x < NumFloatTypes; ++x) {
+ MVT::SimpleValueType VT = FloatTypes[x];
+ setOperationAction(ISD::FCOS, VT, Expand);
+ setOperationAction(ISD::FSIN, VT, Expand);
+ }
+
</pre>
</blockquote>
<pre wrap="">
There actually aren't vector instructions for these on SI, so this
should go in AMDGPUISelLowering.cpp. It's confusing because the instructions
V_SIN_F32 and V_COS_F32 are 'Vector Instructions', but in this case it means they
execute on a vector of work items, and each work item provides scalar input.
</pre>
</blockquote>
<pre wrap="">
So there's no way to make vector elements to work items, and execute
only one instruction? I should read the specs more carefully.
I've attached v2, simplified and squashed with tests(including SI).
regards,
Jan
</pre>
<blockquote type="cite">
<pre wrap="">
-Tom
</pre>
<blockquote type="cite">
<pre wrap=""> setOperationAction(ISD::GlobalAddress, MVT::i32, Custom);
setBooleanContents(ZeroOrNegativeOneBooleanContent);
--
1.9.0
_______________________________________________
llvm-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
</pre>
</blockquote>
</blockquote>
<pre wrap="">
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
llvm-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
</pre>
</blockquote>
<br>
</body>
</html>