Swarm-NG  1.1
device_settings.cpp File Reference

Implements the function to set up the GPU related parameters. More...

#include "swarm/common.hpp"
#include "device_settings.hpp"

Go to the source code of this file.

Functions

int optimized_system_per_block (int chunk_size, int thread_per_system, int shmem_per_system)
 Find the optimized value for system_per_block based on device parameters.
 
void select_cuda_device (int dev)
 Select cuda device.
 
void set_more_cache ()
 The intent is to tell CUDA driver to use more cache. More...
 
void print_device_information ()
 print out the device information
 
int blocks_per_mp (int blocksize, int shmem_per_block)
 
bool check_cuda_limits (int blocksize, int shmem_per_block)
 Helper function to catch wrong configurations when running a kernel. More...
 

Detailed Description

Implements the function to set up the GPU related parameters.

Definition in file device_settings.cpp.

Function Documentation

int blocks_per_mp ( int  blocksize,
int  shmem_per_block 
)
Todo:
is block_warps computed correctly when blocksize is a multiple of warpSize?

Definition at line 80 of file device_settings.cpp.

Referenced by check_cuda_limits(), and optimized_system_per_block().

bool check_cuda_limits ( int  blocksize,
int  shmem_per_block 
)

Helper function to catch wrong configurations when running a kernel.

It uses the general guidelines from the CUDA Occupancy calculator.

Definition at line 106 of file device_settings.cpp.

References blocks_per_mp().

void set_more_cache ( )

The intent is to tell CUDA driver to use more cache.

But it does not improve performance all the time.

Definition at line 60 of file device_settings.cpp.

Referenced by swarm::init().