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

Fuse inner loop kernels in device CKF #695

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions core/include/traccc/finding/finding_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ struct finding_config {
/// Particle hypothesis
detray::pdg_particle<traccc::scalar> ptc_hypothesis =
detray::muon<traccc::scalar>();

/****************************
* GPU-specfic parameters
****************************/
/// The number of measurements to be iterated per thread
unsigned int n_measurements_per_thread = 8;
};

} // namespace traccc
4 changes: 0 additions & 4 deletions device/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,13 @@ traccc_add_library( traccc_device_common device_common TYPE SHARED
# Track finding funtions(s).
"include/traccc/finding/device/apply_interaction.hpp"
"include/traccc/finding/device/build_tracks.hpp"
"include/traccc/finding/device/count_measurements.hpp"
"include/traccc/finding/device/find_tracks.hpp"
"include/traccc/finding/device/add_links_for_holes.hpp"
"include/traccc/finding/device/make_barcode_sequence.hpp"
"include/traccc/finding/device/propagate_to_next_surface.hpp"
"include/traccc/finding/device/prune_tracks.hpp"
"include/traccc/finding/device/impl/apply_interaction.ipp"
"include/traccc/finding/device/impl/build_tracks.ipp"
"include/traccc/finding/device/impl/count_measurements.ipp"
"include/traccc/finding/device/impl/find_tracks.ipp"
"include/traccc/finding/device/impl/add_links_for_holes.ipp"
"include/traccc/finding/device/impl/make_barcode_sequence.ipp"
"include/traccc/finding/device/impl/propagate_to_next_surface.ipp"
"include/traccc/finding/device/impl/prune_tracks.ipp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ namespace traccc::device {

struct finding_global_counter {

// Sum of the number of measurements for every parameter
unsigned int n_measurements_sum;

// Number of found measurements for the current step
unsigned int n_candidates;

Expand Down

This file was deleted.

48 changes: 0 additions & 48 deletions device/common/include/traccc/finding/device/count_measurements.hpp

This file was deleted.

32 changes: 19 additions & 13 deletions device/common/include/traccc/finding/device/find_tracks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
// Project include(s).
#include "traccc/definitions/primitives.hpp"
#include "traccc/definitions/qualifiers.hpp"
#include "traccc/device/concepts/barrier.hpp"
#include "traccc/device/concepts/thread_id.hpp"
#include "traccc/edm/measurement.hpp"
#include "traccc/edm/track_parameters.hpp"

Expand All @@ -22,43 +24,47 @@ namespace traccc::device {
/// If the chi2 of the measurement < chi2_max, its measurement index and the
/// index of the link from the previous step are added to the link container.
///
/// @param[in] globalIndex The index of the current thread
/// @param[in] thread_id A thread identifier object
/// @param[in] barrier A block-wide barrier
/// @param[in] cfg Track finding config object
/// @param[in] det_data Detector view object
/// @param[in] measurements_view Measurements container view
/// @param[in] in_params_view Input parameters
/// @param[in] n_in_params The number of input params
/// @param[in] barcodes_view View of a measurement -> barcode map
/// @param[in] upper_bounds_view Upper bounds of measurements unique w.r.t
/// barcode
/// @param[in] in_params_view Input parameters
/// @param[in] n_measurements_prefix_sum_view Prefix sum of the number of
/// measurements per parameter
/// @param[in] ref_meas_idx_view The first index of measurements per parameter
/// @param[in] prev_links_view link container from the previous step
/// @param[in] prev_param_to_link_view param_to_link container from the
/// previous step
/// @param[in] step Step index
/// @param[in] n_max_candidates Number of maximum candidates
/// @param[out] out_params_view Output parameters
/// @param[out] n_candidates_view Number of candidates per input parameter
/// @param[out] links_view link container for the current step
/// @param[out] n_total_candidates The number of total candidates for the
stephenswat marked this conversation as resolved.
Show resolved Hide resolved
/// current step
/// @param shared_num_candidates Shared memory scratch space
/// @param shared_candidates Shared memory scratch space
/// @param shared_candidates_size Shared memory scratch space
///
template <typename detector_t, typename config_t>
template <concepts::thread_id1 thread_id_t, concepts::barrier barrier_t,
typename detector_t, typename config_t>
TRACCC_DEVICE inline void find_tracks(
std::size_t globalIndex, const config_t cfg,
thread_id_t& thread_id, barrier_t& barrier, const config_t cfg,
typename detector_t::view_type det_data,
measurement_collection_types::const_view measurements_view,
bound_track_parameters_collection_types::const_view in_params_view,
vecmem::data::vector_view<const unsigned int>
n_measurements_prefix_sum_view,
vecmem::data::vector_view<const unsigned int> ref_meas_idx_view,
const unsigned int n_in_params,
vecmem::data::vector_view<const detray::geometry::barcode> barcodes_view,
vecmem::data::vector_view<const unsigned int> upper_bounds_view,
vecmem::data::vector_view<const candidate_link> prev_links_view,
vecmem::data::vector_view<const unsigned int> prev_param_to_link_view,
const unsigned int step, const unsigned int& n_max_candidates,
bound_track_parameters_collection_types::view out_params_view,
vecmem::data::vector_view<unsigned int> n_candidates_view,
vecmem::data::vector_view<candidate_link> links_view,
unsigned int& n_total_candidates);
unsigned int& n_total_candidates, unsigned int* shared_num_candidates,
std::pair<unsigned int, unsigned int>* shared_candidates,
unsigned int& shared_candidates_size);

} // namespace traccc::device

Expand Down

This file was deleted.

This file was deleted.

Loading
Loading