Skip to content

Commit def4e2e

Browse files
Change default_device_int_type to return 'l' for long.
This should make `dpt.arange(10)` be int32 on Windows.
1 parent 7d1904c commit def4e2e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dpctl/tensor/libtensor/source/device_support_queries.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ std::string _default_device_fp_type(sycl::device d)
5151

5252
std::string _default_device_int_type(sycl::device)
5353
{
54-
return "i8";
54+
return "l"; // code for numpy.dtype('long') to be consisent
55+
// with NumPy's default integer type across
56+
// platforms.
5557
}
5658

5759
std::string _default_device_complex_type(sycl::device d)

0 commit comments

Comments
 (0)