Runtime: add CL_DEVICE_SPIR_VERSIONS to clGetDeviceInfo

Graphics / Beignet - Yang Rong [intel.com] - 21 October 2015 03:49 UTC



###

diff --git a/src/cl_device_id.c b/src/cl_device_id.c
index a3d3fc4..4551aa8 100644
--- a/src/cl_device_id.c
+++ b/src/cl_device_id.c
@@ -803,6 +803,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 dddcf8f..de7a636 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,

3dfe46a Runtime: add CL_DEVICE_SPIR_VERSIONS to clGetDeviceInfo.
src/cl_device_id.c | 1 +
src/cl_device_id.h | 2 ++
src/cl_gt_device.h | 1 +
3 files changed, 4 insertions(+)

Upstream: cgit.freedesktop.org


  • Share