public class torch_cuda extends torch_cuda
Modifier and Type | Class and Description |
---|---|
static class |
torch_cuda.RecordContext |
static class |
torch_cuda.StatType |
Modifier and Type | Field and Description |
---|---|
static int |
C10_COMPILE_TIME_MAX_GPUS
The maximum number of GPUs that we recognizes.
|
static int |
max_compile_time_stream_priorities |
Constructor and Description |
---|
torch_cuda() |
Modifier and Type | Method and Description |
---|---|
static BytePointer |
_cublasGetErrorEnum(int error) |
static BytePointer |
_cusolver_backend_suggestion() |
static int |
C10_CUDA_DSA_ASSERTION_COUNT()
Number of assertion failure messages we can store.
|
static int |
C10_CUDA_DSA_MAX_STR_LEN() |
static boolean |
canDeviceAccessPeer(long device,
long peer_device) |
static void |
clearCublasWorkspaces() |
static Tensor |
contiguousIfZeroInStrides(Tensor t) |
static int |
currentStreamCaptureStatusMayInitCtx() |
static BytePointer |
cusolverGetErrorMessage(int status) |
static BytePointer |
cusparseGetErrorString(int status) |
static int |
dataSize(int dataType) |
static CUDAAllocator |
getAllocator() |
static Allocator |
getCUDADeviceAllocator() |
static int |
getCudnnDataTypeFromScalarType(torch.ScalarType dtype) |
static Pointer |
getCudnnHandle() |
static Pointer |
getCurrentCUDABlasHandle() |
static Pointer |
getCurrentCUDASolverDnHandle() |
static Pointer |
getCurrentCUDASparseHandle() |
static CUDAStream |
getCurrentCUDAStream() |
static CUDAStream |
getCurrentCUDAStream(byte device_index)
Get the current CUDA stream, for the passed CUDA device, or for the
current device if no device index is passed.
|
static Pointer |
getCurrentDeviceProperties() |
static CUDAStream |
getDefaultCUDAStream() |
static CUDAStream |
getDefaultCUDAStream(byte device_index)
Get the default CUDA stream, for the passed CUDA device, or for the
current device if no device index is passed.
|
static Pointer |
getDeviceProperties(long device) |
static long |
getNumGPUs()
DEPRECATED: use device_count() instead
|
static CUDAStream |
getStreamFromExternal(Pointer ext_stream,
byte device_index)
Get a CUDAStream from a externally allocated one.
|
static CUDAStream |
getStreamFromPool() |
static CUDAStream |
getStreamFromPool(boolean isHighPriority,
byte device)
Get a new stream from the CUDA stream pool.
|
static CUDAStream |
getStreamFromPool(int priority) |
static CUDAStream |
getStreamFromPool(int priority,
byte device) |
static boolean |
is_available()
CUDA is available if we compiled with CUDA, and there are one or more
devices.
|
static Generator |
make_generator_cuda() |
static Generator |
make_generator_cuda(byte device_index) |
static int |
max_compile_time_stream_priorities()
Construct an ArrayRef from a C array.
|
static void |
setAllocatorSettings(BytePointer env) |
static void |
setAllocatorSettings(String env) |
static void |
setCurrentCUDAStream(CUDAStream stream)
Set the current stream on the device of the passed in stream to be
the passed in stream.
|
static Pointer |
shiftLeft(Pointer stream,
CUDAStream s) |
static Pointer |
shiftLeft(Pointer os,
int status) |
static int |
warp_size() |
init, map
public static final int max_compile_time_stream_priorities
public static final int C10_COMPILE_TIME_MAX_GPUS
@Namespace(value="at") @ByVal @Name(value="make_generator<at::CUDAGeneratorImpl>") public static Generator make_generator_cuda()
@Namespace(value="at") @ByVal @Name(value="make_generator<at::CUDAGeneratorImpl,int8_t>") public static Generator make_generator_cuda(@Cast(value="int8_t&&") byte device_index)
@Namespace(value="c10::cuda") @MemberGetter public static int max_compile_time_stream_priorities()
@Namespace(value="c10::cuda") @ByVal public static CUDAStream getStreamFromPool(@Cast(value="const bool") boolean isHighPriority, byte device)
@Namespace(value="c10::cuda") @ByVal public static CUDAStream getStreamFromPool()
@Namespace(value="c10::cuda") @ByVal public static CUDAStream getStreamFromPool(int priority, byte device)
@Namespace(value="c10::cuda") @ByVal public static CUDAStream getStreamFromPool(int priority)
@Namespace(value="c10::cuda") @ByVal public static CUDAStream getStreamFromExternal(@Cast(value="cudaStream_t") Pointer ext_stream, byte device_index)
@Namespace(value="c10::cuda") @ByVal public static CUDAStream getDefaultCUDAStream(byte device_index)
@Namespace(value="c10::cuda") @ByVal public static CUDAStream getDefaultCUDAStream()
@Namespace(value="c10::cuda") @ByVal public static CUDAStream getCurrentCUDAStream(byte device_index)
@Namespace(value="c10::cuda") @ByVal public static CUDAStream getCurrentCUDAStream()
@Namespace(value="c10::cuda") public static void setCurrentCUDAStream(@ByVal CUDAStream stream)
@Namespace(value="c10::cuda") @Cast(value="std::ostream*") @ByRef @Name(value="operator <<") public static Pointer shiftLeft(@Cast(value="std::ostream*") @ByRef Pointer stream, @Const @ByRef CUDAStream s)
@Namespace(value="at::cuda") @Cast(value="int64_t") public static long getNumGPUs()
@Namespace(value="at::cuda") @Cast(value="bool") public static boolean is_available()
@Namespace(value="at::cuda") public static Pointer getCurrentDeviceProperties()
@Namespace(value="at::cuda") public static int warp_size()
@Namespace(value="at::cuda") public static Pointer getDeviceProperties(@Cast(value="int64_t") long device)
@Namespace(value="at::cuda") @Cast(value="bool") public static boolean canDeviceAccessPeer(@Cast(value="int64_t") long device, @Cast(value="int64_t") long peer_device)
@Namespace(value="at::cuda") public static Allocator getCUDADeviceAllocator()
@Namespace(value="at::cuda") @Cast(value="cusparseHandle_t") public static Pointer getCurrentCUDASparseHandle()
@Namespace(value="at::cuda") @Cast(value="cublasHandle_t") public static Pointer getCurrentCUDABlasHandle()
@Namespace(value="at::cuda") public static void clearCublasWorkspaces()
@Namespace(value="at::cuda") @Cast(value="cusolverDnHandle_t") public static Pointer getCurrentCUDASolverDnHandle()
@MemberGetter public static int C10_CUDA_DSA_ASSERTION_COUNT()
@MemberGetter public static int C10_CUDA_DSA_MAX_STR_LEN()
@Namespace(value="at::cuda::blas") @Cast(value="const char*") public static BytePointer _cublasGetErrorEnum(@Cast(value="cublasStatus_t") int error)
@Cast(value="const char*") public static BytePointer cusparseGetErrorString(@Cast(value="cusparseStatus_t") int status)
@Namespace(value="at::cuda::solver") @Cast(value="const char*") public static BytePointer cusolverGetErrorMessage(@Cast(value="cusolverStatus_t") int status)
@Namespace(value="at::cuda::solver") @MemberGetter @Cast(value="const char*") public static BytePointer _cusolver_backend_suggestion()
@Namespace(value="at::native") @ByVal public static Tensor contiguousIfZeroInStrides(@Const @ByRef Tensor t)
@Namespace(value="at::native") @Cast(value="cudnnHandle_t") public static Pointer getCudnnHandle()
@Namespace(value="c10::cuda") @Cast(value="std::ostream*") @ByRef @Name(value="operator <<") public static Pointer shiftLeft(@Cast(value="std::ostream*") @ByRef Pointer os, @Cast(value="c10::cuda::CaptureStatus") int status)
@Namespace(value="c10::cuda") @Cast(value="c10::cuda::CaptureStatus") public static int currentStreamCaptureStatusMayInitCtx()
@Namespace(value="c10::cuda::CUDACachingAllocator") public static void setAllocatorSettings(@StdString BytePointer env)
@Namespace(value="c10::cuda::CUDACachingAllocator") public static void setAllocatorSettings(@StdString String env)
@Namespace(value="c10::cuda::CUDACachingAllocator") @Name(value="get") public static CUDAAllocator getAllocator()
@Namespace(value="at::native") public static int dataSize(@Cast(value="cudnnDataType_t") int dataType)
@Namespace(value="at::native") @Cast(value="cudnnDataType_t") public static int getCudnnDataTypeFromScalarType(torch.ScalarType dtype)
Copyright © 2024. All rights reserved.