-from collections import defaultdict
import enum
from abc import ABCMeta, abstractmethod
from enum import Enum, unique
if out.tied_input_index >= len(self.inputs):
raise ValueError(f"tied_input_index out of range: {out}")
tied_inp = self.inputs[out.tied_input_index]
- if tied_inp.tied_to_input(out.tied_input_index) != out:
+ expected_out = tied_inp.tied_to_input(out.tied_input_index) \
+ .with_write_stage(out.write_stage)
+ if expected_out != out:
raise ValueError(f"output can't be tied to non-equivalent "
f"input: {out} tied to {tied_inp}")
if out.fixed_loc is not None: