Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to convert aten.upsample_nearest2d.vec to stablehlo? #3821

Open
FengJungle opened this issue Oct 29, 2024 · 1 comment
Open

How to convert aten.upsample_nearest2d.vec to stablehlo? #3821

FengJungle opened this issue Oct 29, 2024 · 1 comment

Comments

@FengJungle
Copy link

FengJungle commented Oct 29, 2024

I'm trying to using torchscript.jit.trace to compile stable-diffusion-v1.4 and convert it into stablehlo.
But the conversion failed because of Upsample op in stable-diffusion.

%9885 = stablehlo.add %9884, %9418 : tensor<1x640x16x16xf16>
  %9886 = torch_c.from_builtin_tensor %9885 : tensor<1x640x16x16xf16> -> !torch.vtensor<[1,640,16,16],f16>
  %9887 = torch.aten.upsample_nearest2d.vec %9886, %none, %5889 : !torch.vtensor<[1,640,16,16],f16>, !torch.none, !torch.list<float> -> !torch.vtensor<[1,640,32,32],f16>
  %9888 = torch_c.to_builtin_tensor %9887 : !torch.vtensor<[1,640,32,32],f16> -> tensor<1x640x32x32xf16>
  %9889 = stablehlo.convolution(%9888, %cst_120) d

There is no conversion process torch.aten.upsample_neareast2d.vec, and there is no upsample op in stablehlo. So How to convert it?

@FengJungle
Copy link
Author

openxla/stablehlo#2604
Here is an explaination.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant