Code followed by errors below. Even the simplest copy/paste of sample
code from https://documen.tician.de/pyopencl/algorithm.html gives me
these errors. Is it something to do with running the chips in my Mac?
-- devin
========
import pyopencl as cl
import pyopencl.array
from pyopencl.scan import GenericScanKernel
import numpy as np
platform = cl.get_platforms()
my_devices = platform[0].get_devices(device_type=cl.device_type.GPU)
ctx = cl.Context(devices=my_devices)
queue = cl.CommandQueue(ctx)
a = cl.array.arange(queue, 10000, dtype=np.int32)
knl = GenericScanKernel(
ctx, np.int32,
arguments="__global int *ary",
input_expr="ary[i]",
scan_expr="a+b", neutral="0",
output_statement="ary[i+1] = item;"
)
result = knl(a, queue=queue)
print(result)
========
Build on <pyopencl.Device 'Intel(R) HD Graphics 530' on 'Apple' at
0x1024500> succeeded, but said:
<program source>:151:36: warning: unused variable 'psc_seq_i'
psc_index_type psc_seq_i = psc_unit_base +
psc_K*psc_LID_0 + psc_k;
^
<program source>:806:36: warning: unused variable 'psc_seq_i'
psc_index_type psc_seq_i = psc_unit_base +
psc_K*psc_LID_0 + psc_k;
^
<program source>:803:47: warning: comparison of integers of different
signs: 'unsigned long' and 'const psc_index_type' (aka 'const int')
if (psc_K * psc_LID_0 + psc_k < psc_offset_end)
~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
<program source>:851:41: warning: comparison of integers of different
signs: 'unsigned long' and 'const psc_index_type' (aka 'const int')
if (psc_K*psc_LID_0 < psc_offset_end)
~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
<program source>:879:41: warning: comparison of integers of different
signs: 'unsigned long' and 'const psc_index_type' (aka 'const int')
if (psc_K*psc_LID_0 < psc_offset_end)
~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
_______________________________________________
PyOpenCL mailing list
PyOpenCL@tiker.net
https://lists.tiker.net/listinfo/pyopencl