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

WIP: BUG: Explicitly update the CPU buffer in OpenCLResampler component #214

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thewtex
Copy link
Contributor

@thewtex thewtex commented Dec 4, 2019

No description provided.

@thewtex thewtex requested review from mstaring and N-Dekker December 4, 2019 16:52
@thewtex
Copy link
Contributor Author

thewtex commented Dec 4, 2019

Is this necessary?

@N-Dekker
Copy link
Member

N-Dekker commented Dec 5, 2019

Is this necessary?

Thanks for asking, Matt! I asked my LKEB/LUMC colleague Denis @dpshamonin and he told me that it never appeared necessary, and was working fine on Windows and Linux without this extra update. Why would you think it is necessary?

@thewtex
Copy link
Contributor Author

thewtex commented Dec 5, 2019

Thanks for asking, Matt! I asked my LKEB/LUMC colleague Denis @dpshamonin and he told me that it never appeared necessary, and was working fine on Windows and Linux without this extra update.

Great, thanks for the feedback @N-Dekker @dpshamonin .

I have OpenCL Elastix Python packages building and running:

InsightSoftwareConsortium/ITKElastix#15

but I run into an odd crash, so I explored this (it did not fix the crash).

The registration runs fine, and resampling occurs on the GPU. It completes successfully. However, when attempting to write the resulting resampled image, it crashes when writing to file. I.e.

# This runs fine
result = itk.elastix_registration_method(fixed, moving)
# This crashes
itk.imwrite(result, 'result.mha')

In Python, I can get the TransformParameterObject, and use it to resample with transformix, and there is no crash (and the output is consistent with the CPU version).

The closest hint when debugging the backtrace on the result image is that the segfault occurs here:

https://github.com/InsightSoftwareConsortium/ITK/blob/3dcd26487bd7c9948799929d182ca08a15b0610a/Modules/Core/Common/include/itkImageBase.hxx#L224-L227

So, there is something missing, (maybe a graft or sync??) in the ITK-Elastix / elastix / GPU layers. @dpshamonin @N-Dekker @kaspermarstal @mstaring does this ring any bells?

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

Successfully merging this pull request may close these issues.

2 participants