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

[Bugfix][Habana_main] fix guided_decode HPU failing issue #236

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __call__(self, input_ids: List[int],
-math.inf,
device=scores.device)
mask[allowed_tokens] = 0
scores.add_(mask)
scores = scores.add(mask)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious, what's the difference here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be no difference in result, however, 'add_' is executing in_place, while 'add' will return a tensor.
From my test, using 'add_' leads to "RuntimeError: synNodeCreateWithId failed for node: strided_insert with synStatus 1 [Invalid argument]. ", replacing with 'add' fixed above issue

return scores


Expand Down
Loading