SyTen

◆ setup() [2/2]

void syten::Cuda::setup ( [[maybe_unused] ] Vec< std::int16_t > const &  devices)

Sets up CUDA to allow the specified devices and generates the associated cuBLAS handles for the calling thread.

Remarks
Subsequently-created OpenMP threads will have to create their own handles once required at some runtime cost. Take this into account when benchmarking. Unfortunately cuBLAS is (despite the documentation stating otherwise) not thread-safe.

References allocator, std::vector< T >::begin(), cuda_handle_error, std::vector< T >::end(), syten::Cuda::CudaAllocator::free(), syten::Cuda::CudaAllocator::initialise(), initialise_handles(), std::iota(), syten::logGD(), mem_status(), select_device(), and set_allowed_devices().

+ Here is the call graph for this function: