MCPcopy Index your code
hub / github.com/pytorch/tutorials / test_fns

Function test_fns

intermediate_source/torch_compile_tutorial.py:245–248  ·  view source on GitHub ↗
(fn1, fn2, args)

Source from the content-addressed store, hash-verified

243
244# Test that `fn1` and `fn2` return the same result, given the same arguments `args`.
245def test_fns(fn1, fn2, args):
246 out1 = fn1(*args)
247 out2 = fn2(*args)
248 return torch.allclose(out1, out2)
249
250
251inp1 = torch.randn(5, 5)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected