Skip to content

Fix pixi compilation for CUDA related plugins#6108

Open
bakpaul wants to merge 6 commits intosofa-framework:masterfrom
bakpaul:26_05_fix_conda_compilation_pixi
Open

Fix pixi compilation for CUDA related plugins#6108
bakpaul wants to merge 6 commits intosofa-framework:masterfrom
bakpaul:26_05_fix_conda_compilation_pixi

Conversation

@bakpaul
Copy link
Copy Markdown
Contributor

@bakpaul bakpaul commented May 6, 2026

Pixi compilation of SodaCUDA was broken because of two reasons :

  1. Missing packages now that cublas is required (by the way cusparse was also missing)
  2. Now that we force double compilation by default, using the "native" architecture in pixi wasn't working anymore because it fall into an architecture not supporting double. To fix this properly I removed the option SOFACUDA_ENABLE_NATIVE_ARCHITECTURE current and instead use native as the default fallback instead of a random architecture. This makes more sense, a newby wanting to build it will expect it to build it for his architecture when providing no information...

By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@bakpaul bakpaul added pr: fix Fix a bug pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: status to review To notify reviewers to review this pull-request labels May 6, 2026
@bakpaul bakpaul changed the title Install required dependencies and fix CMakeLists.txt Fix pixi compilation for CUDA related plugins May 6, 2026
@bakpaul bakpaul force-pushed the 26_05_fix_conda_compilation_pixi branch from e20f65b to 60a96fb Compare May 6, 2026 14:37
message(NOTICE "CMAKE_CUDA_ARCHITECTURES is not set, it will be set by default to 75")
set(CMAKE_CUDA_ARCHITECTURES 75)
message(NOTICE "CMAKE_CUDA_ARCHITECTURES is not set, it will be set by default to native")
set(CMAKE_CUDA_ARCHITECTURES native)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that native keyword is only supported for CMake >=3.24 https://cmake.org/cmake/help/latest/prop_tgt/CUDA_ARCHITECTURES.html and this plugin is supposed to be compatible with cmake >=3.22

so thats why the fallback was setting a hard-coded version.
I guess the solution would be to force cmake 3.24 in the header of this file

Comment thread .github/workflows/ci-macos-linux-windows-pixi.yml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: fix Fix a bug pr: status to review To notify reviewers to review this pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants