Lines Matching refs:code

35 callable by device code, and *kernel functions*, which are callable by host
36 code. By default, the back-end will emit device functions. Metadata is used to
40 .. code-block:: text
46 function ``@my_kernel`` is callable from host code, but ``@my_fmad`` is not.
48 .. code-block:: llvm
66 When compiled, the PTX kernel functions are callable by host-side code.
95 .. code-block:: llvm
99 LLVM IR functions can read and write to this array, and host-side code can
111 The NVPTX target uses the module triple to select between 32/64-bit code
115 interface used by the generated code to communicate with the driver. Most
141 .. code-block:: llvm
169 .. code-block:: llvm
202 .. code-block:: llvm
244 .. code-block:: llvm
276 To accommodate various math-related compiler flags that can affect code
277 generation of libdevice code, the library code depends on a special LLVM IR
281 code often follows a pattern:
283 .. code-block:: c++
313 often leave behind dead code of the form:
315 .. code-block:: llvm
323 ; Dead code
327 optimization pipeline before dead-code elimination.
330 of your pass manager; just use the following code when setting up your pass
333 .. code-block:: c++
344 control code generation:
349 ``__CUDA_FTZ=[0,1]`` Use optimized code paths that flush subnormals to zero
355 .. code-block:: llvm
369 JIT compilation of PTX code to native GPU machine code.
373 .. code-block:: c++
387 .. code-block:: c++
425 .. code-block:: llvm
464 We can use the LLVM ``llc`` tool to directly run the NVPTX code generator:
466 .. code-block:: text
473 If you want to generate 32-bit code, change ``p:64:64:64`` to ``p:32:32:32``
480 .. code-block:: text
533 .. code-block:: llvm
539 .. code-block:: llvm
578 There is also a fifth address space used by the NVPTX code generator that
592 program), or a `device` function (callable only from GPU code). You can think
601 .. code-block:: text
607 .. code-block:: llvm
625 execute our vector addition code is shown below. Note that for brevity this
626 code does not perform much error checking!
631 compile PTX to machine code (SASS) for a specific GPU architecture. Such
636 .. code-block:: c++
761 .. code-block:: text
771 .. code-block:: text
807 .. code-block:: llvm
862 .. code-block:: text
877 .. code-block:: text