From 348933179d5cf21be3d5fe32759a03cdb7b9406d Mon Sep 17 00:00:00 2001 From: baodii Date: Mon, 18 Nov 2024 16:38:25 -0800 Subject: [PATCH 1/2] make xpu ops compatible with oneapi 2025.0 Signed-off-by: baodii --- csrc/xpu/adam/multi_tensor_apply.dp.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/csrc/xpu/adam/multi_tensor_apply.dp.hpp b/csrc/xpu/adam/multi_tensor_apply.dp.hpp index 01964e1a4d38..90b65af7e581 100644 --- a/csrc/xpu/adam/multi_tensor_apply.dp.hpp +++ b/csrc/xpu/adam/multi_tensor_apply.dp.hpp @@ -109,6 +109,12 @@ class multi_tensor_apply_kernel { std::tuple args; }; +// to make sure multi_tensor_apply_kernel can be used in sycl::buffer +namespace sycl { + template + struct is_device_copyable> : std::true_type {}; +} + template void multi_tensor_apply(int block_size, int chunk_size, From f34396308403e26f4c93c484a40d8fda6b3dc1ad Mon Sep 17 00:00:00 2001 From: Logan Adams Date: Mon, 18 Nov 2024 17:09:56 -0800 Subject: [PATCH 2/2] Formatting --- csrc/xpu/adam/multi_tensor_apply.dp.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/csrc/xpu/adam/multi_tensor_apply.dp.hpp b/csrc/xpu/adam/multi_tensor_apply.dp.hpp index 90b65af7e581..14a130e2a23e 100644 --- a/csrc/xpu/adam/multi_tensor_apply.dp.hpp +++ b/csrc/xpu/adam/multi_tensor_apply.dp.hpp @@ -111,9 +111,9 @@ class multi_tensor_apply_kernel { // to make sure multi_tensor_apply_kernel can be used in sycl::buffer namespace sycl { - template - struct is_device_copyable> : std::true_type {}; -} +template +struct is_device_copyable> : std::true_type {}; +} // namespace sycl template void multi_tensor_apply(int block_size,