-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add fast path for
TensorBase::map
for contiguous tensors
This fast path already existed for `TensorBase::apply`. In a simple transformer model with ~25M params, this reduced time over 9 `Pow` operations used to square inputs with 128*512 elements from ~1.2ms to ~0.2ms.
- Loading branch information
1 parent
5e654ea
commit 5562fd2
Showing
2 changed files
with
24 additions
and
5 deletions.
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