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

Overload binary elementary operations to accept Fortran arrays #242

Open
jwallwork23 opened this issue Jan 15, 2025 · 0 comments
Open

Overload binary elementary operations to accept Fortran arrays #242

jwallwork23 opened this issue Jan 15, 2025 · 0 comments
Assignees
Labels
autograd Tasks towards the online training / automatic differentiation feature enhancement New feature or request

Comments

@jwallwork23
Copy link
Contributor

I had a brainwave: if we overload each binary elementary operation (+, -, *, /) so that it can accept a tensor and a Fortran array then we can apply torch_tensor_from_array to the Fortran array inside the operator and then output the tensor from the existing overloads. By doing so, it won't be necessary for users to rewrite their downstream code using tensors. All we need is the tensor that comes out of the network and then we can set things up so that anything that interacts with it outputs a tensor, thereby tracking the gradient.

@jwallwork23 jwallwork23 added enhancement New feature or request autograd Tasks towards the online training / automatic differentiation feature labels Jan 15, 2025
@jwallwork23 jwallwork23 self-assigned this Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autograd Tasks towards the online training / automatic differentiation feature enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant