Skip to content

Commit

Permalink
add a comment about sync order
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Jun 22, 2023
1 parent e6ca953 commit 9d78b5d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions extensions/nanoarrow_device/src/nanoarrow/nanoarrow_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,10 @@ ArrowErrorCode ArrowDeviceArrayViewSetArray(
ArrowDeviceArrayViewSetArrayMinimal(device_array_view, device_array, error));

// Wait on device_array to synchronize with the CPU
// TODO: This is not actually sufficient for CUDA, where the synchronization
// should happen after the cudaMemcpy, not before it. The ordering of
// these operations should be explicit and asynchronous (and is probably outside
// the scope of what can be done with a generic callback).
NANOARROW_RETURN_NOT_OK(device_array_view->device->synchronize_event(
device_array_view->device, device_array->sync_event, error));

Expand Down

0 comments on commit 9d78b5d

Please sign in to comment.