@Namespace(value="c10::cuda::CUDACachingAllocator") @Properties(inherit=torch_cuda.class) public class CUDAAllocator extends Allocator
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
CUDAAllocator(Pointer p)
Pointer cast constructor.
|
_allocate, raw_allocate, raw_deallocate, raw_deleter
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public CUDAAllocator(Pointer p)
Pointer(Pointer)
.public Pointer raw_alloc_with_stream(@Cast(value="size_t") long nbytes, @Cast(value="cudaStream_t") Pointer stream)
public void raw_delete(Pointer ptr)
public void init(int device_count)
public void setMemoryFraction(double fraction, int device)
public void emptyCache()
public void cacheInfo(int dev_id, @Cast(value="size_t*") SizeTPointer largestBlock)
public Pointer getBaseAllocation(Pointer ptr, @Cast(value="size_t*") SizeTPointer size)
public void recordStream(@Cast(value={"","c10::DataPtr&&"}) @StdMove DataPtr arg0, @ByVal CUDAStream stream)
@ByVal public DeviceStats getDeviceStats(int device)
public void resetAccumulatedStats(int device)
public void resetPeakStats(int device)
@ByVal public SnapshotInfo snapshot()
public void beginAllocateStreamToPool(int device, @Cast(value="cudaStream_t") Pointer stream, @ByVal @Cast(value="c10::cuda::MempoolId_t*") DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair mempool_id)
public void endAllocateStreamToPool(int device, @Cast(value="cudaStream_t") Pointer stream)
public void releasePool(int device, @ByVal @Cast(value="c10::cuda::MempoolId_t*") DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair mempool_id)
@Cast(value="bool") public boolean checkPoolLiveAllocations(int device, @ByVal @Cast(value="c10::cuda::MempoolId_t*") DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair mempool_id, @Const @ByRef PointerSet expected_live_allocations)
@SharedPtr public Pointer getIpcDevPtr(@StdString BytePointer handle)
@SharedPtr public Pointer getIpcDevPtr(@StdString String handle)
public void recordHistory(@Cast(value="bool") boolean enabled, @ByVal @Cast(value="c10::cuda::CUDACachingAllocator::CreateContextFn*") Pointer context_recorder, @Cast(value="size_t") long alloc_trace_max_entries, torch_cuda.RecordContext when)
public void recordHistory(@Cast(value="bool") boolean enabled, @ByVal @Cast(value="c10::cuda::CUDACachingAllocator::CreateContextFn*") Pointer context_recorder, @Cast(value="size_t") long alloc_trace_max_entries, @Cast(value="c10::cuda::CUDACachingAllocator::RecordContext") int when)
public void attachOutOfMemoryObserver(@ByVal @Cast(value="c10::cuda::CUDACachingAllocator::OutOfMemoryObserver*") Pointer observer)
public void enablePeerAccess(int dev, int dev_to_access)
@Cast(value="cudaError_t") public int memcpyAsync(Pointer dst, int dstDevice, @Const Pointer src, int srcDevice, @Cast(value="size_t") long count, @Cast(value="cudaStream_t") Pointer stream, @Cast(value="bool") boolean p2p_enabled)
@SharedPtr(value="c10::cuda::CUDACachingAllocator::AllocatorState") @ByVal public AllocatorState getCheckpointState(int device, @ByVal @Cast(value="c10::cuda::MempoolId_t*") DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair id)
@ByVal public CheckpointDelta setCheckpointPoolState(int device, @SharedPtr(value="c10::cuda::CUDACachingAllocator::AllocatorState") @ByVal AllocatorState pps)
@StdString public BytePointer name()
Copyright © 2024. All rights reserved.