Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/pytorch/tutorials
/ opt_foo2
Function
opt_foo2
intermediate_source/torch_compile_tutorial.py:84–87 ·
view source on GitHub ↗
(x, y)
Source
from the content-addressed store, hash-verified
82
83
@torch.compile
84
def
opt_foo2(x, y):
85
a = torch.sin(x)
86
b = torch.cos(y)
87
return
a + b
88
89
90
print(opt_foo2(torch.randn(3, 3), torch.randn(3, 3)))
Callers
1
torch_compile_tutorial.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected