Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use VecGeom recommendations for device linking #285

Closed

Conversation

drbenmorgan
Copy link
Member

As outlined in VecGeom README and build scripts, we have to be very careful about linking to its CUDA component when we ourselves use VecGeom's CUDA functions. This is a small update to AdePT to use these recommendations:

  1. Linking to vecgeomcuda privately, adding vecgeomcuda_static to the device link step.
  2. Use CUDA_RUNTIME_LIBRARY as "Shared" to link to same runtime as used by vecgeomcuda

The public link to vecgeom is retained currently due to AdePT_G4_integration still exposing some of VecGeom in its interfaces, which is fine for now.

This change is required to allow use of G4VG for in memory use of Geant4-VecGeom conversions, but I've submitted just the linking change in isolation first to cross-check if this exposes as-needed (it doesn't locally at least) or performance issues.

As outlined in VecGeom README and build scripts, have to be _very_
careful about linking to CUDA component when we ourselves use
VecGeom's CUDA functions. Update AdePT to use these by

1. Linking to vecgeomcuda privately, add vecgeomcuda_static to device
   link step.
2. Use CUDA_RUNTIME_LIBRARY as "Shared" to link to same runtime as
   used by vecgeomcuda

Public link to vecgeom is retained currently due to
AdePT_G4_integration still exposing some of VecGeom in its interfaces.
@phsft-bot
Copy link

Can one of the admins verify this patch?

@drbenmorgan
Copy link
Member Author

Closing as superseded by #289

@drbenmorgan drbenmorgan closed this May 1, 2024
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.

2 participants