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

wrap libtorch rank and shape routines #180

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

TomMelt
Copy link
Member

@TomMelt TomMelt commented Oct 17, 2024

the tensor derived type now supports two methods:

  • get_rank
  • get_shape

These methods return the shape and rank of the tensor

the tensor derived type now supports two methods:
- `get_rank`
- `get_shape`

These methods return the shape and rank of the tensor
@TomMelt TomMelt added the enhancement New feature or request label Oct 17, 2024
@TomMelt TomMelt self-assigned this Oct 17, 2024
Copy link
Member

@jatkinson1000 jatkinson1000 left a comment

Choose a reason for hiding this comment

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

Thanks @TomMelt

This all reads correctly to me.
I have looked at the libtorch API, but will clarify that I have not run it myself.
I presume you have tested these routines yourself locally and they perform as expected?

I don't think we can insist on tests here (as they are lacking elsewhere in the code) but as we bring more of these "utility" routines across we should look at tackling #4 with more priority.
I suppose there will be some integration testing from the autograd example.

@TomMelt TomMelt requested a review from ma595 October 21, 2024 08:49
Copy link
Contributor

@jwallwork23 jwallwork23 left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @TomMelt.

@TomMelt
Copy link
Member Author

TomMelt commented Oct 21, 2024

all reads correctly to me.

Thanks @jatkinson1000 . Spot on.

  • I plan to add unit tests in the near future with pFUnit.
  • I did check locally by manually modifying the integration test but I will put a proper test in for the autograd work

@TomMelt TomMelt merged commit f56cdd4 into bugfix-pointer-problems Oct 21, 2024
5 checks passed
@TomMelt TomMelt deleted the wrap-libtorch-rank-shape branch October 21, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants