@Namespace(value="c10::impl") @Properties(inherit=torch.class) public class DeviceGuardImplInterface extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
DeviceGuardImplInterface(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
block(Pointer arg0,
Stream arg1)
Does nothing if the event has not been scheduled to be recorded.
|
void |
destroyEvent(Pointer arg0,
byte arg1)
Destroys the given event.
|
byte |
deviceCount()
Get the number of devices.
|
Device |
exchangeDevice(Device arg0)
Set the current device to Device, and return the previous Device.
|
Stream |
exchangeStream(Stream arg0)
Set a stream to be the thread local current stream for its device.
|
Stream |
getDefaultStream(Device arg0)
Get the default stream for a given device.
|
Device |
getDevice()
Get the current device.
|
Stream |
getStream(Device arg0)
Get the current stream for a given device.
|
Stream |
getStreamFromGlobalPool(Device arg0) |
Stream |
getStreamFromGlobalPool(Device arg0,
boolean isHighPriority)
Get a stream from the global pool for a given device.
|
boolean |
queryEvent(Pointer arg0)
Returns true if (and only if)
(1) the event has never been scheduled to be recorded
(2) the current version is marked as recorded.
|
boolean |
queryStream(Stream arg0)
Return true if all the work previously enqueued on the stream for
asynchronous execution has completed running on the device.
|
void |
record(PointerPointer arg0,
Stream arg1,
byte arg2,
torch.EventFlag arg3)
Increments the event's version and enqueues a job with this version
in the stream's work queue.
|
void |
record(Pointer arg0,
Stream arg1,
byte arg2,
int arg3) |
void |
record(Pointer arg0,
Stream arg1,
byte arg2,
torch.EventFlag arg3) |
void |
recordDataPtrOnStream(DataPtr arg0,
Stream arg1)
Ensure the caching allocator (if any) is aware that the given DataPtr is
being used on the given stream, and that it should thus avoid recycling the
DataPtr until all work on that stream is done.
|
void |
setDevice(Device arg0)
Set the current device to Device.
|
void |
synchronizeStream(Stream arg0)
Wait (by blocking the calling thread) until all the work previously
enqueued on the stream has completed running on the device.
|
torch.DeviceType |
type()
Return the type of device managed by this guard implementation.
|
void |
uncheckedSetDevice(Device arg0)
Set the current device to Device, without checking for errors
(so, e.g., this can be called from a destructor).
|
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 DeviceGuardImplInterface(Pointer p)
Pointer(Pointer)
.public torch.DeviceType type()
@ByVal public Device exchangeDevice(@ByVal Device arg0)
@NoException(value=true) public void uncheckedSetDevice(@ByVal Device arg0)
@ByVal @NoException(value=true) public Stream getStream(@ByVal Device arg0)
@ByVal public Stream getDefaultStream(@ByVal Device arg0)
@ByVal public Stream getStreamFromGlobalPool(@ByVal Device arg0, @Cast(value="bool") boolean isHighPriority)
@ByVal @NoException(value=true) public Stream exchangeStream(@ByVal Stream arg0)
@NoException(value=true) public void destroyEvent(Pointer arg0, @Cast(value="const c10::DeviceIndex") byte arg1)
public void record(@Cast(value="void**") PointerPointer arg0, @Const @ByRef Stream arg1, @Cast(value="const c10::DeviceIndex") byte arg2, torch.EventFlag arg3)
public void record(@Cast(value="void**") @ByPtrPtr Pointer arg0, @Const @ByRef Stream arg1, @Cast(value="const c10::DeviceIndex") byte arg2, torch.EventFlag arg3)
public void record(@Cast(value="void**") @ByPtrPtr Pointer arg0, @Const @ByRef Stream arg1, @Cast(value="const c10::DeviceIndex") byte arg2, @Cast(value="c10::EventFlag") int arg3)
public void block(Pointer arg0, @Const @ByRef Stream arg1)
@Cast(value="bool") public boolean queryEvent(Pointer arg0)
@Cast(value="c10::DeviceIndex") @NoException(value=true) public byte deviceCount()
@Cast(value="bool") public boolean queryStream(@Const @ByRef Stream arg0)
public void synchronizeStream(@Const @ByRef Stream arg0)
public void recordDataPtrOnStream(@Cast(value={"","c10::DataPtr&&"}) @StdMove DataPtr arg0, @Const @ByRef Stream arg1)
Copyright © 2024. All rights reserved.