HiRep 0.1
Loading...
Searching...
No Matches
gpu_info.c File Reference

Prints information on available hardware and software on the cluster relating to GPUs. More...

#include "io.h"
#include "error.h"
#include "gpu.h"
#include "mpi.h"
#include <mpi-ext.h>
Include dependency graph for gpu_info.c:

Functions

void print_device_count_info (input_gpu gpu_var_init)
 Query number of GPUs and print related information.
 
void print_software_info (cudaDeviceProp device_prop)
 Print CUDA driver and runtime version information.
 
void print_global_memory_info (cudaDeviceProp device_prop, input_gpu gpu_var_init)
 Print Global memory information including bandwidth paramters and supported features.
 
void print_shared_memory_info (cudaDeviceProp device_prop)
 Print information on shared memory.
 
void print_cache_info (cudaDeviceProp device_prop, input_gpu gpu_var_init)
 Print (L2) cache information.
 
void print_constant_memory_info (cudaDeviceProp device_prop)
 Print information on constant memory, in particular amount available, alignment, texture and layered texture memory paramters.
 
void print_memory_info (cudaDeviceProp device_prop, input_gpu gpu_var_init)
 Prints all memory related info, here on global, shared memory, cache and constant memory, see resp. functions for more information.
 
void print_compute_info (cudaDeviceProp device_prop, input_gpu gpu_var_init)
 Prints information on compute parameters.
 
void print_supported_features (cudaDeviceProp device_prop)
 Checks for a number of other supported features and prints information on them.
 
void print_performance_metrics ()
 Prints peak performance metric estimates. This allows to check, whether we are fully utilizing the capabilities of the hardware.
 
void print_hardware_info (cudaDeviceProp device_prop, input_gpu gpu_var_init)
 Prints all information on hardware, meaning memory, compute and features (no driver and runtime info). This assumes CUDART >= 4000.
 

Variables

const char * sComputeMode []
 

Detailed Description

Prints information on available hardware and software on the cluster relating to GPUs.

Function Documentation

◆ print_cache_info()

void print_cache_info ( cudaDeviceProp device_prop,
input_gpu gpu_var_init )

Print (L2) cache information.

Parameters
cudaDevicePropA CUDA class containing information on the device.
input_gpuA struct containing parameters on the current GPU.

◆ print_compute_info()

void print_compute_info ( cudaDeviceProp device_prop,
input_gpu gpu_var_init )

Prints information on compute parameters.

Parameters
cudaDevicePropA CUDA class containing information on the device.
input_gpuA struct containing parameters on the current GPU.

◆ print_constant_memory_info()

void print_constant_memory_info ( cudaDeviceProp device_prop)

Print information on constant memory, in particular amount available, alignment, texture and layered texture memory paramters.

Parameters
cudaDevicePropA CUDA class containing information on the device.

◆ print_device_count_info()

void print_device_count_info ( input_gpu gpu_var_init)

Query number of GPUs and print related information.

Parameters
input_gpuA struct containing parameters on the current GPU.

◆ print_global_memory_info()

void print_global_memory_info ( cudaDeviceProp device_prop,
input_gpu gpu_var_init )

Print Global memory information including bandwidth paramters and supported features.

Parameters
cudaDevicePropA CUDA class containing information on the device.
input_gpuA struct containing parameters on the current GPU.

◆ print_hardware_info()

void print_hardware_info ( cudaDeviceProp device_prop,
input_gpu gpu_var_init )

Prints all information on hardware, meaning memory, compute and features (no driver and runtime info). This assumes CUDART >= 4000.

Parameters
input_gpuA struct containing parameters on the current GPU.

◆ print_memory_info()

void print_memory_info ( cudaDeviceProp device_prop,
input_gpu gpu_var_init )

Prints all memory related info, here on global, shared memory, cache and constant memory, see resp. functions for more information.

Parameters
cudaDevicePropA CUDA class containing information on the device.
input_gpuA struct containing parameters on the current GPU.

◆ print_performance_metrics()

void print_performance_metrics ( )

Prints peak performance metric estimates. This allows to check, whether we are fully utilizing the capabilities of the hardware.

Code snippet based on: https://developer.nvidia.com/blog/how-query-device-properties-and-handle-errors-cuda-cc/ Access 2023-02-27

◆ print_shared_memory_info()

void print_shared_memory_info ( cudaDeviceProp device_prop)

Print information on shared memory.

Parameters
cudaDevicePropA CUDA class containing information on the device.

◆ print_software_info()

void print_software_info ( cudaDeviceProp device_prop)

Print CUDA driver and runtime version information.

Print CUDA software version information (runtime and driver version)

Parameters
input_gpuA struct containing parameters on the current GPU.

◆ print_supported_features()

void print_supported_features ( cudaDeviceProp device_prop)

Checks for a number of other supported features and prints information on them.

Parameters
cudaDevicePropA CUDA class containing information on the device.

Variable Documentation

◆ sComputeMode

const char* sComputeMode[]
Initial value:
= {
"Default (multiple host threads can use ::cudaSetDevice() with device simultaneously)",
"Exclusive (only one host thread in one process is able to use ::cudaSetDevice() with this device)",
"Prohibited (no host thread can use ::cudaSetDevice() with this device)",
"Exclusive Process (many threads in one process is able to use ::cudaSetDevice() with this device)",
"Unknown",
NULL
}