[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#787952: marked as done (jessie-pu: package ocl-icd/2.2.3-1)



Your message dated Sat, 05 Sep 2015 14:31:07 +0100
with message-id <1441459867.2151.32.camel@adam-barratt.org.uk>
and subject line Closing p-u bugs for 8.2
has caused the Debian Bug report #787952,
regarding jessie-pu: package ocl-icd/2.2.3-1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
787952: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787952
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian.org@packages.debian.org
Usertags: pu

  Hi,

  As upstream of ocl-icd, we just discovered an annoying bug for all ocl-icd
version from 2.2.0 (included) to 2.2.5 (excluded, bug fixed).

  ocl-icd builds the libOpenCL.so.1 library that is a kind of stub library that
dispatch OpenCL calls to real OpenCL implementation (available as ICD).
  Due to this bug, the clSVMFree function (and only it) is not dispatched at
all. So, if any OpenCL program calls clSVMFree, it is as if there was no call
at all.

  I just uploaded a package to sid (2.2.5-1) that fixes this bug (#787941).
However, I would like a pre-approuval to prepare a package for jessie with only
this bug fix.

  The patch that will be applied to the jessie version will be a backport of
this one:
===================
diff --git a/icd_generator.rb b/icd_generator.rb
index 61d7e4b..3c3f0a8 100644
--- a/icd_generator.rb
+++ b/icd_generator.rb
@@ -580,12 +580,13 @@ EOF
       error_handler.call
       ocl_icd_loader_gen_source += "  }\n"
       if return_type != "void" then
-        ocl_icd_loader_gen_source += "  RETURN(((struct _#{fps[0]} *)#{fps[1]})->dispatch->#{func_name}("
-        ocl_icd_loader_gen_source += ps.join(", ")
-        ocl_icd_loader_gen_source += "));\n"
+        return_debug="RETURN"
       else
-        ocl_icd_loader_gen_source += "  return;"
+        return_debug="return"
       end
+      ocl_icd_loader_gen_source += "  #{return_debug}(((struct _#{fps[0]} *)#{fps[1]})->dispatch->#{func_name}("
+      ocl_icd_loader_gen_source += ps.join(", ")
+      ocl_icd_loader_gen_source += "));\n"
       ocl_icd_loader_gen_source += "}\n\n"
     }
     ocl_icd_loader_gen_source += "#pragma GCC visibility push(hidden)\n\n"
===================

  Note that most code of the libOpenCL.so library from ocl-icd is auto-generated
at build time. The previous fix is in the generator script. For a better understanding,
this fix leads to the following difference in the compiled code:
===================
$ diff -u7 ../../../build-area/ocl-icd-2.2.4/ocl_icd_loader_gen.c ocl_icd_loader_gen.c 
--- ../../../build-area/ocl-icd-2.2.4/ocl_icd_loader_gen.c	2015-06-06 17:43:52.686800886 +0200
+++ ocl_icd_loader_gen.c	2015-06-06 17:55:53.510141219 +0200
@@ -1407,15 +1407,16 @@
 CL_API_ENTRY void CL_API_CALL
 clSVMFree(cl_context         context ,
           void *             svm_pointer ){
   debug_trace();
   if( (struct _cl_context *)context == NULL) {
     return;
   }
-  return;}
+  return(((struct _cl_context *)context)->dispatch->clSVMFree(context, svm_pointer));
+}
 
 CL_API_ENTRY cl_int CL_API_CALL
 clEnqueueSVMFree(cl_command_queue   command_queue ,
                  cl_uint            num_svm_pointers ,
                  void *             svm_pointers[] ,
                  void (CL_CALLBACK * pfn_free_func)(cl_command_queue  queue ,
                                                         cl_uint           num_svm_pointers ,
===================
You can see that, now, the clSVMFree call is correctly dispatched to the ICD instead
of being a noop.

Only the clSVMFree function is impacted because this is the only one having a "void"
return type (that is handled a bit differently in the generator script)


  So, if you agree, I will prepare a ocl-icd for jessie with (only) this bug fix.


  Regards,
    Vincent

--- End Message ---
--- Begin Message ---
Version: 8.2

Hi,

These bugs correspond to updates which were included in the 8.2 point
release.

Regards,

Adam

--- End Message ---

Reply to: