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

Torch Backend in Transpiler #28860

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Torch Backend in Transpiler #28860

wants to merge 1 commit into from

Conversation

yugborana
Copy link

PR Description

Related Issue

#28848

Checklist

  • Did you add a function?
  • Did you add the tests?
  • Did you run your tests and are your tests passing?
  • Did pre-commit not fail on any check?
  • Did you follow the steps we provided?

@yugborana
Copy link
Author

@Sam-Armstrong @YushaArif99 Good Afternoon. Would like to request for a review?

Copy link
Contributor

@Sam-Armstrong Sam-Armstrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yugborana Thanks for making the PR!

Looks like there's a few more things that will need changing before this works correctly. For example, you'll need to add torch as one of the SUPPORTED_S2S_TARGETS in ivy/transpiler/main_config.py.

I'd recommend using the following minimal example to check your solution is working correctly:

import kornia
import torch
import ivy

new_kornia = ivy.transpile(kornia, target="torch", reuse_existing=False)
rgb_image = torch.randn((1, 3, 224, 224))
gray_image = new_kornia.color.rgb_to_grayscale(rgb_image)

You can see this currently fails with the error ivy.transpiler.exceptions.exceptions.InvalidTargetException: 'target' must be one of ['tensorflow', 'jax', 'numpy', 'ivy', 'torch_frontend']. - but it looks like there are still other problems after fixing this.

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

Successfully merging this pull request may close these issues.

2 participants