@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, clone, copy_data, is_simple_data_ptr, raw_allocate, raw_deallocate, raw_deleteraddress, 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, zeropublic CUDAAllocator(Pointer p)
Pointer(Pointer).public Pointer raw_alloc_with_stream(@Cast(value="size_t") long nbytes, org.bytedeco.cuda.cudart.CUstream_st stream)
public void raw_delete(Pointer ptr)
public void init(int device_count)
public double getMemoryFraction(byte device)
public void setMemoryFraction(double fraction,
byte device)
public void emptyCache()
public void cacheInfo(byte device,
@Cast(value="size_t*")
SizeTPointer largestBlock)
public Pointer getBaseAllocation(Pointer ptr, @Cast(value="size_t*") SizeTPointer size)
public void recordStream(@StdMove DataPtr arg0, @ByVal CUDAStream stream)
@ByVal public DeviceStats getDeviceStats(byte device)
public void resetAccumulatedStats(byte device)
public void resetPeakStats(byte device)
@ByVal public SnapshotInfo snapshot()
public void beginAllocateToPool(byte device,
@ByVal @Cast(value="c10::cuda::MempoolId_t*")
DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair mempool_id,
@ByVal
StreamFilter filter)
public void endAllocateToPool(byte device,
@ByVal @Cast(value="c10::cuda::MempoolId_t*")
DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair mempool_id)
public void releasePool(byte device,
@ByVal @Cast(value="c10::cuda::MempoolId_t*")
DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair mempool_id)
public int getPoolUseCount(byte device,
@ByVal @Cast(value="c10::cuda::MempoolId_t*")
DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair mempool_id)
public void ensureExistsAndIncrefPool(byte device,
@ByVal @Cast(value="c10::cuda::MempoolId_t*")
DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair mempool_id)
@Cast(value="bool") public boolean checkPoolLiveAllocations(byte device, @ByVal @Cast(value="c10::cuda::MempoolId_t*") DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair mempool_id, @Const @ByRef PointerSet expected_live_allocations)
@ByVal public ShareableHandle shareIpcHandle(Pointer ptr)
@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 recordAnnotation(@StdVector StringPair md)
public void attachOutOfMemoryObserver(@ByVal @Cast(value="c10::cuda::CUDACachingAllocator::OutOfMemoryObserver*") AllocatorTraceTracker observer)
public void attachAllocatorTraceTracker(@ByVal AllocatorTraceTracker tracker)
public void enablePeerAccess(byte dev,
byte 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, org.bytedeco.cuda.cudart.CUstream_st stream, @Cast(value="bool") boolean p2p_enabled)
@SharedPtr(value="c10::cuda::CUDACachingAllocator::AllocatorState") @ByVal public AllocatorState getCheckpointState(byte device, @ByVal @Cast(value="c10::cuda::MempoolId_t*") DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair id)
@ByVal public CheckpointDelta setCheckpointPoolState(byte device, @SharedPtr(value="c10::cuda::CUDACachingAllocator::AllocatorState") @ByVal AllocatorState pps)
@StdString public BytePointer name()
Copyright © 2025. All rights reserved.