5#include <cuda_runtime_api.h>
10#include <cusolverDn.h>
13#include <ATen/core/ATenGeneral.h>
14#include <ATen/Context.h>
16#include <c10/cuda/CUDAFunctions.h>
17#include <ATen/cuda/Exceptions.h>
47 return c10::cuda::device_count();
56 return c10::cuda::device_count() > 0;
78TORCH_CUDA_CPP_API cusolverDnHandle_t getCurrentCUDASolverDnHandle();
int64_t getNumGPUs()
DEPRECATED: use device_count() instead.
Definition: CUDAContext.h:46
Allocator * getCUDADeviceAllocator()
cudaDeviceProp * getCurrentDeviceProperties()
cudaDeviceProp * getDeviceProperties(int64_t device)
void clearCublasWorkspaces()
cublasHandle_t getCurrentCUDABlasHandle()
bool canDeviceAccessPeer(int64_t device, int64_t peer_device)
cusparseHandle_t getCurrentCUDASparseHandle()
bool is_available()
CUDA is available if we compiled with CUDA, and there are one or more devices.
Definition: CUDAContext.h:55
Definition: TensorBase.h:34