@Namespace(value="c10::cuda::CUDACachingAllocator") @Properties(inherit=torch_cuda.class) public class CUDAAllocator extends DeviceAllocator
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
CUDAAllocator(Pointer p)
Pointer cast constructor.
|
emptyCache, emptyCache, getDeviceStats, initialized, resetAccumulatedStats, resetPeakStats_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, trimMemory, 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)
@StdVector public StreamSegmentSize getExpandableSegmentSizes(byte device)
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 ptr, @ByVal CUDAStream stream)
public void recordStream(@StdMove DataPtr ptr, @ByVal Stream stream)
recordStream in class DeviceAllocator@ByVal public SnapshotInfo snapshot(@ByVal(nullValue="c10::MempoolId_t({0, 0})") @Cast(value="c10::MempoolId_t*") DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair mempool_id)
@ByVal public SnapshotInfo snapshot()
public void beginAllocateToPool(byte device,
@ByVal @Cast(value="c10::MempoolId_t*")
DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair mempool_id,
@ByVal
StreamFilter filter)
public void endAllocateToPool(byte device,
@ByVal @Cast(value="c10::MempoolId_t*")
DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair mempool_id)
public void releasePool(byte device,
@ByVal @Cast(value="c10::MempoolId_t*")
DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair mempool_id)
public int getPoolUseCount(byte arg0,
@ByVal @Cast(value="c10::MempoolId_t*")
DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair arg1)
public void createOrIncrefPool(byte arg0,
@ByVal @Cast(value="c10::MempoolId_t*")
DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair arg1,
CUDAAllocator allocator)
public void createOrIncrefPool(byte arg0,
@ByVal @Cast(value="c10::MempoolId_t*")
DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair arg1)
public void setUseOnOOM(byte device,
@ByVal @Cast(value="c10::MempoolId_t*")
DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair mempool_id)
public void setNoSplit(byte device,
@ByVal @Cast(value="c10::MempoolId_t*")
DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair mempool_id)
@Cast(value="bool") public boolean checkPoolLiveAllocations(byte arg0, @ByVal @Cast(value="c10::MempoolId_t*") DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair arg1, @Const @ByRef PointerSet arg2)
@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, @Cast(value="bool") boolean clearHistory)
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, @Cast(value="bool") boolean clearHistory)
public void recordAnnotation(@StdVector StringPair arg0)
public void pushCompileContext(@StdString @ByRef BytePointer md)
public void popCompileContext()
public void setUserMetadata(@StdString BytePointer metadata)
public void setUserMetadata(@StdString String metadata)
@StdString public BytePointer getUserMetadata()
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::MempoolId_t*") DeviceAssertionsDataVectorCUDAKernelLaunchInfoVectorPair id)
@ByVal public CheckpointDelta setCheckpointPoolState(byte device, @SharedPtr(value="c10::cuda::CUDACachingAllocator::AllocatorState") @ByVal AllocatorState pps)
@StdString public BytePointer name()
@ByVal public SizeTPair getMemoryInfo(byte device)
getMemoryInfo in class DeviceAllocatorCopyright © 2026. All rights reserved.