[Beignet] [PATCH] Runtime: add CL_DEVICE_SPIR_VERSIONS to clGetDeviceInfo.

Yang Rong rong.r.yang at intel.com
Fri Oct 9 00:32:24 PDT 2015


Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
 src/cl_device_id.c | 1 +
 src/cl_device_id.h | 2 ++
 src/cl_gt_device.h | 1 +
 3 files changed, 4 insertions(+)

diff --git a/src/cl_device_id.c b/src/cl_device_id.c
index 78d2cf4..b0898f0 100644
--- a/src/cl_device_id.c
+++ b/src/cl_device_id.c
@@ -802,6 +802,7 @@ cl_get_device_info(cl_device_id     device,
     DECL_STRING_FIELD(VERSION, version)
     DECL_STRING_FIELD(PROFILE, profile)
     DECL_STRING_FIELD(OPENCL_C_VERSION, opencl_c_version)
+    DECL_STRING_FIELD(SPIR_VERSIONS, spir_versions)
     DECL_STRING_FIELD(EXTENSIONS, extensions);
     DECL_STRING_FIELD(BUILT_IN_KERNELS, built_in_kernels)
     DECL_FIELD(PARENT_DEVICE, parent_device)
diff --git a/src/cl_device_id.h b/src/cl_device_id.h
index 02d1e0f..4a923ef 100644
--- a/src/cl_device_id.h
+++ b/src/cl_device_id.h
@@ -97,6 +97,7 @@ struct _cl_device_id {
   const char *opencl_c_version;
   const char extensions[256];
   const char *driver_version;
+  const char *spir_versions;
   const char *built_in_kernels;
   size_t name_sz;
   size_t vendor_sz;
@@ -105,6 +106,7 @@ struct _cl_device_id {
   size_t opencl_c_version_sz;
   size_t extensions_sz;
   size_t driver_version_sz;
+  size_t spir_versions_sz;
   size_t built_in_kernels_sz;
   /* Kernel specific info that we're assigning statically */
   size_t preferred_wg_sz_mul;
diff --git a/src/cl_gt_device.h b/src/cl_gt_device.h
index 07ead7c..d7e1151 100644
--- a/src/cl_gt_device.h
+++ b/src/cl_gt_device.h
@@ -119,6 +119,7 @@ DECL_INFO_STRING(built_in_kernels, "__cl_copy_region_align4;"
                                    "__cl_fill_image_3d;")
 
 DECL_INFO_STRING(driver_version, LIBCL_DRIVER_VERSION_STRING)
+DECL_INFO_STRING(spir_versions, "1.2")
 #undef DECL_INFO_STRING
 .parent_device = NULL,
 .partition_max_sub_device = 1,
-- 
1.9.1



More information about the Beignet mailing list