Skip to content

make sycl measurement sorting algo interface match cuda's #961

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 3 commits into from
May 5, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// Project include(s).
#include "traccc/edm/measurement.hpp"
#include "traccc/utils/algorithm.hpp"
#include "traccc/utils/memory_resource.hpp"
#include "traccc/utils/messaging.hpp"

// VecMem include(s).
Expand All @@ -39,11 +40,13 @@ class measurement_sorting_algorithm
public:
/// Constructor for the algorithm
///
/// @param mr Unused, here for consistency of interface (see CUDA)
/// @param copy The copy object to use in the algorithm
/// @param queue Wrapper for the for the SYCL queue for kernel invocation
///
measurement_sorting_algorithm(
vecmem::copy& copy, queue_wrapper& queue,
const traccc::memory_resource& mr, vecmem::copy& copy,
queue_wrapper& queue,
std::unique_ptr<const Logger> logger = getDummyLogger().clone());

/// Callable operator performing the sorting on a container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
namespace traccc::sycl {

measurement_sorting_algorithm::measurement_sorting_algorithm(
vecmem::copy& copy, queue_wrapper& queue,
const traccc::memory_resource&, vecmem::copy& copy, queue_wrapper& queue,
std::unique_ptr<const Logger> logger)
: messaging(std::move(logger)), m_copy{copy}, m_queue{queue} {}

Expand Down
10 changes: 6 additions & 4 deletions examples/run/sycl/full_chain_algorithm.sycl
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ full_chain_algorithm::full_chain_algorithm(
m_clusterization{memory_resource{m_cached_device_mr, &(m_host_mr.get())},
m_copy, m_data->m_queue_wrapper, clustering_config,
logger->clone("ClusteringAlg")},
m_measurement_sorting(m_copy, m_data->m_queue_wrapper,
logger->clone("MeasSortingAlg")),
m_measurement_sorting(
memory_resource{m_cached_device_mr, &(m_host_mr.get())}, m_copy,
m_data->m_queue_wrapper, logger->clone("MeasSortingAlg")),
m_spacepoint_formation{
memory_resource{m_cached_device_mr, &(m_host_mr.get())}, m_copy,
m_data->m_queue_wrapper, logger->clone("SpFormationAlg")},
Expand Down Expand Up @@ -138,8 +139,9 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent)
m_copy, m_data->m_queue_wrapper,
parent.m_clustering_config,
parent.logger().clone("ClusteringAlg")},
m_measurement_sorting(m_copy, m_data->m_queue_wrapper,
parent.logger().clone("MeasSortingAlg")),
m_measurement_sorting(
memory_resource{m_cached_device_mr, &(m_host_mr.get())}, m_copy,
m_data->m_queue_wrapper, parent.logger().clone("MeasSortingAlg")),
m_spacepoint_formation{
memory_resource{m_cached_device_mr, &(m_host_mr.get())}, m_copy,
m_data->m_queue_wrapper, parent.logger().clone("SpFormationAlg")},
Expand Down
2 changes: 1 addition & 1 deletion examples/run/sycl/seq_example_sycl.sycl
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ int seq_run(const traccc::opts::detector& detector_opts,
mr, copy, queue, clusterization_opts,
logger().clone("SyclClusteringAlg"));
traccc::sycl::measurement_sorting_algorithm ms_sycl(
copy, queue, logger().clone("SyclMeasSortingAlg"));
mr, copy, queue, logger().clone("SyclMeasSortingAlg"));
traccc::sycl::silicon_pixel_spacepoint_formation_algorithm sf_sycl(
mr, copy, queue, logger().clone("SyclSpFormationAlg"));
traccc::sycl::seeding_algorithm sa_sycl(
Expand Down
Loading