[llvm] r197498 - Fix code sample in NVPTX examples: now it compiles to PTX and runs as expected.
Eli Bendersky
eliben at google.com
Tue Dec 17 06:14:15 PST 2013
Author: eliben
Date: Tue Dec 17 08:14:15 2013
New Revision: 197498
URL: http://llvm.org/viewvc/llvm-project?rev=197498&view=rev
Log:
Fix code sample in NVPTX examples: now it compiles to PTX and runs as expected.
Modified:
llvm/trunk/docs/NVPTXUsage.rst
Modified: llvm/trunk/docs/NVPTXUsage.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/NVPTXUsage.rst?rev=197498&r1=197497&r2=197498&view=diff
==============================================================================
--- llvm/trunk/docs/NVPTXUsage.rst (original)
+++ llvm/trunk/docs/NVPTXUsage.rst Tue Dec 17 08:14:15 2013
@@ -839,7 +839,7 @@ Libdevice provides an ``__nv_powf`` func
%valB = load float addrspace(1)* %ptrB, align 4
; Compute C = pow(A, B)
- %valC = call float @__nv_exp2f(float %valA, float %valB)
+ %valC = call float @__nv_powf(float %valA, float %valB)
; Store back to C
store float %valC, float addrspace(1)* %ptrC, align 4
@@ -850,7 +850,7 @@ Libdevice provides an ``__nv_powf`` func
!nvvm.annotations = !{!0}
!0 = metadata !{void (float addrspace(1)*,
float addrspace(1)*,
- float addrspace(1)*)* @kernel, metadata !"kernel", i32 1}%
+ float addrspace(1)*)* @kernel, metadata !"kernel", i32 1}
To compile this kernel, we perform the following steps:
More information about the llvm-commits
mailing list