Skip to content

Commit

Permalink
Cuda10 requires "stream=nullptr" as default arg
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Conrad Clevenger authored and tcclevenger committed Jul 27, 2023
1 parent 3f19a97 commit c4278e1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/src/Cuda/Kokkos_Cuda_Instance.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class CudaInternal {

template <bool setCudaDevice = true>
cudaError_t cuda_event_record_wrapper(cudaEvent_t event,
cudaStream_t stream = 0) const {
cudaStream_t stream = nullptr) const {
if (setCudaDevice) set_cuda_device();
return cudaEventRecord(event, stream);
}
Expand Down Expand Up @@ -399,9 +399,9 @@ class CudaInternal {
}

template <bool setCudaDevice = true>
cudaError_t cuda_mem_prefetch_async_wrapper(const void* devPtr, size_t count,
int dstDevice,
cudaStream_t stream = 0) const {
cudaError_t cuda_mem_prefetch_async_wrapper(
const void* devPtr, size_t count, int dstDevice,
cudaStream_t stream = nullptr) const {
if (setCudaDevice) set_cuda_device();
return cudaMemPrefetchAsync(devPtr, count, dstDevice, stream);
}
Expand All @@ -416,15 +416,15 @@ class CudaInternal {
template <bool setCudaDevice = true>
cudaError_t cuda_memcpy_async_wrapper(void* dst, const void* src,
size_t count, cudaMemcpyKind kind,
cudaStream_t stream = 0) const {
cudaStream_t stream = nullptr) const {
if (setCudaDevice) set_cuda_device();
return cudaMemcpyAsync(dst, src, count, kind, stream);
}

template <bool setCudaDevice = true>
cudaError_t cuda_memcpy_to_symbol_async_wrapper(
const void* symbol, const void* src, size_t count, size_t offset,
cudaMemcpyKind kind, cudaStream_t stream = 0) const {
cudaMemcpyKind kind, cudaStream_t stream = nullptr) const {
if (setCudaDevice) set_cuda_device();
return cudaMemcpyToSymbolAsync(symbol, src, count, offset, kind, stream);
}
Expand All @@ -437,7 +437,7 @@ class CudaInternal {

template <bool setCudaDevice = true>
cudaError_t cuda_memset_async_wrapper(void* devPtr, int value, size_t count,
cudaStream_t stream = 0) const {
cudaStream_t stream = nullptr) const {
if (setCudaDevice) set_cuda_device();
return cudaMemsetAsync(devPtr, value, count, stream);
}
Expand Down

0 comments on commit c4278e1

Please sign in to comment.