From 917d9c9fe9323535bd65ce585a1cc245046c34d3 Mon Sep 17 00:00:00 2001 From: "chenwei.sun" Date: Wed, 16 Oct 2024 02:43:34 +0800 Subject: [PATCH 1/2] [SYCL][COMPAT] Add one helper function get_local_mem_size() to get local memory size Signed-off-by: chenwei.sun --- sycl/include/syclcompat/device.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sycl/include/syclcompat/device.hpp b/sycl/include/syclcompat/device.hpp index 4e227a635c44e..95b378fa54f9f 100644 --- a/sycl/include/syclcompat/device.hpp +++ b/sycl/include/syclcompat/device.hpp @@ -395,6 +395,10 @@ class device_ext : public sycl::device { return get_device_info().get_global_mem_size(); } + size_t get_local_mem_size() const { + return get_device_info().get_local_mem_size(); + } + /// Get the number of bytes of free and total memory on the SYCL device. /// \param [out] free_memory The number of bytes of free memory on the SYCL /// device. From 21b75620b71a4850f58fe581574963d783f5ed2a Mon Sep 17 00:00:00 2001 From: "chenwei.sun" Date: Thu, 17 Oct 2024 01:12:49 +0800 Subject: [PATCH 2/2] Address review comment Signed-off-by: chenwei.sun --- sycl/doc/syclcompat/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sycl/doc/syclcompat/README.md b/sycl/doc/syclcompat/README.md index df8d453a41d57..be0cc7eb92b67 100644 --- a/sycl/doc/syclcompat/README.md +++ b/sycl/doc/syclcompat/README.md @@ -1108,6 +1108,7 @@ class device_ext : public sycl::device { int get_max_work_group_size() const; int get_mem_base_addr_align() const; size_t get_global_mem_size() const; + size_t get_local_mem_size() const; void get_memory_info(size_t &free_memory, size_t &total_memory) const; void get_device_info(device_info &out) const;