aten/src/ATen/cuda/CUDAStream.cpp
// Note: despite not being "unsafe," is using these methods in a multithreaded
// environment then the caller must be sure that streams are valid
// when they're requested. These methods will throw an error if an
// invalid stream is requested.
despite not being "unsafe," is using these methods in a multithreaded
environment then the caller must be sure that streams are valid
when they're requested. These methods will throw an error if an
invalid stream is requested.
despite not being " unsafe " is using these methods in a multithreaded environment then the caller must be sure that streams are valid when they ' re requested . These methods will throw an error if an invalid stream is requested .
CUDAStreamInternals* CUDAStream_getAndRetainCurrentStreamOnDevice(int64_t device) {
    initCUDAStreamsOnce();
    check_gpu(device);
    auto cur = current_streams[device];
    AT_ASSERT(CUDAStream_retain(cur));
    return cur;
  }
CUDAStreamInternals * CUDAStream_getAndRetainCurrentStreamOnDevice ( int64_t device ) { initCUDAStreamsOnce ( ) ; check_gpu ( device ) ; auto cur = current_streams [ device ] ; AT_ASSERT ( CUDAStream_retain ( cur ) ) ; return cur ; }
Note: despite not being "unsafe," is using these methods in a multithreaded
environment then the caller must be sure that streams are valid
when they're requested.
Note : despite not being " unsafe " is using these methods in a multithreaded environment then the caller must be sure that streams are valid when they ' re requested .