BrownBiomechanics / Autoscoper

Autoscoper is a 2D-3D image registration software package.
https://autoscoper.readthedocs.io
Other
8 stars 5 forks source link

SAM (cuda) crash with mayo shoulder data cfg load #241

Closed amymmorton closed 9 months ago

amymmorton commented 10 months ago

as built 12/13/2023 - cuda enabled,

callstackCUDA_debug crash shoulder

More details to follow

NicerNewerCar commented 10 months ago

The changes I made in #76 resolve this error

NicerNewerCar commented 10 months ago

For future reference, this error was caused by the texture reference used to render the radiograph being hardcoded to unsigned char datatype, while the array (data read right from the TIFF file) can be set up to be unsigned char, unsigned short, or unsigned int

https://github.com/BrownBiomechanics/Autoscoper/blob/644473784dd0018f5bf8518c5e5322092e4da07d/libautoscoper/src/gpu/cuda/RadRenderer_kernels.cu#L48 https://github.com/BrownBiomechanics/Autoscoper/blob/644473784dd0018f5bf8518c5e5322092e4da07d/libautoscoper/src/gpu/cuda/RadRenderer.cpp#L87-L96