[clinfo] 02/55: Don't get preferred wg size multiple if compiler is not available
Andreas Beckmann
anbe at moszumanska.debian.org
Sat Jan 13 14:39:58 UTC 2018
This is an automated email from the git hooks/post-receive script.
anbe pushed a commit to branch master
in repository clinfo.
commit 271b88488df434eb68eb2d05996c39b5d78fe50b
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date: Sun May 22 16:35:31 2016 +0200
Don't get preferred wg size multiple if compiler is not available
---
src/clinfo.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/src/clinfo.c b/src/clinfo.c
index efeea3e..e37c296 100644
--- a/src/clinfo.c
+++ b/src/clinfo.c
@@ -549,6 +549,7 @@ struct device_info_checks {
cl_device_mem_cache_type cachetype;
cl_device_local_mem_type lmemtype;
cl_bool image_support;
+ cl_bool compiler_available;
char has_half[12];
char has_double[24];
char has_nv[29];
@@ -660,6 +661,11 @@ int dev_has_images_20(const struct device_info_checks *chk)
return dev_has_images(chk) && dev_is_20(chk);
}
+int dev_has_compiler(const struct device_info_checks *chk)
+{
+ return chk->compiler_available;
+}
+
void identify_device_extensions(const char *extensions, struct device_info_checks *chk)
{
@@ -1613,6 +1619,9 @@ struct device_info_traits dinfo_traits[] = {
{ CLINFO_BOTH, DINFO(CL_DEVICE_OPENCL_C_VERSION, "Device OpenCL C Version", str), NULL },
{ CLINFO_BOTH, DINFO(CL_DEVICE_EXTENSIONS, "Device Extensions", str_get), NULL },
{ CLINFO_BOTH, DINFO(CL_DEVICE_TYPE, "Device Type", devtype), NULL },
+
+ { CLINFO_BOTH, DINFO(CL_DEVICE_AVAILABLE, "Device Available", bool), NULL },
+
{ CLINFO_BOTH, DINFO(CL_DEVICE_PROFILE, "Device Profile", str), NULL },
{ CLINFO_BOTH, DINFO(CL_DEVICE_BOARD_NAME_AMD, "Device Board Name (AMD)", str), dev_has_amd },
{ CLINFO_BOTH, DINFO(CL_DEVICE_TOPOLOGY_AMD, "Device Topology (AMD)", devtopo_amd), dev_has_amd },
@@ -1654,7 +1663,10 @@ struct device_info_traits dinfo_traits[] = {
{ CLINFO_BOTH, DINFO(CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS, "Max work item dimensions", int), NULL },
{ CLINFO_BOTH, DINFO(CL_DEVICE_MAX_WORK_ITEM_SIZES, "Max work item sizes", szptr), NULL },
{ CLINFO_BOTH, DINFO(CL_DEVICE_MAX_WORK_GROUP_SIZE, "Max work group size", sz), NULL },
- { CLINFO_BOTH, DINFO(CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, "Preferred work group size multiple", wg), NULL },
+
+ { CLINFO_BOTH, DINFO(CL_DEVICE_COMPILER_AVAILABLE, "Compiler Available", bool), NULL },
+ { CLINFO_BOTH, DINFO(CL_DEVICE_LINKER_AVAILABLE, "Linker Available", bool), dev_is_12 },
+ { CLINFO_BOTH, DINFO(CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, "Preferred work group size multiple", wg), dev_has_compiler },
{ CLINFO_BOTH, DINFO(CL_DEVICE_WARP_SIZE_NV, "Warp size (NV)", int), dev_has_nv },
{ CLINFO_BOTH, DINFO(CL_DEVICE_WAVEFRONT_WIDTH_AMD, "Wavefront width (AMD)", int), dev_is_gpu_amd },
{ CLINFO_BOTH, DINFO(CL_DEVICE_MAX_NUM_SUB_GROUPS, "Max sub-groups per work group", int), dev_is_21 },
@@ -1801,10 +1813,6 @@ struct device_info_traits dinfo_traits[] = {
{ CLINFO_BOTH, DINFO(CL_DEVICE_PRINTF_BUFFER_SIZE, "printf() buffer size", mem), dev_is_12 },
{ CLINFO_BOTH, DINFO(CL_DEVICE_BUILT_IN_KERNELS, "Built-in kernels", str), dev_is_12 },
{ CLINFO_BOTH, DINFO(CL_DEVICE_ME_VERSION_INTEL, "Motion Estimation accelerator version (Intel)", int), dev_has_intel_AME },
-
- { CLINFO_BOTH, DINFO(CL_DEVICE_AVAILABLE, "Device Available", bool), NULL },
- { CLINFO_BOTH, DINFO(CL_DEVICE_COMPILER_AVAILABLE, "Compiler Available", bool), NULL },
- { CLINFO_BOTH, DINFO(CL_DEVICE_LINKER_AVAILABLE, "Linker Available", bool), dev_is_12 },
};
/* Process all the device info in the traits, except if param_whitelist is not NULL,
@@ -1906,6 +1914,10 @@ printDeviceInfo(const cl_device_id *device, cl_uint d,
/* strbuf was abused to give us boolean value */
memcpy(&(chk.image_support), strbuf, sizeof(chk.image_support));
break;
+ case CL_DEVICE_COMPILER_AVAILABLE:
+ /* strbuf was abused to give us boolean value */
+ memcpy(&(chk.compiler_available), strbuf, sizeof(chk.compiler_available));
+ break;
default:
/* do nothing */
break;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/clinfo.git
More information about the Pkg-opencl-commits
mailing list