-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Labels
Description
Numba-PVC produces the following error when running kmeans. The error message is continuously printed on stdout and the process has to be killed to stop execution.
error: line 164: ID 71[%_323_i] has not been defined
%_324_i = OpLoad %float %_323_i Aligned 4
SPIR-V Validation failed...
error: line 164: ID 71[%_323_i] has not been defined
%_324_i = OpLoad %float %_323_i Aligned 4
......
To perform a preliminary triage, I reduced the kmeans program to a single kernel. The kernel code is attached below.
@dppy.kernel
def groupByCluster(arrayP, arrayPcluster,
arrayC,
num_points, num_centroids):
idx = dppy.get_global_id(0)
if idx < num_points:
minor_distance = -1
for i in range(num_centroids):
dx = arrayP[idx, 0] - arrayC[i, 0]
dy = arrayP[idx, 1] - arrayC[i, 1]
my_distance = sqrt(dx * dx + dy * dy)
if minor_distance > my_distance or minor_distance == -1:
minor_distance = my_distance
arrayPcluster[idx] = i