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

No GPU acceleration in torch backend #49

Open
CielAl opened this issue Jul 20, 2023 · 0 comments
Open

No GPU acceleration in torch backend #49

CielAl opened this issue Jul 20, 2023 · 0 comments

Comments

@CielAl
Copy link

CielAl commented Jul 20, 2023

Describe the bug
A clear and concise description of what the bug is.
It seems like all parameters of the torch-based normalizers are hard coded as tensors on CPUs and therefore there are no GPU acceleration at all unless one explicitly move the target, input, and all stain vectors to GPU devices.
Might be an easier way to fix this by making your torch normalizer also extend from torch.nn.Modules like all torchvision's transformation API does, and use register_buffer to store parameters and the whole normalizer object can be moved to specified device as whole.

To Reproduce
Steps to reproduce the behavior. Ideally a gist but a simple code example is also fine.

Expected behavior
A clear and concise description of what you expected to happen.

Logs
If applicable, add sufficient logs to assist in debugging the problem.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Ubuntu, Windows, macOS]
  • Version [e.g. 20.04, 10, Catalina]
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

1 participant