EIDOSLAB / EIDOSLAB/torchstain

No GPU acceleration in torch backend

Open
#49 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
191
Forks
30
PR merge metrics
No merged PRs in 30d

Description

**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]

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.