beignet-1.3.2-reduce-notfound-output.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Description: Reduce error spew on unsupported hardware
  2. Loading beignet on unsupported hardware produces ~20 errors, even
  3. if another ICD is also installed that does support the hardware.
  4. Replace these with one message that explicitly says what to do.
  5. Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
  6. --- a/src/cl_device_id.c
  7. +++ b/src/cl_device_id.c
  8. @@ -797,10 +797,10 @@ glk12eu_break:
  9. case PCI_CHIP_SANDYBRIDGE_BRIDGE_S:
  10. case PCI_CHIP_SANDYBRIDGE_S_GT:
  11. // Intel(R) HD Graphics SandyBridge not supported yet
  12. + default:
  13. + fprintf(stderr, "beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware\n(If you have multiple ICDs installed and OpenCL works, you can ignore this message)\n");
  14. ret = NULL;
  15. break;
  16. - default:
  17. - printf("cl_get_gt_device(): error, unknown device: %x\n", device_id);
  18. }
  19. if (ret == NULL)
  20. --- a/src/intel/intel_driver.c
  21. +++ b/src/intel/intel_driver.c
  22. @@ -263,7 +263,6 @@ if(!intel_driver_is_active(intel)) {
  23. }
  24. if(!intel_driver_is_active(intel)) {
  25. - fprintf(stderr, "Device open failed, aborting...\n");
  26. return CL_DEVICE_NOT_FOUND;
  27. }
  28. @@ -324,7 +323,6 @@ drm_client_t client;
  29. // usually dev_name = "/dev/dri/card%d"
  30. dev_fd = open(dev_name, O_RDWR);
  31. if (dev_fd == -1) {
  32. - fprintf(stderr, "open(\"%s\", O_RDWR) failed: %s\n", dev_name, strerror(errno));
  33. return 0;
  34. }