-
Notifications
You must be signed in to change notification settings - Fork 480
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix device mismatch for JaggedTensor from_dense method.
Summary: In the current implementation of `from_dense` method `self.lengths` always created on cpu. This is the problem, because methods that expects both `values` and `lengths` to be on the same device will fail. Fixed implementation to use the same device as values and added test. Reviewed By: joshuadeng Differential Revision: D54330659 fbshipit-source-id: b4aee78c31bb00d03390e37581b349e60a05f6a5
- Loading branch information
1 parent
1f34283
commit 521aae1
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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