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

Enable usage of specific GPU-instances for segmentation #1

Open
maxschloegel opened this issue Jul 31, 2023 · 2 comments
Open

Enable usage of specific GPU-instances for segmentation #1

maxschloegel opened this issue Jul 31, 2023 · 2 comments
Assignees

Comments

@maxschloegel
Copy link
Contributor

As discussed today, I would need to specify the GPU-instance I want to use for segmentation (or potentially other uses).

For now it should be enough to get this working for torch (not yet tensorflow)

To-Do:

-[ ] Understand where GPUs are used
-[ ] Implement cuda-device as parameter for relevant functions ('cuda:0', 'cuda:1', ...)
-[ ] Think of good default values, if cuda-device is not specified
-[ ] Write tests that check if correct cuda is defined and used
-[ ] Update Changelog

@maxschloegel
Copy link
Contributor Author

@paulmueller , you can assign me.

@paulmueller
Copy link
Member

paulmueller commented Jul 31, 2023

A few additional notes from my side:

  • By design of dcnum, your torch GPU segmenter will have to make sure that it is running on a GPU, or else raise an exception. There should not be a fallback-to-CPU, instead a cpu-only version should be implemented (if that is needed).
  • I don't know whether this gpu_index=0 should be a general option for all GPU segmenters or not.
  • Ideally, you would not have to edit any code specifically in dcnum for now, because you could just subclass from GPUSegmenter and define everything you need (including the gpu_index=0 and torch-related part) in that class.
  • But there are probably bugs or cases I have not thought about in the current implementation, so there might have to be modifications of dcnum.
  • GitHub Actions and GPU: probably need to have special runners or hardware defined in the .yaml files.
  • The gpu_index argument should not be part of the pipeline ID, so it should not be one of the keywords-only argument...

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