Sophie

Sophie

distrib > Mageia > 7 > x86_64 > media > nonfree-updates > by-pkgid > b86a85131cc739c1c53d0b55840a4328 > files > 6176

nvidia-cuda-toolkit-devel-10.1.168-1.2.mga7.nonfree.x86_64.rpm

.TH "Initialization and Cleanup" 3 "24 Apr 2019" "Version 1.1" "NVML" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Initialization and Cleanup \- 
.SS "Defines"

.in +1c
.ti -1c
.RI "#define \fBNVML_INIT_FLAG_NO_GPUS\fP   1"
.br
.RI "\fIDon't fail \fBnvmlInit()\fP when no GPUs are found. \fP"
.ti -1c
.RI "#define \fBNVML_INIT_FLAG_NO_ATTACH\fP   2"
.br
.RI "\fIDon't attach GPUs. \fP"
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBnvmlReturn_t\fP DECLDIR \fBnvmlInit\fP (void)"
.br
.ti -1c
.RI "\fBnvmlReturn_t\fP DECLDIR \fBnvmlInitWithFlags\fP (unsigned int flags)"
.br
.ti -1c
.RI "\fBnvmlReturn_t\fP DECLDIR \fBnvmlShutdown\fP (void)"
.br
.in -1c
.SH "Detailed Description"
.PP 
This chapter describes the methods that handle NVML initialization and cleanup. It is the user's responsibility to call \fBnvmlInit()\fP before calling any other methods, and \fBnvmlShutdown()\fP once NVML is no longer being used. 
.SH "Function Documentation"
.PP 
.SS "\fBnvmlReturn_t\fP DECLDIR nvmlInit (void)"
.PP
Initialize NVML, but don't initialize any GPUs yet.
.PP
\fBNote:\fP
.RS 4
nvmlInit_v3 introduces a 'flags' argument, that allows passing boolean values modifying the behaviour of \fBnvmlInit()\fP. 
.PP
In NVML 5.319 new nvmlInit_v2 has replaced nvmlInit'_v1' (default in NVML 4.304 and older) that did initialize all GPU devices in the system.
.RE
.PP
This allows NVML to communicate with a GPU when other GPUs in the system are unstable or in a bad state. When using this API, GPUs are discovered and initialized in nvmlDeviceGetHandleBy* functions instead.
.PP
\fBNote:\fP
.RS 4
To contrast nvmlInit_v2 with nvmlInit'_v1', NVML 4.304 nvmlInit'_v1' will fail when any detected GPU is in a bad or unstable state.
.RE
.PP
For all products.
.PP
This method, should be called once before invoking any other methods in the library. A reference count of the number of initializations is maintained. Shutdown only occurs when the reference count reaches zero.
.PP
\fBReturns:\fP
.RS 4
.IP "\(bu" 2
\fBNVML_SUCCESS\fP if NVML has been properly initialized
.IP "\(bu" 2
\fBNVML_ERROR_DRIVER_NOT_LOADED\fP if NVIDIA driver is not running
.IP "\(bu" 2
\fBNVML_ERROR_NO_PERMISSION\fP if NVML does not have permission to talk to the driver
.IP "\(bu" 2
\fBNVML_ERROR_UNKNOWN\fP on any unexpected error 
.PP
.RE
.PP

.SS "\fBnvmlReturn_t\fP DECLDIR nvmlInitWithFlags (unsigned int flags)"
.PP
nvmlInitWithFlags is a variant of \fBnvmlInit()\fP, that allows passing a set of boolean values modifying the behaviour of \fBnvmlInit()\fP. Other than the 'flags' parameter it is completely similar to \fBnvmlInit\fP.
.PP
For all products.
.PP
\fBParameters:\fP
.RS 4
\fIflags\fP behaviour modifier flags
.RE
.PP
\fBReturns:\fP
.RS 4
.IP "\(bu" 2
\fBNVML_SUCCESS\fP if NVML has been properly initialized
.IP "\(bu" 2
\fBNVML_ERROR_DRIVER_NOT_LOADED\fP if NVIDIA driver is not running
.IP "\(bu" 2
\fBNVML_ERROR_NO_PERMISSION\fP if NVML does not have permission to talk to the driver
.IP "\(bu" 2
\fBNVML_ERROR_UNKNOWN\fP on any unexpected error 
.PP
.RE
.PP

.SS "\fBnvmlReturn_t\fP DECLDIR nvmlShutdown (void)"
.PP
Shut down NVML by releasing all GPU resources previously allocated with \fBnvmlInit()\fP.
.PP
For all products.
.PP
This method should be called after NVML work is done, once for each call to \fBnvmlInit()\fP A reference count of the number of initializations is maintained. Shutdown only occurs when the reference count reaches zero. For backwards compatibility, no error is reported if \fBnvmlShutdown()\fP is called more times than \fBnvmlInit()\fP.
.PP
\fBReturns:\fP
.RS 4
.IP "\(bu" 2
\fBNVML_SUCCESS\fP if NVML has been properly shut down
.IP "\(bu" 2
\fBNVML_ERROR_UNINITIALIZED\fP if the library has not been successfully initialized
.IP "\(bu" 2
\fBNVML_ERROR_UNKNOWN\fP on any unexpected error 
.PP
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for NVML from the source code.