<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
On Apr 2, 2015, at 1:55 PM, Artem Belevich <<a href="mailto:tra@google.com" class="">tra@google.com</a>> wrote:<br class="">
<div>
<blockquote type="cite" class=""><br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hi,<br class="">
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On Mon, Mar 30, 2015 at 12:30 PM, Justin Holewinski <span dir="ltr" class="">
<<a href="mailto:jholewinski@nvidia.com" target="_blank" class="">jholewinski@nvidia.com</a>></span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Author: jholewinski<br class="">
Date: Mon Mar 30 14:30:55 2015<br class="">
New Revision: 233583<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=233583&view=rev" target="_blank" class="">
http://llvm.org/viewvc/llvm-project?rev=233583&view=rev</a><br class="">
Log:<br class="">
[NVPTX] Associate a minimum PTX version for each SM architecture<br class="">
<br class="">
</blockquote>
<div class="">... </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTX.td?rev=233583&r1=233582&r2=233583&view=diff" target="_blank" class="">
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTX.td?rev=233583&r1=233582&r2=233583&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/lib/Target/NVPTX/NVPTX.td (original)<br class="">
+++ llvm/trunk/lib/Target/NVPTX/NVPTX.td Mon Mar 30 14:30:55 2015<br class="">
@@ -46,10 +46,6 @@ def SM53 : SubtargetFeature<"sm_53", "Sm<br class="">
                             "Target SM 5.3">;<br class="">
<br class="">
 // PTX Versions<br class="">
-def PTX30 : SubtargetFeature<"ptx30", "PTXVersion", "30",<br class="">
-                             "Use PTX version 3.0">;<br class="">
-def PTX31 : SubtargetFeature<"ptx31", "PTXVersion", "31",<br class="">
-                             "Use PTX version 3.1">;<br class="">
 def PTX32 : SubtargetFeature<"ptx32", "PTXVersion", "32",<br class="">
                              "Use PTX version 3.2">;<br class="">
 def PTX40 : SubtargetFeature<"ptx40", "PTXVersion", "40",<br class="">
@@ -69,12 +65,12 @@ class Proc<string Name, list<SubtargetFe<br class="">
 def : Proc<"sm_20", [SM20]>;<br class="">
 def : Proc<"sm_21", [SM21]>;<br class="">
 def : Proc<"sm_30", [SM30]>;<br class="">
-def : Proc<"sm_32", [SM32]>;<br class="">
+def : Proc<"sm_32", [SM32, PTX40]>;<br class="">
 def : Proc<"sm_35", [SM35]>;<br class="">
</blockquote>
<div class=""><br class="">
</div>
<div class="">Does it mean that SM35/SM37 would still be using PTX3.2? </div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>SM 3.7 requires PTX 4.1, and SM 3.5 uses PTX 3.2.  Note that these are the minimums, you can of course set a higher PTX version.</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" class="">
<div class="gmail_extra">
<div class="gmail_quote">
<div class=""><br class="">
</div>
<div class="">libdevice.compute_35.10.bc that ships with CUDA-7.0 uses "rsqrt.approx.ftz.f64". That instruction was added in PTX4.0 which suggests that SM35/37 may have to bumped to PTX 4.0, too.</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>The libdevice binaries for a particular CUDA release may require the corresponding PTX version released with that toolkit.  CUDA 7.0 uses PTX 4.2, so you should be targeting PTX 4.2 if you are using libdevice.  Regardless of SM architecture, a new PTX
 version may introduce new features.</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" class="">
<div class="gmail_extra">
<div class="gmail_quote">
<div class=""><br class="">
</div>
<div class="">--Artem </div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">

<DIV>
<HR>
</DIV>
<DIV>This email message is for the sole use of the intended recipient(s) and may 
contain confidential information.  Any unauthorized review, use, disclosure 
or distribution is prohibited.  If you are not the intended recipient, 
please contact the sender by reply email and destroy all copies of the original 
message. </DIV>
<DIV>
<HR>
</DIV>
</body>
</html>