|
1715 | 1715 | inspec=[
|
1716 | 1716 | InPosArg(ArgType.Tensor, name="self"),
|
1717 | 1717 | ],
|
1718 |
| - outspec=[OutArg(ArgType.Tensor)], |
| 1718 | + outspec=[ |
| 1719 | + OutArg( |
| 1720 | + ArgType.Tensor, |
| 1721 | + constraints=[ |
| 1722 | + cp.Dtype.In(lambda deps: dt.can_cast_from(torch.float)), |
| 1723 | + cp.Dtype.In(lambda deps: dt.can_cast_from(deps[0].dtype)), |
| 1724 | + ], |
| 1725 | + ) |
| 1726 | + ], |
| 1727 | + ), |
| 1728 | + Spec( |
| 1729 | + op="log10.default", # (Tensor self) -> Tensor |
| 1730 | + inspec=[ |
| 1731 | + InPosArg(ArgType.Tensor, name="self"), |
| 1732 | + ], |
| 1733 | + outspec=[ |
| 1734 | + OutArg( |
| 1735 | + ArgType.Tensor, |
| 1736 | + constraints=[ |
| 1737 | + cp.Dtype.In(lambda deps: dt.can_cast_from(torch.float)), |
| 1738 | + cp.Dtype.In(lambda deps: dt.can_cast_from(deps[0].dtype)), |
| 1739 | + ], |
| 1740 | + ) |
| 1741 | + ], |
| 1742 | + ), |
| 1743 | + Spec( |
| 1744 | + op="log1p.default", # (Tensor self) -> Tensor |
| 1745 | + inspec=[ |
| 1746 | + InPosArg(ArgType.Tensor, name="self"), |
| 1747 | + ], |
| 1748 | + outspec=[ |
| 1749 | + OutArg( |
| 1750 | + ArgType.Tensor, |
| 1751 | + constraints=[ |
| 1752 | + cp.Dtype.In(lambda deps: dt.can_cast_from(torch.float)), |
| 1753 | + cp.Dtype.In(lambda deps: dt.can_cast_from(deps[0].dtype)), |
| 1754 | + ], |
| 1755 | + ) |
| 1756 | + ], |
| 1757 | + ), |
| 1758 | + Spec( |
| 1759 | + op="log2.default", # (Tensor self) -> Tensor |
| 1760 | + inspec=[ |
| 1761 | + InPosArg(ArgType.Tensor, name="self"), |
| 1762 | + ], |
| 1763 | + outspec=[ |
| 1764 | + OutArg( |
| 1765 | + ArgType.Tensor, |
| 1766 | + constraints=[ |
| 1767 | + cp.Dtype.In(lambda deps: dt.can_cast_from(torch.float)), |
| 1768 | + cp.Dtype.In(lambda deps: dt.can_cast_from(deps[0].dtype)), |
| 1769 | + ], |
| 1770 | + ) |
| 1771 | + ], |
1719 | 1772 | ),
|
1720 | 1773 | Spec(
|
1721 | 1774 | op="logical_and.default", # (Tensor self, Tensor other) -> Tensor
|
|
0 commit comments