-
Notifications
You must be signed in to change notification settings - Fork 67
Alpaka inhomogeneous magnetic field #1202
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
Merged
Merged
Changes from 12 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
7425f29
Start to add alpaka magnetic field implementation
StewMH 5ecf0ff
Temporary change to covfie fork
StewMH 20daddb
Fix formatting
StewMH 9e0a410
Merge remote-tracking branch 'upstream/main' into alpaka_magfield
StewMH 690568a
Update magnetic field
StewMH a82ec28
Fixes for CUDA
StewMH b337f26
Fix include
StewMH 7d5e3cd
Fixes
StewMH 0ec0818
Formatting
StewMH 98ab783
Update SYCL code, tell CI to build SYCL and CUDA when building releva…
StewMH d7550a0
Add CPU implementation
StewMH 9a20eb5
Fix formatting
StewMH c9d5a49
Fixes for CPU running
StewMH 3b49096
Improve kalman fitter error handling (#1191)
niermann999 f047bc9
Switch to default navigator for backward fit
niermann999 3f9da81
Update to detray v0.105.1
niermann999 bf36868
Improved hole count (#1109)
niermann999 85e6833
Read measurement dimensionality from detector
stephenswat 9640360
Update track covariance estimation logic
stephenswat 113339c
Save disk space in CUDA CI job
stephenswat 753b362
Remove Kokkos and Futhark code bases
stephenswat 3728179
Nade measurement sorting handle empty collections correctly.
krasznaa 8c5af92
Use new covfie tag
StewMH 6859c85
Merge remote-tracking branch 'upstream/main' into alpaka_magfield
StewMH 526a56c
Revert to URL, fix download
StewMH a9f91c7
Merge branch 'main' into alpaka_magfield
StewMH 52a9025
Separate CUDA utils into separate library for use in Alpaka
StewMH 55803c7
Moving to traccc::cuda_utils from traccc_cuda_utils
StewMH 6e7a060
Moving to cuda_utils in CI
StewMH e53c178
Move sycl utils to sycl_utils, use in alpaka
StewMH 7cc0fc7
Link against sycl_utils
StewMH 6cc2f9b
Use ::
StewMH 277291a
Merge remote-tracking branch 'upstream/main' into alpaka_magfield
StewMH 5a8ad3b
Only put magnetic field utilities in own library: SYCL edition
StewMH 16529b5
Split out queue_wrapper for use in magfield and main SYCL library
StewMH a7cecc2
Add get_queue to sycl_queue library
StewMH 3b2a762
Pre-apply merge results for cmake files
StewMH 25a369f
Merge remote-tracking branch 'upstream/main' into alpaka_magfield
StewMH 8ecdc00
Remove sycl_magfield library from linking
StewMH 5c8f8fc
Add SYCL_UTILS to cmake config
StewMH c397135
Merge branch 'main' into alpaka_magfield
StewMH File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
device/alpaka/include/traccc/alpaka/utils/make_magnetic_field.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /** TRACCC library, part of the ACTS project (R&D line) | ||
| * | ||
| * (c) 2025 CERN for the benefit of the ACTS project | ||
| * | ||
| * Mozilla Public License Version 2.0 | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| // Project include(s). | ||
| #include "traccc/alpaka/utils/queue.hpp" | ||
| #include "traccc/bfield/magnetic_field.hpp" | ||
|
|
||
| namespace traccc::alpaka { | ||
|
|
||
| /// Create a magnetic field usable on the active device | ||
| /// | ||
| /// @param bfield The magnetic field to be copied | ||
| // | ||
| magnetic_field make_magnetic_field(const magnetic_field& bfield, | ||
| const queue& queue); | ||
|
|
||
| } // namespace traccc::alpaka |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| /** TRACCC library, part of the ACTS project (R&D line) | ||
| * | ||
| * (c) 2025 CERN for the benefit of the ACTS project | ||
| * | ||
| * Mozilla Public License Version 2.0 | ||
| */ | ||
|
|
||
| // Local include(s). | ||
| #include "traccc/alpaka/utils/make_magnetic_field.hpp" | ||
|
|
||
| #include "magnetic_field_types.hpp" | ||
|
|
||
| // Project include(s). | ||
| #include "traccc/definitions/primitives.hpp" | ||
| #if defined(ALPAKA_ACC_GPU_CUDA_ENABLED) | ||
| #include "traccc/cuda/utils/make_magnetic_field.hpp" | ||
| #elif defined(ALPAKA_ACC_GPU_HIP_ENABLED) | ||
| // | ||
| #elif defined(ALPAKA_ACC_SYCL_ENABLED) | ||
| #include "../utils/get_queue.hpp" | ||
| #include "traccc/sycl/utils/make_magnetic_field.hpp" | ||
| #endif | ||
|
|
||
| // System include(s). | ||
| #include <stdexcept> | ||
|
|
||
| namespace traccc::alpaka { | ||
|
|
||
| magnetic_field make_magnetic_field(const magnetic_field& bfield, | ||
| const queue& queue) { | ||
| #if defined(ALPAKA_ACC_GPU_CUDA_ENABLED) | ||
| return traccc::cuda::make_magnetic_field( | ||
krasznaa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| bfield, traccc::cuda::magnetic_field_storage::global_memory); | ||
| #elif defined(ALPAKA_ACC_GPU_HIP_ENABLED) | ||
| if (bfield.is<const_bfield_backend_t<traccc::scalar> >()) { | ||
| return magnetic_field{covfie::field<const_bfield_backend_t<scalar> >{ | ||
| bfield.as_field<const_bfield_backend_t<traccc::scalar> >()}}; | ||
| } else if (bfield.is<host::inhom_bfield_backend_t<traccc::scalar> >()) { | ||
| return magnetic_field{covfie::field< | ||
| inhom_bfield_backend_t<traccc::scalar> >( | ||
| bfield.as_field<host::inhom_bfield_backend_t<traccc::scalar> >())}; | ||
| } else { | ||
| throw std::invalid_argument( | ||
| "Unsupported storage method chosen for inhomogeneous b-field"); | ||
| } | ||
| #elif defined(ALPAKA_ACC_SYCL_ENABLED) | ||
| ::sycl::queue q(::alpaka::getNativeHandle(details::get_queue(queue))); | ||
| traccc::sycl::queue_wrapper qw{&q}; | ||
| return traccc::sycl::make_magnetic_field(bfield, qw); | ||
| #endif | ||
| #else | ||
| return bfield; | ||
| } | ||
|
|
||
| } // namespace traccc::alpaka | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.