Closed
Description
In [27]: x1 = dpt.asarray(1, dtype="i2")
In [28]: x2 = dpt.asarray([0, 1, 0, 0], dtype="i2")
In [29]: dpt.tensordot(x1, x2, axes=0)
Out[29]: usm_ndarray([0, 1, 1, 1], dtype=int16)
This does not occur for int32, but does appear for int8, uint8, and float16. Likely being caused by the gemm tree reduction implementation.
Does not occur for complex
In [45]: x1 = dpt.asarray(1, dtype="c8")
In [46]: x2 = dpt.asarray([0, 1, 0, 0], dtype="c8")
In [47]: dpt.tensordot(x1, x2, axes=0)
Out[47]: usm_ndarray([0.+0.j, 1.+0.j, 0.+0.j, 0.+0.j], dtype=complex64)
Also only occurs for small cases
In [16]: x1 = dpt.asarray(1, dtype="i2")
In [17]: x2 = dpt.zeros(256, dtype="i2")
In [18]: x2[50] = 1
In [19]: dpt.tensordot(x1, x2, axes=0)
Out[19]:
usm_ndarray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=int16)
Metadata
Metadata
Assignees
Labels
No labels