#include <CUDAStream.h>
◆ Unchecked
◆ CUDAStream() [1/2]
c10::cuda::CUDAStream::CUDAStream |
( |
Stream |
stream | ) |
|
|
inlineexplicit |
Construct a CUDAStream from a Stream.
This construction is checked, and will raise an error if the Stream is not, in fact, a CUDA stream.
◆ CUDAStream() [2/2]
c10::cuda::CUDAStream::CUDAStream |
( |
Unchecked |
, |
|
|
Stream |
stream |
|
) |
| |
|
inlineexplicit |
Construct a CUDAStream from a Stream with no error checking.
This constructor uses the "named" constructor idiom, and can be invoked as: CUDAStream(CUDAStream::UNCHECKED, stream)
◆ device()
Device c10::cuda::CUDAStream::device |
( |
| ) |
const |
|
inline |
Get the full Device that this stream is associated with.
The Device is guaranteed to be a CUDA device.
◆ device_index()
DeviceIndex c10::cuda::CUDAStream::device_index |
( |
| ) |
const |
|
inline |
Get the CUDA device index that this stream is associated with.
◆ device_type()
DeviceType c10::cuda::CUDAStream::device_type |
( |
| ) |
const |
|
inline |
Used to avoid baking in device type explicitly to Python-side API.
◆ id()
StreamId c10::cuda::CUDAStream::id |
( |
| ) |
const |
|
inline |
Return the stream ID corresponding to this particular stream.
◆ operator cudaStream_t()
c10::cuda::CUDAStream::operator cudaStream_t |
( |
| ) |
const |
|
inline |
Implicit conversion to cudaStream_t.
◆ operator Stream()
c10::cuda::CUDAStream::operator Stream |
( |
| ) |
const |
|
inline |
Implicit conversion to Stream (a.k.a., forget that the stream is a CUDA stream).
◆ operator!=()
bool c10::cuda::CUDAStream::operator!= |
( |
const CUDAStream & |
other | ) |
const |
|
inlinenoexcept |
◆ operator==()
bool c10::cuda::CUDAStream::operator== |
( |
const CUDAStream & |
other | ) |
const |
|
inlinenoexcept |
◆ pack3()
struct c10::StreamData3 c10::cuda::CUDAStream::pack3 |
( |
| ) |
const |
|
inline |
Reversibly pack a CUDAStream into a struct representation.
Previously the stream's data was packed into a single int64_t, as it was assumed the fields would not require more than 64 bits of storage in total. See https://github.com/pytorch/pytorch/issues/75854 for more information regarding newer platforms that may violate this assumption.
The CUDAStream can be unpacked using unpack().
◆ priority()
int c10::cuda::CUDAStream::priority |
( |
| ) |
const |
|
inline |
◆ priority_range()
static std::tuple< int, int > c10::cuda::CUDAStream::priority_range |
( |
| ) |
|
|
inlinestatic |
◆ query()
bool c10::cuda::CUDAStream::query |
( |
| ) |
const |
|
inline |
◆ stream()
cudaStream_t c10::cuda::CUDAStream::stream |
( |
| ) |
const |
Explicit conversion to cudaStream_t.
◆ synchronize()
void c10::cuda::CUDAStream::synchronize |
( |
| ) |
const |
|
inline |
◆ unpack3()
◆ unwrap()
Stream c10::cuda::CUDAStream::unwrap |
( |
| ) |
const |
|
inline |
Explicit conversion to Stream.
The documentation for this class was generated from the following file: