torch.fx.passes.infra.pass_manager.this_before_that_pass_constraint#
- torch.fx.passes.infra.pass_manager.this_before_that_pass_constraint(this, that)[source]#
Defines a partial order (‘depends on’ function) where
thismust occur beforethat.For example, the following pass list and constraint list would be invalid:
passes = [pass_b, pass_a] constraints = [this_before_that_pass_constraint(pass_a, pass_b)]
- Parameters:
this (Callable) – pass which should occur first
that (Callable) – pass which should occur later
- Returns:
depends_on (Callable[[Object, Object], bool])
- Return type:
Warning
This API is experimental and is NOT backward-compatible.