You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@vlad-perevezentsev
These discrepancies seem to have been resolved recently.
In [1]: import dpctl.tensor as dpt, numpy as np
In [2]: a = dpt.asarray([0], dtype='c16', device='cpu')
In [3]: dpt.pow(a,1)
Out[3]: usm_ndarray([0.+0.j])
In [4]: a = dpt.zeros((2,), dtype='c16', device='cpu')
In [5]: dpt.pow(a,1)
Out[5]: usm_ndarray([0.+0.j, 0.+0.j])
In [6]: a = dpt.zeros((8,), dtype='c16', device='cpu')
In [7]: dpt.pow(a,1)
Out[7]:
usm_ndarray([0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j,
0.+0.j])
For the Numpy dtype case:
In [1]: import dpctl.tensor as dpt, numpy as np
In [2]: a = dpt.zeros((8,), dtype='c8', device='cpu')
In [3]: dpt.pow(a, np.int32(1))
Out[3]:
usm_ndarray([0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j,
0.+0.j])
It's hard to know if it was a result of #1411 or the change in compiler version.
Either way, if you can confirm that these issues are resolved for you as well, we can consider this issue resolved.
The below example works differently depending on the device:
with dtype = 'c8' returns the same result for different devices
I also noticed that
dpt.pow
works correctly when the input array size is between 2 and 7 for dtypec16
.Besides this there is an interesting case when
x2
(scalar) is numpy dtypeThen
dpt.pow
with input array with data typec8
returnsnans
tooThe text was updated successfully, but these errors were encountered: