Skip to content

Commit 8b56970

Browse files
author
Diptorup Deb
authored
Merge pull request #331 from IntelPython/fix/l2_norm
Fix failure in l2_norm kernel
2 parents 9729df4 + 6cbf6c9 commit 8b56970

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dpbench/benchmarks/l2_norm/l2_norm_numba_dpex_k.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5+
import math
6+
57
import numba_dpex as dpex
6-
import numpy as np
78

89

910
@dpex.kernel
@@ -13,7 +14,7 @@ def l2_norm_kernel(a, d):
1314
d[i] = 0.0
1415
for k in range(a_rows):
1516
d[i] += a[i, k] * a[i, k]
16-
d[i] = np.sqrt(d[i])
17+
d[i] = math.sqrt(d[i])
1718

1819

1920
def l2_norm(a, d):

0 commit comments

Comments
 (0)