-
Notifications
You must be signed in to change notification settings - Fork 21.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[profiler] skip flop compute for Nested tensor (#112767)
Summary: Since nested tensor doesn't have size(), when profiler with_flops is turned on, it throws exception in saveExtraArgs(). It is tricky to support flop computation for Nested tensor because it has dynamic shape. So skip the flop compute for Nested tensor for now instead of throwing exception. Test Plan: Used profiler with NT, the log shows this warning instead of throwing. ```/torch/nested/_internal/nested_tensor.py:205: UserWarning: Failed to save extra arguments for flops computation of op aten::add with input[0] as nested tensor. (Triggered internally at fbcode/caffe2/torch/csrc/profiler/util.cpp:433.)``` Differential Revision: D50919789 Pull Request resolved: #112767 Approved by: https://github.com/aaronenyeshi
- Loading branch information
1 parent
43fb514
commit 2c3ab60
Showing
2 changed files
with
60 additions
and
54 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