aten/src/ATen/cuda/CUDAStream.cpp
// Creates (and retains) and new cuda stream
Creates (and retains) and new cuda stream
Creates ( and retains ) and new cuda stream
CUDAStreamInternals* CUDAStream_createAndRetainWithOptions(int32_t flags, int32_t priority) {
    CUDAStreamInternals* internals = (CUDAStreamInternals*) malloc(sizeof(CUDAStreamInternals));
    internals->is_destructible = true;
    internals->refcount = 1;
    internals->device = current_device();
    #ifndef __HIP_PLATFORM_HCC__
      AT_CUDA_CHECK(cudaStreamCreateWithPriority(&internals->stream, flags, priority));
    #else 
      AT_CUDA_CHECK(cudaStreamCreateWithFlags(&internals->stream, flags));
    #endif 
    return internals;
  }
CUDAStreamInternals * CUDAStream_createAndRetainWithOptions ( int32_t flags , int32_t priority ) { CUDAStreamInternals * internals = ( CUDAStreamInternals * ) malloc ( sizeof ( CUDAStreamInternals ) ) ; internals -> is_destructible = true ; internals -> refcount = 1 ; internals -> device = current_device ( ) ; #ifndef __HIP_PLATFORM_HCC__ AT_CUDA_CHECK ( cudaStreamCreateWithPriority ( & internals -> stream , flags , priority ) ) ; #else AT_CUDA_CHECK ( cudaStreamCreateWithFlags ( & internals -> stream , flags ) ) ; #endif return internals ; }
Creates (and retains) and new cuda stream
Creates ( and retains ) and new cuda stream
// __HIP_PLATFORM_HCC__