-
Notifications
You must be signed in to change notification settings - Fork 618
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 scalar handling in GPU cast #3924
Conversation
Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
!build |
CI MESSAGE: [4899734]: BUILD STARTED |
CI MESSAGE: [4899734]: BUILD PASSED |
I get that adding thorough testing may be out of scope, but how about including here a single test case that would explode without the fix and passes otherwise? |
I don't think it's worth wasting a perfectly good CI run ;) |
I agree that such test is a good idea. |
Don't try to collapse 0D shape - reinterpret the data as 1D 1-element instead. Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
Don't try to collapse 0D shape - reinterpret the data as 1D 1-element instead. Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
Signed-off-by: Michał Zientkiewicz mzient@gmail.com
Category:
Bug fix (non-breaking change which fixes an issue)
Description:
Scalars were not properly handled in operator cast - there was an attempt to collapse the shape, which failed catastrophically (assertion in Debug build and access violation in Release) if the input shape is 0D, in which case it needs to be artificially expanded.
This PR adds special handling for that case.
Additional information:
Affected modules and functionalities:
Operator cast.
Key points relevant for the review:
N/A
TODO (separate PR): Add proper tests for operator
cast
.Checklist
Tests
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: N/A