Skip to content

Fix vector norm lowering#6883

Merged
lsy323 merged 1 commit intomasterfrom
lsiyuan/fix-linalg-vector-norm
Apr 3, 2024
Merged

Fix vector norm lowering#6883
lsy323 merged 1 commit intomasterfrom
lsiyuan/fix-linalg-vector-norm

Conversation

@lsy323
Copy link
Copy Markdown
Collaborator

@lsy323 lsy323 commented Apr 3, 2024

dtype_optional is an c10::optional<at::ScalarType> object, dereferencing it without checking if it's null in line 1605 is not expected.

The logic should be have the result have the same dtype as input if the output dtype is not explicitly set.

Test:
I cannot repro this is a unit test, only in a real model. I think that's because of the randomness in dereferencing c10::optional

@lsy323 lsy323 merged commit f4371b6 into master Apr 3, 2024
@lsy323 lsy323 deleted the lsiyuan/fix-linalg-vector-norm branch April 3, 2024 23:53
JackCaoG pushed a commit that referenced this pull request Apr 4, 2024
Co-authored-by: Siyuan Liu <lsiyuan@google.coim>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants