Created
March 29, 2022 21:52
-
-
Save shunting314/8d5e2d9348a3258959d3954186c48814 to your computer and use it in GitHub Desktop.
One of the Fx graph generated by dynamo for hf_Bart: the graph create tensors without specifying device
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
graph(): | |
%full : [#users=2] = call_function[target=torch.full](args = ((512, 512), -inf), kwargs = {}) | |
%arange : [#users=2] = call_function[target=torch.arange](args = (512,), kwargs = {}) | |
%add : [#users=1] = call_function[target=operator.add](args = (%arange, 1), kwargs = {}) | |
%view : [#users=1] = call_method[target=view](args = (%add, 512, 1), kwargs = {}) | |
%lt : [#users=1] = call_function[target=operator.lt](args = (%arange, %view), kwargs = {}) | |
%masked_fill_ : [#users=0] = call_method[target=masked_fill_](args = (%full, %lt, 0), kwargs = {}) | |
%to : [#users=1] = call_method[target=to](args = (%full, torch.float32), kwargs = {}) | |
%getitem : [#users=1] = call_function[target=operator.getitem](args = (%to, (None, None, slice(None, None, None), slice(None, None, None))), kwargs = {}) | |
%expand : [#users=1] = call_method[target=expand](args = (%getitem, 1, 1, 512, 512), kwargs = {}) | |
return (expand,) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment