From c79b0972ceafce9a97c5e726cb04ba694b1b2437 Mon Sep 17 00:00:00 2001 From: Stephen Nicholas Swatman Date: Tue, 25 Jun 2024 16:37:03 +0200 Subject: [PATCH] UpdatE --- .../cuda/seeding2/kernels/kd_tree_kernel.hpp | 1 - .../seeding2/kernels/seed_finding_kernel.hpp | 7 +- .../seeding2/kernels/write_output_kernel.hpp | 26 ------- .../traccc/cuda/seeding2/seed_finding.hpp | 22 ++++-- .../cuda/seeding2/types/internal_sp.hpp | 35 --------- .../src/seeding2/kernels/kd_tree_kernel.cu | 30 ++++---- .../seeding2/kernels/seed_finding_kernel.cu | 39 +++++----- .../seeding2/kernels/write_output_kernel.cu | 24 +++---- device/cuda/src/seeding2/seed_finding2.cu | 72 ++++--------------- 9 files changed, 79 insertions(+), 177 deletions(-) delete mode 100644 device/cuda/include/traccc/cuda/seeding2/kernels/write_output_kernel.hpp delete mode 100644 device/cuda/include/traccc/cuda/seeding2/types/internal_sp.hpp diff --git a/device/cuda/include/traccc/cuda/seeding2/kernels/kd_tree_kernel.hpp b/device/cuda/include/traccc/cuda/seeding2/kernels/kd_tree_kernel.hpp index 4ce1325af7..b21342135e 100644 --- a/device/cuda/include/traccc/cuda/seeding2/kernels/kd_tree_kernel.hpp +++ b/device/cuda/include/traccc/cuda/seeding2/kernels/kd_tree_kernel.hpp @@ -7,7 +7,6 @@ #pragma once -#include #include #include #include diff --git a/device/cuda/include/traccc/cuda/seeding2/kernels/seed_finding_kernel.hpp b/device/cuda/include/traccc/cuda/seeding2/kernels/seed_finding_kernel.hpp index 464b4dd2af..2d04d73f7f 100644 --- a/device/cuda/include/traccc/cuda/seeding2/kernels/seed_finding_kernel.hpp +++ b/device/cuda/include/traccc/cuda/seeding2/kernels/seed_finding_kernel.hpp @@ -7,9 +7,8 @@ #pragma once -#include #include -#include +#include #include #include #include @@ -21,7 +20,7 @@ namespace traccc::cuda { * @return A pair containing the list of internal seeds as well as the number * of seeds. */ -std::pair, uint32_t> run_seeding( +std::pair, uint32_t> run_seeding( seedfinder_config, seedfilter_config, vecmem::memory_resource&, - internal_sp_t, kd_tree_t); + const spacepoint_collection_types::const_view&, kd_tree_t); } // namespace traccc::cuda diff --git a/device/cuda/include/traccc/cuda/seeding2/kernels/write_output_kernel.hpp b/device/cuda/include/traccc/cuda/seeding2/kernels/write_output_kernel.hpp deleted file mode 100644 index 0bddf482d0..0000000000 --- a/device/cuda/include/traccc/cuda/seeding2/kernels/write_output_kernel.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/** 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 -#include -#include -#include -#include -#include - -namespace traccc::cuda { -/** - * @brief Kernel to write output data back into traccc's EDM. - * - * @return A vector buffer containing the output seeds. - */ -alt_seed_collection_types::buffer write_output(const traccc::memory_resource &, - uint32_t, const internal_sp_t, - const alt_seed *const); -} // namespace traccc::cuda diff --git a/device/cuda/include/traccc/cuda/seeding2/seed_finding.hpp b/device/cuda/include/traccc/cuda/seeding2/seed_finding.hpp index a350a73730..1c7c8d4a85 100644 --- a/device/cuda/include/traccc/cuda/seeding2/seed_finding.hpp +++ b/device/cuda/include/traccc/cuda/seeding2/seed_finding.hpp @@ -7,29 +7,39 @@ #pragma once -#include +#include #include #include #include #include #include +#include "traccc/cuda/utils/stream.hpp" +#include namespace traccc::cuda { /** * @brief Alternative seed finding algorithm, using orthogonal range search * implemented through a k-d tree. */ -class seed_finding2 : public algorithm { public: - seed_finding2(const traccc::memory_resource& mr); + seed_finding2(const seedfinder_config& config, + const seedfilter_config& filter_config, + const traccc::memory_resource& mr, + vecmem::copy& copy, stream& str); output_type operator()( const spacepoint_collection_types::const_view& sps) const override; private: - traccc::memory_resource m_output_mr; - seedfinder_config m_finder_conf; - seedfilter_config m_filter_conf; + traccc::memory_resource m_mr; + vecmem::copy& m_copy; + stream& m_stream; + + seedfinder_config m_seedfinder_config; + seedfilter_config m_seedfilter_config; + + int m_warp_size; }; } // namespace traccc::cuda diff --git a/device/cuda/include/traccc/cuda/seeding2/types/internal_sp.hpp b/device/cuda/include/traccc/cuda/seeding2/types/internal_sp.hpp deleted file mode 100644 index 94b375ff4d..0000000000 --- a/device/cuda/include/traccc/cuda/seeding2/types/internal_sp.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/** 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 -#include -#include -#include -#include -#include - -namespace traccc::cuda { -template