Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for slicing bugs #441

Merged
merged 3 commits into from
May 17, 2021
Merged

Fix for slicing bugs #441

merged 3 commits into from
May 17, 2021

Conversation

oleksandr-pavlyk
Copy link
Collaborator

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