Skip to content

Commit 1312b03

Browse files
committed
change private arrays to use new dpex api
1 parent 2fb19c0 commit 1312b03

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

dpbench/benchmarks/default/gpairs/gpairs_numba_dpex_k.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ def count_weighted_pairs_3d_intel_no_slm_ker(
3838

3939
n_wi = 32
4040

41-
dsq_mat = dpex.private.array(shape=(32 * 32), dtype=dtype)
42-
w0_vec = dpex.private.array(shape=(32), dtype=dtype)
43-
w1_vec = dpex.private.array(shape=(32), dtype=dtype)
41+
dsq_mat = kapi.PrivateArray(shape=(32 * 32), dtype=dtype)
42+
w0_vec = kapi.PrivateArray(shape=(32), dtype=dtype)
43+
w1_vec = kapi.PrivateArray(shape=(32), dtype=dtype)
4444

4545
offset0 = gr0 * n_wi * lws0 + lid0
4646
offset1 = gr1 * n_wi * lws1 + lid1
@@ -80,7 +80,7 @@ def count_weighted_pairs_3d_intel_no_slm_ker(
8080

8181
# update slm_hist. Use work-item private buffer of 16 tfloat elements
8282
for k in range(0, slm_hist_size, private_hist_size):
83-
private_hist = dpex.private.array(shape=(32), dtype=dtype)
83+
private_hist = kapi.PrivateArray(shape=(32), dtype=dtype)
8484
for p in range(private_hist_size):
8585
private_hist[p] = 0.0
8686

dpbench/benchmarks/default/kmeans/kmeans_numba_dpex_k.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def groupByCluster(
5656
for i in range(WorkPI):
5757
point_id = grid * WorkPI * local_size + i * local_size + lid
5858
if point_id < numpoints:
59-
localP = dpex.private.array(dims, dtyp)
59+
localP = kapi.PrivateArray(dims, dtyp)
6060
for d in range(dims):
6161
localP[d] = arrayP[point_id, d]
6262

@@ -179,7 +179,7 @@ def updateLabels(
179179
for i in range(WorkPI):
180180
point_id = grid * WorkPI * local_size + i * local_size + lid
181181
if point_id < numpoints:
182-
localP = dpex.private.array(dims, dtyp)
182+
localP = kapi.PrivateArray(dims, dtyp)
183183
for d in range(dims):
184184
localP[d] = arrayP[point_id, d]
185185

dpbench/benchmarks/default/knn/knn_numba_dpex_k.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def _knn_kernel( # noqa: C901: TODO: can we simplify logic?
2525
dtype = train.dtype
2626
i = item.get_id(0)
2727
# here k has to be 5 in order to match with numpy
28-
queue_neighbors = dpex.private.array(shape=(5, 2), dtype=dtype)
28+
queue_neighbors = kapi.PrivateArray(shape=(5, 2), dtype=dtype)
2929

3030
for j in range(k):
3131
x1 = train[j]

0 commit comments

Comments
 (0)