Open
Description
I would like to add support for the torch.hinge_embedding_loss operation in the Torch dialect of Torch-MLIR.
I tested with the torch.hinge_embedding_loss using fx.export_and_import and the reproduced error is
Minimal Reproduction
import torch
import torch.nn as nn
from torch_mlir import fx
def run(f):
print(f"{f.__name__}")
print("-" * len(f.__name__))
f()
print()
@run
def test_hinge_embedding_loss():
class HingeEmbeddingLossModule(nn.Module):
def __init__(self):
super().__init__()
def forward(self,x):
input,target=x
return torch.hinge_embedding_loss(input,target)
exported=fx.export_and_import(HingeEmbeddingLossModule(),(torch.randn(5,3),torch.randn(1)),output_type='torch')
print(exported)
Metadata
Metadata
Assignees
Labels
No labels