clover: Query and export int64 atomics
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
This commit is contained in:
parent
0852162950
commit
f67ceeffd4
|
@ -331,11 +331,13 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param,
|
||||||
|
|
||||||
case CL_DEVICE_EXTENSIONS:
|
case CL_DEVICE_EXTENSIONS:
|
||||||
buf.as_string() =
|
buf.as_string() =
|
||||||
"cl_khr_global_int32_base_atomics"
|
"cl_khr_byte_addressable_store"
|
||||||
|
" cl_khr_global_int32_base_atomics"
|
||||||
" cl_khr_global_int32_extended_atomics"
|
" cl_khr_global_int32_extended_atomics"
|
||||||
" cl_khr_local_int32_base_atomics"
|
" cl_khr_local_int32_base_atomics"
|
||||||
" cl_khr_local_int32_extended_atomics"
|
" cl_khr_local_int32_extended_atomics"
|
||||||
" cl_khr_byte_addressable_store"
|
+ std::string(dev.has_int64_atomics() ? " cl_khr_int64_base_atomics" : "")
|
||||||
|
+ std::string(dev.has_int64_atomics() ? " cl_khr_int64_extended_atomics" : "")
|
||||||
+ std::string(dev.has_doubles() ? " cl_khr_fp64" : "")
|
+ std::string(dev.has_doubles() ? " cl_khr_fp64" : "")
|
||||||
+ std::string(dev.has_halves() ? " cl_khr_fp16" : "");
|
+ std::string(dev.has_halves() ? " cl_khr_fp16" : "");
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -196,6 +196,12 @@ device::has_halves() const {
|
||||||
PIPE_SHADER_CAP_FP16);
|
PIPE_SHADER_CAP_FP16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
device::has_int64_atomics() const {
|
||||||
|
return pipe->get_shader_param(pipe, PIPE_SHADER_COMPUTE,
|
||||||
|
PIPE_SHADER_CAP_INT64_ATOMICS);
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
device::has_unified_memory() const {
|
device::has_unified_memory() const {
|
||||||
return pipe->get_param(pipe, PIPE_CAP_UMA);
|
return pipe->get_param(pipe, PIPE_CAP_UMA);
|
||||||
|
|
|
@ -68,6 +68,7 @@ namespace clover {
|
||||||
bool image_support() const;
|
bool image_support() const;
|
||||||
bool has_doubles() const;
|
bool has_doubles() const;
|
||||||
bool has_halves() const;
|
bool has_halves() const;
|
||||||
|
bool has_int64_atomics() const;
|
||||||
bool has_unified_memory() const;
|
bool has_unified_memory() const;
|
||||||
cl_uint mem_base_addr_align() const;
|
cl_uint mem_base_addr_align() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue