mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Pull Request resolved: https://github.com/pytorch/pytorch/pull/117829 Approved by: https://github.com/albanD
21 lines
504 B
C
21 lines
504 B
C
#ifndef THCP_STREAM_INC
|
|
#define THCP_STREAM_INC
|
|
|
|
#include <c10/cuda/CUDAStream.h>
|
|
#include <torch/csrc/Stream.h>
|
|
#include <torch/csrc/python_headers.h>
|
|
|
|
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init)
|
|
struct THCPStream : THPStream {
|
|
at::cuda::CUDAStream cuda_stream;
|
|
};
|
|
extern PyObject* THCPStreamClass;
|
|
|
|
void THCPStream_init(PyObject* module);
|
|
|
|
inline bool THCPStream_Check(PyObject* obj) {
|
|
return THCPStreamClass && PyObject_IsInstance(obj, THCPStreamClass);
|
|
}
|
|
|
|
#endif // THCP_STREAM_INC
|