Skip to content

Fix for slicing bugs#441

Merged
oleksandr-pavlyk merged 3 commits intomasterfrom
fix-slicing-bugs
May 17, 2021
Merged

Fix for slicing bugs#441
oleksandr-pavlyk merged 3 commits intomasterfrom
fix-slicing-bugs

Conversation

@oleksandr-pavlyk
Copy link
Copy Markdown
Contributor

Fixed bugs in basic slicing and in constructors discovered by examples used during customer presentation.

Specifically these had to deal with negative strides and sometimes non-unit strides.

For Xusm = dpt.usm_ndarray((12,), dtype='i4'), and Xusm[1::2] had incorrect shape of (5,), while the expected shape should be (6,), consisting of elements of {Xsum[1], Xusm[3], Xusm[5], Xusm[7], Xusm[9], Xusm[11]}.

Expanded tests, and fixed memory leak in shape/strides parser on failures (C-array for shape was not being freed).

@oleksandr-pavlyk oleksandr-pavlyk changed the title Fix slicing bugs Fix for slicing bugs May 12, 2021
These were discovered while preparing for customer presentation
'i4' translates to typenum 5 on Linux, but to typenum 7 on Windows,
and this entry in the look-up array was not meaningfully populated
This uses dpctl.SyclQueue() to create the queue from default selector
@oleksandr-pavlyk oleksandr-pavlyk merged commit 31f95d6 into master May 17, 2021
@oleksandr-pavlyk oleksandr-pavlyk deleted the fix-slicing-bugs branch May 17, 2021 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant