Skip to content

Commit

Permalink
[SYCL][COMPAT] Add one helper function get_local_mem_size() to get lo…
Browse files Browse the repository at this point in the history
…cal memory size (intel#15695)


---------

Signed-off-by: chenwei.sun <[email protected]>
  • Loading branch information
tomflinda authored Oct 22, 2024
1 parent 475ca2d commit df9a1a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions sycl/doc/syclcompat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,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;
Expand Down
4 changes: 4 additions & 0 deletions sycl/include/syclcompat/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,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.
Expand Down

0 comments on commit df9a1a6

Please sign in to comment.