MCPcopy Create free account
hub / github.com/pytorch/executorch / call_while

Method call_while

exir/pass_base.py:541–564  ·  view source on GitHub ↗
(
        self,
        cond_fn: torch.fx.GraphModule,
        body_fn: torch.fx.GraphModule,
        carried_inputs: List[Argument],
        additional_inputs: List[Argument],
        meta: NodeMetadata,
    )

Source from the content-addressed store, hash-verified

539 )
540
541 def call_while(
542 self,
543 cond_fn: torch.fx.GraphModule,
544 body_fn: torch.fx.GraphModule,
545 carried_inputs: List[Argument],
546 additional_inputs: List[Argument],
547 meta: NodeMetadata,
548 ) -> ProxyValue:
549 cond_fn = self.call_submodule(cond_fn, (*carried_inputs, *additional_inputs))
550 body_fn = self.call_submodule(body_fn, (*carried_inputs, *additional_inputs))
551 assert cond_fn is not None
552 assert body_fn is not None
553 return self._fx(
554 "call_function",
555 torch.ops.higher_order.while_loop,
556 (
557 cond_fn.graph_module,
558 body_fn.graph_module,
559 carried_inputs,
560 additional_inputs,
561 ),
562 {},
563 meta,
564 )
565
566 def call_map(
567 self,

Callers 1

call_functionMethod · 0.80

Calls 2

call_submoduleMethod · 0.95
_fxMethod · 0.95

Tested by

no test coverage detected