clMathLibraries / clBLAS

a software library containing BLAS functions written in OpenCL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add error checker when creating cmd queue in client: especially when OoO queue is not supported on many devices

tingxingdong opened this issue · comments

By default , the client created a out-of-orer queue. However, most devices only support in-order queue. The main purpose of client is to test clBLAS maths functions not test queues. It is better to change into in-order queue by default.

https://github.com/clMathLibraries/clBLAS/blob/master/src/client/clfunc_common.hpp#L306

An error checker should be inserted, even certain property queue is not supported, error can be caught much earlier.

@@ -304,6 +304,7 @@ public:

         OPENCL_V_THROW(err, "creating context");
         for (unsigned int i = 0; i < numQueues; i++) {
           queues_[i] = clCreateCommandQueue(ctx_, device_, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, &err);
+          OPENCL_V_THROW(err, "create command queue");
         }