summaryrefslogtreecommitdiff
path: root/src/cl_device_id.c
diff options
context:
space:
mode:
authorGuo Yejun <yejun.guo@intel.com>2015-12-04 03:22:20 +0800
committerYang Rong <rong.r.yang@intel.com>2015-12-14 12:10:20 +0800
commit1236620cc6b5ad5687132e22ff888070e75332eb (patch)
tree077590709f295c8e1fdd4a04d83a78910b0b485f /src/cl_device_id.c
parentb51dd736527ee769a9665d83a1b4e7dc6438e67c (diff)
add Broxton support
special versions of linux kernel and libdrm are needed. utest and conformance test PASSED. Signed-off-by: Guo Yejun <yejun.guo@intel.com> Reviewed-by: Junyan He <junyan.he@linux.intel.com>
Diffstat (limited to 'src/cl_device_id.c')
-rw-r--r--src/cl_device_id.c34
1 files changed, 30 insertions, 4 deletions
diff --git a/src/cl_device_id.c b/src/cl_device_id.c
index 5debf06a..a98523f8 100644
--- a/src/cl_device_id.c
+++ b/src/cl_device_id.c
@@ -198,6 +198,17 @@ static struct _cl_device_id intel_skl_gt4_device = {
#include "cl_gen9_device.h"
};
+static struct _cl_device_id intel_bxt_device = {
+ INIT_ICD(dispatch)
+ .max_compute_unit = 18,
+ .max_thread_per_unit = 6,
+ .sub_slice_count = 3,
+ .max_work_item_sizes = {512, 512, 512},
+ .max_work_group_size = 512,
+ .max_clock_frequency = 1000,
+#include "cl_gen9_device.h"
+};
+
LOCAL cl_device_id
cl_get_gt_device(void)
{
@@ -529,6 +540,16 @@ skl_gt4_break:
cl_intel_platform_enable_extension(ret, cl_khr_fp16_ext_id);
break;
+ case PCI_CHIP_BROXTON_P:
+ DECL_INFO_STRING(bxt_break, intel_bxt_device, name, "Intel(R) HD Graphics Broxton-P");
+bxt_break:
+ intel_bxt_device.device_id = device_id;
+ intel_bxt_device.platform = cl_get_platform_default();
+ ret = &intel_bxt_device;
+ cl_intel_platform_get_default_extension(ret);
+ cl_intel_platform_enable_extension(ret, cl_khr_fp16_ext_id);
+ break;
+
case PCI_CHIP_SANDYBRIDGE_BRIDGE:
case PCI_CHIP_SANDYBRIDGE_GT1:
case PCI_CHIP_SANDYBRIDGE_GT2:
@@ -754,7 +775,8 @@ cl_get_device_info(cl_device_id device,
device != &intel_skl_gt1_device &&
device != &intel_skl_gt2_device &&
device != &intel_skl_gt3_device &&
- device != &intel_skl_gt4_device
+ device != &intel_skl_gt4_device &&
+ device != &intel_bxt_device
))
return CL_INVALID_DEVICE;
@@ -868,7 +890,9 @@ cl_device_get_version(cl_device_id device, cl_int *ver)
device != &intel_skl_gt1_device &&
device != &intel_skl_gt2_device &&
device != &intel_skl_gt3_device &&
- device != &intel_skl_gt4_device))
+ device != &intel_skl_gt4_device &&
+ device != &intel_bxt_device
+ ))
return CL_INVALID_DEVICE;
if (ver == NULL)
return CL_SUCCESS;
@@ -883,7 +907,8 @@ cl_device_get_version(cl_device_id device, cl_int *ver)
|| device == &intel_brw_gt3_device || device == &intel_chv_device) {
*ver = 8;
} else if (device == &intel_skl_gt1_device || device == &intel_skl_gt2_device
- || device == &intel_skl_gt3_device || device == &intel_skl_gt4_device) {
+ || device == &intel_skl_gt3_device || device == &intel_skl_gt4_device
+ || device == &intel_bxt_device) {
*ver = 9;
} else
return CL_INVALID_VALUE;
@@ -971,7 +996,8 @@ cl_get_kernel_workgroup_info(cl_kernel kernel,
device != &intel_skl_gt1_device &&
device != &intel_skl_gt2_device &&
device != &intel_skl_gt3_device &&
- device != &intel_skl_gt4_device))
+ device != &intel_skl_gt4_device &&
+ device != &intel_bxt_device))
return CL_INVALID_DEVICE;
CHECK_KERNEL(kernel);