Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/executorch
/ forward
Method
forward
profiler/test/test_profiler_e2e.py:40–43 ·
view source on GitHub ↗
(self, x)
Source
from the content-addressed store, hash-verified
38
self.register_buffer(
"b"
, 2 * torch.ones(2, 2, dtype=torch.float))
39
40
def
forward(self, x):
41
a = torch.mul(self.a, x)
42
b = torch.add(a, self.b)
43
return
b
44
45
46
class
TestCustomOps(unittest.TestCase):
Callers
nothing calls this directly
Calls
2
mul
Method · 0.80
add
Method · 0.45
Tested by
no test coverage detected