Skip to content

Commit

Permalink
Remove operand constraints from python golden verification
Browse files Browse the repository at this point in the history
  • Loading branch information
jserbedzijaTT committed Dec 11, 2024
1 parent d3ec685 commit 27962ce
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions python/test_infra/ttir_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,33 +192,6 @@ def _override_golden(self, operand: Operand, golden: Golden) -> None:
def _get_golden_tensor(self, operand: Operand) -> torch.Tensor:
return self._get_golden(operand).tensor

def _get_operand_constraint_attr(
self,
num_operands: int,
operand_constraints: Optional[List[tt.OperandConstraint]] = None,
) -> tt.ir.OperandConstraintAttr:
"""
Helper method to prepack operand constraints given as a list of enums
to a list of tt.ir.OperandConstraintAttr and wrap that list in an
tt.ir.OperandConstraintAttr.
If no `operand_constraints` are passed, `tt.OperandConstraint.Any` will
be used for each operand.
"""
operand_constraints = (
operand_constraints
if operand_constraints is not None
else [tt.OperandConstraint.Any for _ in range(num_operands)]
)

return tt.ir.OperandConstraintAttr.get(
self._ctx,
[
tt.ir.OperandConstraintAttr.get(self._ctx, operand_constraint)
for operand_constraint in operand_constraints
],
)

@property
def _default_dtype(self) -> Type:
return F32Type.get(self._ctx)
Expand Down Expand Up @@ -304,7 +277,6 @@ def eltwise_proxy(
[self._get_type(output)],
inputs,
[output],
self._get_operand_constraint_attr(3),
loc=loc,
)

Expand Down

0 comments on commit 27962ce

Please sign in to comment.