From 0b6f8890a9c8714175d7e332b15bf161de0610e3 Mon Sep 17 00:00:00 2001 From: chang-l Date: Mon, 18 Nov 2024 15:59:59 -0800 Subject: [PATCH 1/2] Sync stream for scatter_op --- cpp/src/wholememory_ops/scatter_op_impl_mapped.cu | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpp/src/wholememory_ops/scatter_op_impl_mapped.cu b/cpp/src/wholememory_ops/scatter_op_impl_mapped.cu index 77f570f90..2d2bef81e 100644 --- a/cpp/src/wholememory_ops/scatter_op_impl_mapped.cu +++ b/cpp/src/wholememory_ops/scatter_op_impl_mapped.cu @@ -18,6 +18,7 @@ #include #include +#include "cuda_macros.hpp" #include "wholememory_ops/functions/gather_scatter_func.h" namespace wholememory_ops { @@ -41,6 +42,7 @@ wholememory_error_code_t wholememory_scatter_mapped( wholememory_desc, stream, scatter_sms); + WM_CUDA_CHECK(cudaStreamSynchronize(stream)); } } // namespace wholememory_ops From 59474e562a0441f98f1868bd131cbf19cc72e04f Mon Sep 17 00:00:00 2001 From: chang-l Date: Thu, 21 Nov 2024 11:59:39 -0800 Subject: [PATCH 2/2] Fix format --- cpp/src/wholememory_ops/scatter_op_impl_mapped.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/wholememory_ops/scatter_op_impl_mapped.cu b/cpp/src/wholememory_ops/scatter_op_impl_mapped.cu index 2d2bef81e..dbe68b120 100644 --- a/cpp/src/wholememory_ops/scatter_op_impl_mapped.cu +++ b/cpp/src/wholememory_ops/scatter_op_impl_mapped.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2023, NVIDIA CORPORATION. + * Copyright (c) 2019-2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.