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

grid flip is slow in central slice grid generation #55

Open
alisterburt opened this issue Jan 15, 2024 · 2 comments
Open

grid flip is slow in central slice grid generation #55

alisterburt opened this issue Jan 15, 2024 · 2 comments

Comments

@alisterburt
Copy link
Member

if rotation_matrix_zyx is False:
grid = torch.flip(grid, dims=(-1,))

@rsanchezgarc pointed out this is really slow as it copies the tensor... negative strides aren't supported so not sure of the best way to deal with this right now, flipping the matrices may be cheaper at the expense of simplicity of implementation...

@rsanchezgarc
Copy link
Collaborator

We can leave it as it is with a "#TODO: Investigate how to make it faster". I am sure negative striding is a feature that people demand for pytorch, so eventually, it will be there.

@alisterburt
Copy link
Member Author

For sure, it seems like they might have done some things that make it fundamentally quite difficult though - the issues go back a long way (e.g. pytorch/pytorch#604)

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

No branches or pull requests

2 participants