-
Notifications
You must be signed in to change notification settings - Fork 15
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
add subroutine to delete arrays of tensors #155
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TomMelt First glance looks good.
However, we'll need any examples in the documentation and readme also updating if you can go through these as well please?
I also wonder if your original suggestion of having an interface to delete both an array or a single tensor is a better to simplify the subroutine options. However, I also see that the explicitness of two different routines is more 'Fortranic'.
done |
@TomMelt Thanks - I wonder if an addition to the API changes page to point out this new option might be useful, though not essential as the old function is preserved? Also I added a comment above with an edit for your thoughts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Neatens things up a bit.
A new thought on looking at some code today - perhaps we could have an interface |
This PR adds a subroutine (
torch_tensor_array_delete
) to delete arrays of tensors. This eliminate the need to manually loop over all elements of the array callingtorch_tensor_delete
, see e.g.,FTorch/examples/4_MultiIO/multiionet_infer_fortran.f90
Lines 57 to 60 in 490272e
Which now becomes,
FTorch/examples/4_MultiIO/multiionet_infer_fortran.f90
Lines 57 to 58 in e24c380
torch_tensor_array_delete
to delete arrays of tensors