Hi,
Thanks for reviewing the patch. New one rebased, and with Signed-off-by:
attached.
Mark SandyBridge as unsupported
Signed-off-by: Jesper Pedersen <jesper.peder...@comcast.net>
---
src/cl_device_id.c | 17 +++++++++++++++--
utests/utest_helper.cpp | 30 ++++++++++++++++++------------
2 files changed, 33 insertions(+), 14 deletions(-)
On 04/15/2014 09:54 PM, Zhigang Gong wrote:
Thanks for the patch and it looks good to me.
But it seems that you forgot to your Signed-off-by signature.
Could you add your signature and send it again. Thanks for your contribution.
On Sun, Apr 13, 2014 at 10:09:14AM -0400, Jesper Pedersen wrote:
Hello,
Attached is a patch that
* Explicit marks SandyBridge as unsupported
* Allows cl_get_device_ids to return CL_DEVICE_NOT_FOUND in all cases
* Allows the test suite to run for unsupported devices
This gives
[run/total: 657/657] pass: 0; fail: 655; pass rate: 0.003044
summary:
----------
total: 657
run: 657
pass: 0
fail: 655
pass rate: 0.003044
on my SandyBridge HD 3000 (Note, that 2 test cases are missing from
the result).
Patch is submitted under LGPL v2 or higher.
Thanks in advance for considering this patch, and keep up the good work !
Best regards,
Jesper
>From f3614f0401e30875c8c12038fb67e9e0e3161f6a Mon Sep 17 00:00:00 2001
From: Jesper Pedersen <jesper.peder...@comcast.net>
Date: Sun, 13 Apr 2014 09:58:12 -0400
Subject: [PATCH] Mark SandyBridge as unsupported
Signed-off-by: Jesper Pedersen <jesper.peder...@comcast.net>
---
src/cl_device_id.c | 17 +++++++++++++++--
utests/utest_helper.cpp | 30 ++++++++++++++++++------------
2 files changed, 33 insertions(+), 14 deletions(-)
diff --git a/src/cl_device_id.c b/src/cl_device_id.c
index 0426738..c6bce7d 100644
--- a/src/cl_device_id.c
+++ b/src/cl_device_id.c
@@ -182,9 +182,22 @@ ivb_gt2_break:
intel_ivb_gt2_device.platform = intel_platform;
ret = &intel_ivb_gt2_device;
break;
+
+ case PCI_CHIP_SANDYBRIDGE_BRIDGE:
+ case PCI_CHIP_SANDYBRIDGE_GT1:
+ case PCI_CHIP_SANDYBRIDGE_GT2:
+ case PCI_CHIP_SANDYBRIDGE_GT2_PLUS:
+ case PCI_CHIP_SANDYBRIDGE_BRIDGE_M:
+ case PCI_CHIP_SANDYBRIDGE_M_GT1:
+ case PCI_CHIP_SANDYBRIDGE_M_GT2:
+ case PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS:
+ case PCI_CHIP_SANDYBRIDGE_BRIDGE_S:
+ case PCI_CHIP_SANDYBRIDGE_S_GT:
+ // Intel(R) HD Graphics SandyBridge not supported yet
+ ret = NULL;
+ break;
default:
- printf("cl_get_gt_device(): error, unknown device\n");
- exit(1);
+ printf("cl_get_gt_device(): error, unknown device: %x\n", device_id);
}
return ret;
diff --git a/utests/utest_helper.cpp b/utests/utest_helper.cpp
index a9e270e..cb4dd66 100644
--- a/utests/utest_helper.cpp
+++ b/utests/utest_helper.cpp
@@ -337,20 +337,26 @@ cl_ocl_init(void)
GET_PLATFORM_STR_INFO(extensions, EXTENSIONS);
/* Get the device (only GPU device is supported right now) */
- OCL_CALL (clGetDeviceIDs, platform, CL_DEVICE_TYPE_GPU, 1, &device, NULL);
- {
- size_t param_value_size;
- GET_DEVICE_STR_INFO(profile, PROFILE);
- GET_DEVICE_STR_INFO(name, NAME);
- GET_DEVICE_STR_INFO(vendor, VENDOR);
- GET_DEVICE_STR_INFO(version, VERSION);
- GET_DEVICE_STR_INFO(extensions, EXTENSIONS);
- GET_DEVICE_STR_INFO(opencl_c_version, OPENCL_C_VERSION);
+ try {
+ OCL_CALL (clGetDeviceIDs, platform, CL_DEVICE_TYPE_GPU, 1, &device, NULL);
+ {
+ size_t param_value_size;
+ GET_DEVICE_STR_INFO(profile, PROFILE);
+ GET_DEVICE_STR_INFO(name, NAME);
+ GET_DEVICE_STR_INFO(vendor, VENDOR);
+ GET_DEVICE_STR_INFO(version, VERSION);
+ GET_DEVICE_STR_INFO(extensions, EXTENSIONS);
+ GET_DEVICE_STR_INFO(opencl_c_version, OPENCL_C_VERSION);
#ifdef HAS_EGL
- if (std::strstr(extensionsStr.c_str(), "cl_khr_gl_sharing")) {
- hasGLExt = true;
- }
+ if (std::strstr(extensionsStr.c_str(), "cl_khr_gl_sharing")) {
+ hasGLExt = true;
+ }
#endif
+ }
+ } catch (...) {
+ fprintf(stderr, "error calling clGetDeviceIDs\n");
+ status = CL_DEVICE_NOT_FOUND;
+ goto error;
}
#ifdef HAS_EGL
--
1.9.0
_______________________________________________
Beignet mailing list
Beignet@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet