-
Notifications
You must be signed in to change notification settings - Fork 11
/
README
90 lines (56 loc) · 2.93 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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>.