Skip to content

Commit df9a1a6

Browse files
authored
[SYCL][COMPAT] Add one helper function get_local_mem_size() to get local memory size (#15695)
--------- Signed-off-by: chenwei.sun <[email protected]>
1 parent 475ca2d commit df9a1a6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

sycl/doc/syclcompat/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,7 @@ class device_ext : public sycl::device {
11121112
int get_max_work_group_size() const;
11131113
int get_mem_base_addr_align() const;
11141114
size_t get_global_mem_size() const;
1115+
size_t get_local_mem_size() const;
11151116
void get_memory_info(size_t &free_memory, size_t &total_memory) const;
11161117

11171118
void get_device_info(device_info &out) const;

sycl/include/syclcompat/device.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,10 @@ class device_ext : public sycl::device {
440440
return get_device_info().get_global_mem_size();
441441
}
442442

443+
size_t get_local_mem_size() const {
444+
return get_device_info().get_local_mem_size();
445+
}
446+
443447
/// Get the number of bytes of free and total memory on the SYCL device.
444448
/// \param [out] free_memory The number of bytes of free memory on the SYCL
445449
/// device.

0 commit comments

Comments
 (0)