[compute/cker] Fix einsum test error#15161
Merged
chunseoklee merged 1 commit intoSamsung:masterfrom Apr 15, 2025
Merged
Conversation
This commit allows dims_data to be nullptr when dimensions_count is 0. ONE-DCO-1.0-Signed-off-by: ragmani <ragmani0216@gmail.com>
ragmani
commented
Apr 14, 2025
| // Allow dims_data to be nullptr when dimensions_count is 0, | ||
| // because there are no dimensions to copy. For any non-zero dimensions_count, | ||
| // dims_data must not be nullptr to ensure valid shape data is provided. | ||
| assert(dimensions_count == 0 || dims_data != nullptr); |
Contributor
Author
There was a problem hiding this comment.
In the Einsum kernel, MatMulBCast is used with arguments where the dimensions_count is 0 and dims_data is nullptr. This happens when there are no batch dimensions (e.g., for 2D matrices), so passing an empty dimensions vector (size 0 and nullptr data) is valid.
Contributor
Author
|
This PR fixes a test error(#15030 (comment)). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit allows dims_data to be nullptr when dimensions_count is 0.
ONE-DCO-1.0-Signed-off-by: ragmani ragmani0216@gmail.com