Skip to content

Commit

Permalink
gpu_api: add dummy gpuStream{Create,Destroy,Synchronize} for host
Browse files Browse the repository at this point in the history
One could actually think about having an actual implementation using
threads, but this will be good enough for now.
  • Loading branch information
germasch committed Sep 22, 2023
1 parent 20d2ce5 commit 7f08cf6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/fortran/gpu_api.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,16 @@ extern "C" int gpuMemcpyAsync(void* dst, const void* src, size_t bytes,
return 0;
}

#elif defined(GTENSOR_DEVICE_HOST)

// dummy implementation, one GPU only
extern "C" int gpuStreamCreate(gt::stream_view::stream_t* pStream) { return 0; }

extern "C" int gpuStreamDestroy(gt::stream_view::stream_t stream) { return 0; }

extern "C" int gpuStreamSynchronize(gt::stream_view::stream_t stream)
{
return 0;
}

#endif

0 comments on commit 7f08cf6

Please sign in to comment.