You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code above creates a function that takes a dictionary of tensors, picks the relevant arguments and then runs the lambdified function. I had to make some minor changes with torch_lamdify but it works for both cpu and cuda. There are some issues when the output is a constant as jit outputs it as an int ot float.
Seems like a good idea?
Describe any alternatives you have considered
No response
Additional context
No response
The content you are editing has changed. Please copy your edits and refresh the page.
Is this a new feature, an improvement, or a change to existing functionality?
Improvement
How would you describe the priority of this feature request
Medium
Please provide a clear description of problem you would like to solve.
I was trying to get some sympy equations to compile with torch jit, and found the issues in the file associated with the torch printer.
While going through how sympy creates lambda functions I was able to hack up the following solution to allow torch jit.
The code above creates a function that takes a dictionary of tensors, picks the relevant arguments and then runs the lambdified function. I had to make some minor changes with torch_lamdify but it works for both cpu and cuda. There are some issues when the output is a constant as jit outputs it as an int ot float.
Seems like a good idea?
Describe any alternatives you have considered
No response
Additional context
No response
Tasks
The text was updated successfully, but these errors were encountered: