/usr/local/lib64/python3.6/site-packages/torch/include/ATen/cuda
NameSizeModeActions
detail/-0755rm
ATenCUDAGeneral.h1900644editdlrm
cub.cuh115940644editdlrm
CUDAApplyUtils.cuh212900644editdlrm
CUDABlas.h110010644editdlrm
CUDAConfig.h5830644editdlrm
CUDAContext.h22490644editdlrm
CUDADevice.h3520644editdlrm
CUDAEvent.h57380644editdlrm
CUDAGraph.h24370644editdlrm
CUDAGraphsUtils.cuh20130644editdlrm
CUDASolver.h228780644editdlrm
CUDATensorMethods.cuh2700644editdlrm
CUDAUtils.h4280644editdlrm
DeviceUtils.cuh29910644editdlrm
Exceptions.h73870644editdlrm
NumericLimits.cuh52140644editdlrm
PinnedMemoryAllocator.h1670644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/include/ATen/cuda/CUDAContext.h (2249B)
#pragma once #include #include #include #include #ifdef CUDART_VERSION #include #endif #include #include #include #include #include namespace at { namespace cuda { /* A common CUDA interface for ATen. This interface is distinct from CUDAHooks, which defines an interface that links to both CPU-only and CUDA builds. That interface is intended for runtime dispatch and should be used from files that are included in both CPU-only and CUDA builds. CUDAContext, on the other hand, should be preferred by files only included in CUDA builds. It is intended to expose CUDA functionality in a consistent manner. This means there is some overlap between the CUDAContext and CUDAHooks, but the choice of which to use is simple: use CUDAContext when in a CUDA-only file, use CUDAHooks otherwise. Note that CUDAContext simply defines an interface with no associated class. It is expected that the modules whose functions compose this interface will manage their own state. There is only a single CUDA context/state. */ /** * DEPRECATED: use device_count() instead */ inline int64_t getNumGPUs() { return c10::cuda::device_count(); } /** * CUDA is available if we compiled with CUDA, and there are one or more * devices. If we compiled with CUDA but there is a driver problem, etc., * this function will report CUDA is not available (rather than raise an error.) */ inline bool is_available() { return c10::cuda::device_count() > 0; } TORCH_CUDA_CPP_API cudaDeviceProp* getCurrentDeviceProperties(); TORCH_CUDA_CPP_API int warp_size(); TORCH_CUDA_CPP_API cudaDeviceProp* getDeviceProperties(int64_t device); TORCH_CUDA_CPP_API bool canDeviceAccessPeer( int64_t device, int64_t peer_device); TORCH_CUDA_CPP_API Allocator* getCUDADeviceAllocator(); /* Handles */ TORCH_CUDA_CPP_API cusparseHandle_t getCurrentCUDASparseHandle(); TORCH_CUDA_CPP_API cublasHandle_t getCurrentCUDABlasHandle(); #ifdef CUDART_VERSION TORCH_CUDA_CPP_API cusolverDnHandle_t getCurrentCUDASolverDnHandle(); #endif } // namespace cuda } // namespace at