MCPcopy Create free account
hub / github.com/pytorch/tutorials / false_branch

Function false_branch

intermediate_source/torch_compile_tutorial.py:378–380  ·  view source on GitHub ↗
(y)

Source from the content-addressed store, hash-verified

376 return y * -1
377
378 def false_branch(y):
379 # NOTE: torch.cond doesn't allow aliased outputs
380 return y.clone()
381
382 b = cond(b.sum() < 0, true_branch, false_branch, (b,))
383 return x * b

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected