"sejabs.2016" <sejabs.2...@qq.com> writes: > In the Intel opencl 2.0 tutorial resource SierpiĆski Carpet, they use the > device side enqueue properties added in opencl 2.0. In the source code, there > is a segment like this: > // You need to create device side queue for enqueue_kernel to work // We set > the device side queue to 16MB, since we are going to have a large // number > of enqueues cl_queue_properties qprop[] = {CL_QUEUE_SIZE, 16*1024*1024, > CL_QUEUE_PROPERTIES, > (cl_command_queue_properties)CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | > CL_QUEUE_ON_DEVICE | CL_QUEUE_ON_DEVICE_DEFAULT, 0}; cl_command_queue > my_device_q = clCreateCommandQueueWithProperties(CLU_CONTEXT, > cluGetDevice(CL_DEVICE_TYPE_GPU), qprop, &status); > Now I want to use pyopencl to rewrite the code in python to learn dynamic > parallelism method. But I can't find any instruction to set the queue size as > the code shows. The CommandQueue API has the properties option, but in the > document these options/values don't include size. Any suggestion?
The constants are available if you compile against an OpenCL 2+ ICD loader (the libOpenCL.so and its corresponding header file). (ocl-icd or the Khronos one work well) The bigger issue is that clCreateCommandQueueWithProperties isn't currently wrapped. I've created an issue for that: https://github.com/inducer/pyopencl/issues/198 I'd be happy to take a patch. Andreas _______________________________________________ PyOpenCL mailing list PyOpenCL@tiker.net https://lists.tiker.net/listinfo/pyopencl