GPU gibbs priors refactoring#1629
Conversation
- Delete generated CMake and Makefile files - Remove build configuration files - Clean up repository for pull request
…ginal - Remove generated CMake and Makefile build artifacts - Revert QuadraticPrior.cxx to upstream version (removed experimental changes)
- Revert QuadraticPrior.h to upstream version - Revert RelativeDifferencePrior.h to upstream version - Revert CudaRelativeDifferencePrior.cu to upstream version - Revert RelativeDifferencePrior.cxx to upstream version - Remove VS Code workspace file from version control Only keeping new CUDA Gibbs prior implementation files
…tions - Add GibbsRelativeDifferencePrior to recon_buildblock registries - Remove duplicate QuadraticPotential template instantiation - Ensure proper class registration for Python bindings
- Add STIR_WITH_CUDA flag to CMake SWIG flags for proper conditional compilation - Reorganize stir_priors.i to use #ifdef guards for CUDA-specific declarations - Move CUDA shared_ptr declarations and template instantiations inside conditional blocks - Revert utilities/CMakeLists.txt to original (remove test utilities) - Remove personal test file stir_prior_timings.cxx from version control - Clean up template instantiation order and remove duplicate declarations This ensures CUDA priors are only compiled when CUDA support is available, improving build compatibility across different environments.
…ties.cuh for reuse across CUDA modules
deleted vscode workspace file
Removed CUDA Toolkit dependency from CMake configuration.
Co-authored-by: Kris Thielemans <KrisThielemans@users.noreply.github.com>
… profiling headers from CudaGibbsPrior.cuh
|
Appveyor errors with so still something wrong with |
|
@casperdcl can you help with the following? @ColomboMatte0 commited sometimes as I suppose I could do the squash locally, correct the author, then push that to |
|
i guess there are some instantiation problem for the cpu classes now? amazing! |
|
You should be able to squash-merge from the UI, and the author will be @ColomboMatte0 as the person who opened the PR - just tidy the squash commit message (remove the "coauthored by root" line at the bottom). |
no, this isn't instantiation. The problem is that STIR/src/include/stir/RegisteredParsingObject.h Lines 80 to 84 in 1f2556b I don't know why this only appears now though. |
|
Ubuntu jobs fail, and are running SWIG 4.2.0. MacOS and AppVeyor jobs are fine, and are running SWIG 4.4.0. |
Looks like we might not have run the Actions workflow recentl (as I need to approve it) |
I guess it's related to having removed the .cxx and .cu. The constructors were working fine back there. |
|
The problem is the "overloading" of the |
|
The SWIG preprocessor thing is a bit horrible. As a test, I think replacing might work, but I need to find something better |
yes, before the definition of the constructor was in the .cxx and .cu, which meant that the wrapper just linked to it. Now it's in the .h, which means that they also need to be compiled when compiling the wrapper . In any case, having a class definition that changes depending on preprocessor options seems like a recipe for disaster. The only place where it should be safe is for the |
|
The test you suggestet is working, but now i get another error on the MacOS job on recon_testpack related to SRT2D, which i think belong to another PR.Have i done something wrong? |
|
MacOS clang 21 failure due to #1420, all the rest got through! So no, you didn't do anything wrong :-) |
|
@ColomboMatte0 I've created #1647. Let's see... |
No longer use `#ifdef SWIG` to change the class definition when compiling the wrapper, but introduce a new preprocessor symbol STIR_COMPILING_SWIG_WRAPPER. This should be used with care! (currently only for typedef etc).
now that we no longer compile the SWIG-generated wrapper with -DSWIG, go back to original version
|
I've merged #1647 and updated this PR accordingly. Fingers crossed. |
Everything worked right? |
|
celebration time! |
Main changes:
See presentation:
[https://www.ccpsynerbi.ac.uk/wp-content/uploads/2025/09/GibbsPrior_presentation.pdf]
GibbsPrior.pptx
##Minor changes
Checklist before requesting a review
documentation/release_XXX.mdhas been updated with any functionality change (if applicable)Please tick the following: