Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ AddModel(Resize_F32_R4_nearest)
AddModel(Shape_F32_R4)
AddModel(Sigmoid_F32_R2)
AddModel(Sigmoid_F32_R4)
# AddModel(Sign_F32_R4) # TODO activate after supporting this operation
AddModel(Sin_F32_R4)
AddModel(Slice_F32_R2_4) # Rank2 of Slice_F32_R4_4
AddModel(Slice_F32_R3_4) # Rank3 of Slice_F32_R4_4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ AddModel(Rsqrt_F32_R4)
AddModel(Shape_F32_R4)
AddModel(Sigmoid_F32_R2)
AddModel(Sigmoid_F32_R4)
# AddModel(Sign_F32_R4) # TODO activate after supporting this operation
AddModel(Sin_F32_R4)
AddModel(Slice_F32_R2_4) # Rank2 of Slice_F32_R4_4
AddModel(Slice_F32_R3_4) # Rank3 of Slice_F32_R4_4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ AddModel(Rsqrt_F32_R4)
AddModel(Shape_F32_R4)
AddModel(Sigmoid_F32_R2)
AddModel(Sigmoid_F32_R4)
# AddModel(Sign_F32_R4) # TODO activate after supporting this operation
AddModel(Sin_F32_R4)
AddModel(Slice_F32_R2_4) # Rank2 of Slice_F32_R4_4
AddModel(Slice_F32_R3_4) # Rank3 of Slice_F32_R4_4
Expand Down
19 changes: 19 additions & 0 deletions circle-mlir/models/unit/Sign_F32_R4/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import torch


# Generate Sign operator with Float32, Rank-4
class net_Sign(torch.nn.Module):
def __init__(self):
super().__init__()

def forward(self, input):
return torch.sign(input)

def onnx_opset_version(self):
# TODO set to appropriate value
return 14


_model_ = net_Sign()

_inputs_ = torch.randn(1, 2, 3, 3)