Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
break;
case CL_DEVICE_MAX_COMPUTE_UNITS:
- buf.as_scalar<cl_uint>() = 1;
+ buf.as_scalar<cl_uint>() = dev.max_compute_units();
break;
case CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS:
PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCY)[0];
}
+cl_uint
+device::max_compute_units() const {
+ return get_compute_param<uint32_t>(pipe,
+ PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS)[0];
+}
+
std::vector<size_t>
device::max_block_size() const {
auto v = get_compute_param<uint64_t>(pipe, PIPE_COMPUTE_CAP_MAX_BLOCK_SIZE);
size_t max_threads_per_block() const;
cl_ulong max_mem_alloc_size() const;
cl_uint max_clock_frequency() const;
+ cl_uint max_compute_units() const;
std::vector<size_t> max_block_size() const;
std::string device_name() const;