-
Notifications
You must be signed in to change notification settings - Fork 51
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
Changed device clusterization to flat EDM & cell-level parallelism #299
Merged
stephenswat
merged 9 commits into
acts-project:main
from
guilhermeAlmeida1:wipClusterizationNewBoth
Feb 15, 2023
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
983a6ea
Added clusterization algorithm based on collections only (no jaggeds).
guilhermeAlmeida1 bcf545b
Added new clusterization to sycl reconstruction chains. Minor fixes t…
guilhermeAlmeida1 2bbcf40
Changed kokkos to use new clusterization
guilhermeAlmeida1 605c370
changed sycl clusterization/seed finding kernel calls to be compatibl…
guilhermeAlmeida1 14df078
Addressed comments in PR#299
guilhermeAlmeida1 ce6015e
Changed max_cells_per_partition to input variable in executables
guilhermeAlmeida1 cd04b94
Changed partition class and partitioning algorithm to traccc::device
guilhermeAlmeida1 3b023e8
Minor fixes
guilhermeAlmeida1 bf4ed85
Fixed alt multi-threaded throughput to use different events
guilhermeAlmeida1 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
There are no files selected for viewing
This file contains 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 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 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,36 @@ | ||
/** TRACCC library, part of the ACTS project (R&D line) | ||
* | ||
* (c) 2022 CERN for the benefit of the ACTS project | ||
* | ||
* Mozilla Public License Version 2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
// Project include(s). | ||
#include "traccc/definitions/primitives.hpp" | ||
#include "traccc/edm/cell.hpp" | ||
#include "traccc/edm/container.hpp" | ||
|
||
namespace traccc { | ||
|
||
/// Alternative measurement structure which contains both the measurement and | ||
/// a link to its module (held in a separate collection). | ||
/// | ||
/// This can be used for storing all information in a single collection, whose | ||
/// objects need to have both the header and item information from the | ||
/// measurement container types. | ||
struct alt_measurement { | ||
/// Local 2D coordinates for a measurement on a detector module | ||
point2 local{0., 0.}; | ||
/// Variance on the 2D coordinates of the measurement | ||
variance2 variance{0., 0.}; | ||
|
||
using link_type = cell_module_collection_types::view::size_type; | ||
link_type module_link; | ||
}; | ||
|
||
/// Declare all alt measurement collection types | ||
using alt_measurement_collection_types = collection_types<alt_measurement>; | ||
|
||
} // namespace traccc |
This file contains 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,50 @@ | ||
/** TRACCC library, part of the ACTS project (R&D line) | ||
* | ||
* (c) 2022 CERN for the benefit of the ACTS project | ||
* | ||
* Mozilla Public License Version 2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "traccc/edm/container.hpp" | ||
#include "traccc/edm/spacepoint.hpp" | ||
|
||
namespace traccc { | ||
|
||
/// Seed consisting of three spacepoints, z origin and weight | ||
/// This differs from (non-alt) seed in the link_type definition | ||
struct alt_seed { | ||
|
||
using link_type = spacepoint_collection_types::host::size_type; | ||
|
||
link_type spB_link; | ||
link_type spM_link; | ||
link_type spT_link; | ||
|
||
scalar weight; | ||
scalar z_vertex; | ||
|
||
TRACCC_HOST_DEVICE | ||
std::array<measurement, 3> get_measurements( | ||
const spacepoint_collection_types::const_view& spacepoints_view) const { | ||
const spacepoint_collection_types::const_device spacepoints( | ||
spacepoints_view); | ||
return {spacepoints.at(spB_link).meas, spacepoints.at(spM_link).meas, | ||
spacepoints.at(spT_link).meas}; | ||
} | ||
|
||
TRACCC_HOST_DEVICE | ||
std::array<spacepoint, 3> get_spacepoints( | ||
const spacepoint_collection_types::const_view& spacepoints_view) const { | ||
const spacepoint_collection_types::const_device spacepoints( | ||
spacepoints_view); | ||
return {spacepoints.at(spB_link), spacepoints.at(spM_link), | ||
spacepoints.at(spT_link)}; | ||
} | ||
}; | ||
|
||
/// Declare all seed collection types | ||
using alt_seed_collection_types = collection_types<alt_seed>; | ||
|
||
} // namespace traccc |
This file contains 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 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 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 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
43 changes: 43 additions & 0 deletions
43
device/common/include/traccc/clusterization/device/aggregate_cluster.hpp
This file contains 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,43 @@ | ||
/** TRACCC library, part of the ACTS project (R&D line) | ||
* | ||
* (c) 2022 CERN for the benefit of the ACTS project | ||
* | ||
* Mozilla Public License Version 2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
// Project include(s). | ||
#include "traccc/definitions/qualifiers.hpp" | ||
#include "traccc/edm/alt_cell.hpp" | ||
#include "traccc/edm/alt_measurement.hpp" | ||
#include "traccc/edm/device/partition.hpp" | ||
|
||
// System include(s). | ||
#include <cstddef> | ||
|
||
namespace traccc::device { | ||
|
||
/// Function which looks for cells which share the same "parent" index and | ||
/// aggregates them into a cluster. | ||
/// | ||
/// @param[in] cells collection of cells | ||
/// @param[in] modules collection of modules to which the cells are linked to | ||
/// @param[in] f array of "parent" indices for all cells in this | ||
/// partition | ||
/// @param[in] start partition start point this cell belongs to | ||
/// @param[in] end partition end point this cell belongs to | ||
/// @param[in] tid current thread id | ||
/// @param[out] out cluster to fill | ||
TRACCC_HOST_DEVICE | ||
inline void aggregate_cluster( | ||
const alt_cell_collection_types::const_device& cells, | ||
const cell_module_collection_types::const_device& modules, | ||
const vecmem::data::vector_view<unsigned short> f_view, | ||
const partition start, const partition end, const unsigned short tid, | ||
alt_measurement& out); | ||
|
||
} // namespace traccc::device | ||
|
||
// Include the implementation. | ||
#include "traccc/clusterization/device/impl/aggregate_cluster.ipp" |
54 changes: 0 additions & 54 deletions
54
device/common/include/traccc/clusterization/device/connect_components.hpp
This file was deleted.
Oops, something went wrong.
51 changes: 0 additions & 51 deletions
51
device/common/include/traccc/clusterization/device/count_cluster_cells.hpp
This file was deleted.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can discuss this later, perhaps on a different PR, but this information should not really live in the seed EDM.