Add texture object support in Bin.cu and IrregularSphereMask.cu#435
Add texture object support in Bin.cu and IrregularSphereMask.cu#435ThomasHoffmann77 wants to merge 19 commits intowarpem:mainfrom
Conversation
# Add CUDA 12 texture object support while preserving CUDA <12 compatibility # Description: # - Introduce conditional compilation to use cudaTextureObject_t for CUDA >=12. # - Preserve existing texture reference-based code for older CUDA versions.
# Add CUDA 12 texture object support while preserving CUDA <12 compatibility # Description: # - Introduce conditional compilation to use cudaTextureObject_t for CUDA >=12. # - Preserve existing texture reference-based code for older CUDA versions.
fix d_pitched cuda < 12
c11 fix
c11 fix
add static for parallel cu11 builds
add static for parallel cu11 builds
revert comments
revert comments
remove some comments
remove some comments
remove comment
|
@ThomasHoffmann77 thanks for taking the time to make the PR! I don't know enough to be able to review quickly and we don't have any defined process for outside contributions so I can't guarantee any timeline for this getting looked at properly. I assume you want a CUDA 12 build, could you ask some of your local users to test and report back any issues? :-) |
|
is this the only thing required for cu12 to build or is this a partial solution to a full cu12 build? |
@jmdobbs has kindly offered to run tests over the weekend. |
Based on these changes only in these two files I was able to build a module with GCC/12.3.0 and CUDA/12.1.1 at our site. |
|
With regard to the testing: it does work, but fails semi-randomly (often without an error message) during fs_motion_and_ctf. When it does fail it essentially just puts all 0s for the frame CTF fits, usually for 1-3 images of the 150 in my test set, but the rest of the operations seem to work without issue (so far). Also, it has run through without error in 2/6 of the test runs I've done, probably unrelated to GPU node (i.e. sometimes passes and fails on the same node). |
|
Sorry I missed these 2 files when I made the transition to texture objects a while ago. But I thought I had tested compilation with CUDA >=12 and it worked. Could you please remove the old code instead of branching with #if? I really appreciate the effort to preserve compatibility, but there is no reason not to use texture objects exclusively here since they're already used everywhere else. |
remove conditional compilation cuda <12
remove conditional compilation cuda < 12
fix wrapper
revert 3d kernel
….cu and IrregularSphereMask.cu
|
We now have a test module for commit 6cfa05a on our cluster. I'll keep this PR in 'draft' state for the time being. |
|
I can confirm this works on our L40 and H100 nodes (I tested up to tomogram reconstruction). There is still the bug in fs_motion_and_ctf I describe above, which I will open an issue for, but I have determined that this also randomly occurs in the unmodified dev35 branch (not in dev33 though) so it is unrelated to this PR. |
Testing required! (-> draft)