1515#include < limits>
1616#include < type_traits>
1717
18+ #include " info/device.hpp"
1819#include " types.hpp"
1920#include " aspect.hpp"
2021#include " info/info.hpp"
@@ -305,7 +306,7 @@ HIPSYCL_SPECIALIZE_GET_INFO(device, device_type) {
305306HIPSYCL_SPECIALIZE_GET_INFO (device, vendor_id)
306307{
307308 return get_rt_device ()->get_property (
308- rt::device_uint_property::vendor_id);
309+ rt::device_uint_property::vendor_id);
309310}
310311
311312HIPSYCL_SPECIALIZE_GET_INFO (device, max_compute_units)
@@ -314,6 +315,47 @@ HIPSYCL_SPECIALIZE_GET_INFO(device, max_compute_units)
314315 rt::device_uint_property::max_compute_units);
315316}
316317
318+ HIPSYCL_SPECIALIZE_GET_INFO_KHR_EXTENSION (device, max_work_group_range<1 >)
319+ {
320+ std::size_t size0 = static_cast <std::size_t >(get_rt_device ()->get_property (
321+ rt::device_uint_property::max_work_group_range0));
322+ return range<1 >{size0};
323+ }
324+
325+ HIPSYCL_SPECIALIZE_GET_INFO_KHR_EXTENSION (device, max_work_group_range<2 >)
326+ {
327+ std::size_t size0 = static_cast <std::size_t >(get_rt_device ()->get_property (
328+ rt::device_uint_property::max_work_group_range0));
329+ std::size_t size1 = static_cast <std::size_t >(get_rt_device ()->get_property (
330+ rt::device_uint_property::max_work_group_range1));
331+ if (get_rt_device ()->get_property (
332+ rt::device_uint_property::needs_dimension_flip))
333+ return range<2 >{size1, size0};
334+ else
335+ return range<2 >{size0, size1};
336+ }
337+
338+ HIPSYCL_SPECIALIZE_GET_INFO_KHR_EXTENSION (device, max_work_group_range<3 >)
339+ {
340+ std::size_t size0 = static_cast <std::size_t >(get_rt_device ()->get_property (
341+ rt::device_uint_property::max_work_group_range0));
342+ std::size_t size1 = static_cast <std::size_t >(get_rt_device ()->get_property (
343+ rt::device_uint_property::max_work_group_range1));
344+ std::size_t size2 = static_cast <std::size_t >(get_rt_device ()->get_property (
345+ rt::device_uint_property::max_work_group_range2));
346+ if (get_rt_device ()->get_property (
347+ rt::device_uint_property::needs_dimension_flip))
348+ return range<3 >{size2, size1, size0};
349+ else
350+ return range<3 >{size0, size1, size2};
351+ }
352+
353+ HIPSYCL_SPECIALIZE_GET_INFO_KHR_EXTENSION (device, max_work_group_range_size)
354+ {
355+ return get_rt_device ()->get_property (
356+ rt::device_uint_property::max_work_group_range_size);
357+ }
358+
317359HIPSYCL_SPECIALIZE_GET_INFO (device, max_work_item_dimensions)
318360{ return 3 ; }
319361
0 commit comments