Skip to content

Conversation

@Qubitol
Copy link
Collaborator

@Qubitol Qubitol commented Nov 3, 2025

This fixes #1060.

If the user does not provide MADGRAPH_CUDA_ARCHITECTURE as a comma-separated list, we detect it using nvidia-smi (this queries all the GPUs in the system).
The output (in either case) is a comma-separated list of numbers.
We then build against each one of them (sm_*), and also for the highest PTX, to ensure forward compatibility.

In this way the makefile automatically adapts to the GPUs present in the system, even if they are of different compute capability, the binary would be able to run on those, and if CUDA will ever drop a certain compute capability, there would be no need to change the makefile.

We default to 70 (V100) in case of any error incurring during detection (with logs explaining that we weren't able to detect the arch automatically).

Possible enhancements: consider check for the presence of CUDA_VISIBLE_DEVICES and selects the arch only of those visible GPUs.

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.

Default GPU architecture

1 participant