Class XPUStream¶
Defined in File XPUStream.h
Page Contents
Class Documentation¶
-
class XPUStream¶
-
Public Functions
-
inline explicit XPUStream(Stream stream)¶
Construct a XPUStream from a Stream.
This construction is checked, and will raise an error if the Stream is not, in fact, a XPU stream.
-
inline explicit XPUStream(Unchecked, Stream stream)¶
Construct a XPUStream from a Stream with no error checking.
-
inline operator sycl::queue&() const¶
Implicit conversion to sycl::queue&.
-
inline operator Stream() const¶
Implicit conversion to Stream (a.k.a., forget that the stream is a XPU stream).
-
inline DeviceType device_type() const¶
Get the XPU device type that this stream is associated with.
-
inline DeviceIndex device_index() const¶
Get the XPU device index that this stream is associated with.
-
inline Device device() const¶
Get the full Device that this stream is associated with.
The Device is guaranteed to be a XPU device.
-
inline StreamId id() const¶
Return the stream ID corresponding to this particular stream.
StreamId is a int64_t representation generated by its type and index.
-
inline bool query() const¶
Return true if all enqueued tasks in this stream have been completed, otherwise return false.
-
inline void synchronize() const¶
Performs a blocking wait for the completion of all enqueued tasks in this stream.
-
int priority() const¶
Return the priority that this stream is associated with.
Lower numbers represent higher priority.
-
sycl::queue &queue() const¶
Explicit conversion to sycl::queue&.
-
inline Stream unwrap() const¶
Explicit conversion to Stream.
Public Static Functions
-
static inline XPUStream unpack3(StreamId stream_id, DeviceIndex device_index, DeviceType device_type)¶
-
static inline std::tuple<int, int> priority_range()¶
Return the range of priority supported by PyTorch.
-
inline explicit XPUStream(Stream stream)¶