-
Notifications
You must be signed in to change notification settings - Fork 4
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
Rescale to int cpu/gpu agnostic #157
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In particular, the reassignment of `res_cpu` made things a bit confusing.
Apologies for the broken IRIS CI job, it looks like maybe IRIS isn't happy, the conda env failed to be created... https://github.com/DiamondLightSource/httomolibgpu/actions/runs/11052312862/job/30704122840?pr=157 |
Merged
3 tasks
Detailed docs page added Seems like IRIS is down, I'm merging this PR... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CPU-GPU
rescale_to_int
function. All tests modified to compare the results of CPU with GPU results.I discovered that the GPU function accepts only float32 array as an input yet the CPU one can accept any data type (because of the cast to float64). The GPU implementation is significantly more memory efficient because of the elementwise loop and casting scalars instead of arrays compared to Python one-liners.
So far I don't see the reason to satisfy other data type inputs, however, in future we might work with
uint16
then this code must be adapted accordingly.I'll modify image saver in here accordingly, we need to remove redundant parameters.