Skip to content

nvptx-tools: a collection of tools for use with nvptx-none GCC toolchains.

Notifications You must be signed in to change notification settings

tob2/nvptx-tools

 
 

Repository files navigation

nvptx-tools: a collection of tools for use with nvptx-none GCC toolchains.

  * nvptx-none-as: "assembler" for PTX.
  * nvptx-none-ld: "linker" for PTX.
  * nvptx-none-nm: list symbols.
  * nvptx-none-run: run PTX binaries compiled with -mmainkernel.

Additionally, the following symlinks are installed:

  * nvptx-none-ar: link to the GNU/Linux host system's ar.
  * nvptx-none-ranlib: link to the GNU/Linux host system's ranlib.


Testsuite
---------

    $ make check

In addition to the testsuite of the included libiberty support library
('check-libiberty'), this tests the nvptx-tools using a lit-based testsuite
('check-lit'); see 'test/README'.


DejaGnu Board File
------------------

There is a DejaGnu board file included, nvptx-none-run.exp, which can be used
as follows with the GCC testsuite:

    $ make check DEJAGNU=[build-nvptx-tools]/dejagnu.exp RUNTESTFLAGS='--target_board=nvptx-none-run' [...]

By default, this will use nvptx-none-run found in $PATH, but that can be
overridden by setting the NVPTX_NONE_RUN environment variable.

By default, nvptx-none-run invocation is serialized by means of a lock file.
The default /tmp/gpu.lock may be overridden by setting the
NVPTX_NONE_EXECUTION_LOCK_FILE environment variable.  Set it to the empty
string to disable locking.


Nvidia CUDA/PTX Dependency
--------------------------

The nvptx-tools are used for interfacing nvptx-none GCC toolchains with Nvidia
tools and GPUs via Nvidia CUDA/PTX.

Individual nvptx-tools depend on CUDA/PTX as follows:

  * nvptx-none-as

    In addition to its own minimalistic verification, it verifies the output
    file produced by feeding it into 'ptxas'.  If (at run time) that executable
    isn't available in the standard search path, this verification step is
    skipped (output file assumed compliant).

    Unless overridden with the '-m' option, the target architecture used for
    'ptxas' verification ('--gpu-name' option to 'ptxas') is deduced from the
    '.target' directive in the input's preamble.  As support for the Kepler
    microarchitecture in 'ptxas' has been removed in CUDA 11.0 through 12.0,
    sm_3x code is verified with '--gpu-name sm_50'.

  * nvptx-none-run

    Uses the CUDA Driver library ('libcuda') to run PTX binaries.

Support for sm_50 was introduced with PTX ISA 4.0, CUDA 6.0, driver r331, and
remains supported at this time (CUDA 12.2.2).


Certain testcases for the nvptx-tools have dependencies as follows:

  * nvptx-none-as

    Testcases depending on 'ptxas' are UNSUPPORTED if 'ptxas' isn't available.

  * nvptx-none-run

    Testcases depending on this tool are UNSUPPORTED if it isn't available.
    Otherwise, if no suitable CUDA Driver library or Nvidia GPU are available
    (at run time), certain testcases FAIL.


With reduced functionality as indicated, it's possible to build, test, and use
the nvptx-tools without a CUDA installation.


Report Issues
-------------

Report issues to <https://github.com/SourceryTools/nvptx-tools/issues>.

About

nvptx-tools: a collection of tools for use with nvptx-none GCC toolchains.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 88.2%
  • C++ 4.5%
  • Makefile 3.1%
  • M4 2.1%
  • Shell 0.9%
  • Assembly 0.7%
  • Other 0.5%