Skip to content

prototype of kornia.set_backend#6

Open
Sam-Armstrong wants to merge 1 commit intoset-backendfrom
set-backend-prototype
Open

prototype of kornia.set_backend#6
Sam-Armstrong wants to merge 1 commit intoset-backendfrom
set-backend-prototype

Conversation

@Sam-Armstrong
Copy link

@hmahmood24 @YushaArif99 from Edgar's latest comment on the merged kornia PR about kornia.set_backend, do we think something like this would work? Of course we'd have to make some changes to the tracer-transpiler to accommodate this functionality, but can you see any issues with it fundamentally?


# TODO: unwrap and re-wrap the kornia module if, say, it's already converted to jax and the user wants to convert it to tensorflow
# TODO: ensure that torch -> torch works fine by returning the existing module
# TODO: ensure that framework -> torch works fine by unwrapping the existing module

Choose a reason for hiding this comment

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

what does this point refer to exactly? for kornia, isn't source=torch always going to be the case?

Copy link
Author

Choose a reason for hiding this comment

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

this is referring to the case that a user does something like:

import  kornia
kornia.set_backend("tensorflow")
kornia.set_backend("torch")

so in this case we'd need to just unwrap the module

Copy link

@YushaArif99 YushaArif99 left a comment

Choose a reason for hiding this comment

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

lgtm! I guess we might need to add some additional logic to accommodate for this functionality, as you mention. But there shouldn't be any fundamental limitations here in getting this implemented.

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

Comments