From 2e23efd814429dda07e2db649cfb460272d80492 Mon Sep 17 00:00:00 2001 From: Mark Brettell Date: Tue, 11 Nov 2025 02:50:55 +0100 Subject: [PATCH 01/28] Add GBTS options for mt runner --- examples/options/CMakeLists.txt | 4 +- .../traccc/options/track_gbts_seeding.hpp | 42 +++++++++++++++++ examples/options/src/track_gbts_seeding.cpp | 45 +++++++++++++++++++ examples/run/common/throughput_mt.ipp | 8 ++-- extras/traccc_itk_throughput_mt_profiler.sh | 13 ++++-- traccc | 1 + 6 files changed, 106 insertions(+), 7 deletions(-) create mode 100644 examples/options/include/traccc/options/track_gbts_seeding.hpp create mode 100644 examples/options/src/track_gbts_seeding.cpp create mode 160000 traccc diff --git a/examples/options/CMakeLists.txt b/examples/options/CMakeLists.txt index b57795b2c1..4e608703a6 100644 --- a/examples/options/CMakeLists.txt +++ b/examples/options/CMakeLists.txt @@ -27,6 +27,7 @@ traccc_add_library( traccc_options options TYPE SHARED "include/traccc/options/track_propagation.hpp" "include/traccc/options/track_resolution.hpp" "include/traccc/options/track_seeding.hpp" + "include/traccc/options/track_gbts_seeding.hpp" # source files "src/details/interface.cpp" "src/accelerator.cpp" @@ -48,7 +49,8 @@ traccc_add_library( traccc_options options TYPE SHARED "src/track_matching.cpp" "src/track_propagation.cpp" "src/track_resolution.cpp" - "src/track_seeding.cpp" + "src/track_seeding.cpp" + "src/track_gbts_seeding.cpp" "src/truth_finding.cpp" ) target_link_libraries( traccc_options diff --git a/examples/options/include/traccc/options/track_gbts_seeding.hpp b/examples/options/include/traccc/options/track_gbts_seeding.hpp new file mode 100644 index 0000000000..aeca2826ff --- /dev/null +++ b/examples/options/include/traccc/options/track_gbts_seeding.hpp @@ -0,0 +1,42 @@ +/** TRACCC library, part of the ACTS project (R&D line) + * + * (c) 2022-2024 CERN for the benefit of the ACTS project + * + * Mozilla Public License Version 2.0 + */ + +#pragma once + +// Project include(s). +#include "traccc/options/details/interface.hpp" + +// System include(s). +#include + +namespace traccc::opts { + +/// Option(s) for multi-threaded code execution +class track_gbts_seeding : public interface { + + public: + /// @name Options + /// @{ + + bool useGBTS = false; + std::string config_dir = "DEFAULT"; + + /// @} + + /// Constructor + track_gbts_seeding(); + + /// Read/process the command line options + /// + /// @param vm The command line options to interpret/read + /// + void read(const boost::program_options::variables_map& vm) override; + + std::unique_ptr as_printable() const override; +}; + +} // namespace traccc::opts diff --git a/examples/options/src/track_gbts_seeding.cpp b/examples/options/src/track_gbts_seeding.cpp new file mode 100644 index 0000000000..77a52b06f0 --- /dev/null +++ b/examples/options/src/track_gbts_seeding.cpp @@ -0,0 +1,45 @@ +/** TRACCC library, part of the ACTS project (R&D line) + * + * (c) 2022-2025 CERN for the benefit of the ACTS project + * + * Mozilla Public License Version 2.0 + */ + +// Local include(s). +#include "traccc/options/track_gbts_seeding.hpp" + +#include "traccc/examples/utils/printable.hpp" + +// System include(s). +#include +#include +namespace traccc::opts { + +track_gbts_seeding::track_gbts_seeding() : interface("GBTS Options") { + m_desc.add_options()( + "useGBTS", + boost::program_options::value(&useGBTS)->default_value(useGBTS), + "use gbts algorithm"); + + m_desc.add_options()( + "gbts_config_dir", + boost::program_options::value(&config_dir)->default_value(config_dir), + "directory for gbts config files"); +} + +void track_gbts_seeding::read(const boost::program_options::variables_map &) { + // where make config +} + +std::unique_ptr track_gbts_seeding::as_printable() const { + auto cat = std::make_unique(m_description); + + cat->add_child(std::make_unique( + "using gbts algorithm ", std::to_string(useGBTS))); + cat->add_child(std::make_unique( + "gbts config directory ", config_dir)); + + return cat; +} + +} // namespace traccc::opts diff --git a/examples/run/common/throughput_mt.ipp b/examples/run/common/throughput_mt.ipp index 7052bde74b..5c8070a4f8 100644 --- a/examples/run/common/throughput_mt.ipp +++ b/examples/run/common/throughput_mt.ipp @@ -28,6 +28,7 @@ #include "traccc/options/track_fitting.hpp" #include "traccc/options/track_propagation.hpp" #include "traccc/options/track_seeding.hpp" +#include "traccc/options/track_gbts_seeding.hpp" // I/O include(s). #include "traccc/io/read_cells.hpp" @@ -77,6 +78,7 @@ int throughput_mt(std::string_view description, int argc, char* argv[]) { opts::input_data input_opts; opts::clusterization clusterization_opts; opts::track_seeding seeding_opts; + opts::track_gbts_seeding gbts_seeding_opts; opts::track_finding finding_opts; opts::track_propagation propagation_opts; opts::track_fitting fitting_opts; @@ -86,12 +88,12 @@ int throughput_mt(std::string_view description, int argc, char* argv[]) { opts::program_options program_opts{ description, {detector_opts, bfield_opts, input_opts, clusterization_opts, - seeding_opts, finding_opts, propagation_opts, fitting_opts, - throughput_opts, threading_opts, logging_opts}, + seeding_opts, gbts_seeding_opts, finding_opts, propagation_opts, + fitting_opts, throughput_opts, threading_opts, logging_opts}, argc, argv, prelogger->cloneWithSuffix("Options")}; - + TRACCC_LOCAL_LOGGER( prelogger->clone(std::nullopt, traccc::Logging::Level(logging_opts))); diff --git a/extras/traccc_itk_throughput_mt_profiler.sh b/extras/traccc_itk_throughput_mt_profiler.sh index 355123181b..d10b9d3be2 100755 --- a/extras/traccc_itk_throughput_mt_profiler.sh +++ b/extras/traccc_itk_throughput_mt_profiler.sh @@ -43,7 +43,8 @@ TRACCC_THREAD_STEP=${TRACCC_THREAD_STEP:-1} TRACCC_REPETITIONS=${TRACCC_REPETITIONS:-5} TRACCC_CSV_FILE=${TRACCC_CSV_FILE:-"output.csv"} TRACCC_THROUGPUT_TYPE=${TRACCC_THROUGPUT_TYPE:-"traccc"} -while getopts ":x:i:m:t:r:c:y:h" opt; do +TRACCC_USE_GBTS=${TRACCC_USE_GBTS:="false"} +while getopts ":x:i:m:t:r:c:y:g:h" opt; do case $opt in x) TRACCC_EXECUTABLE=$OPTARG @@ -69,6 +70,9 @@ while getopts ":x:i:m:t:r:c:y:h" opt; do y) TRACCC_THROUGPUT_TYPE=$OPTARG ;; + g) + TRACCC_USE_GBTS=$OPTARG + ;; h) usage exit 0 @@ -96,6 +100,7 @@ echo " THREAD_STEP : ${TRACCC_THREAD_STEP}" echo " REPETITIONS : ${TRACCC_REPETITIONS}" echo " CSV_FILE : ${TRACCC_CSV_FILE}" echo " THROUGHPUT_TYPE : ${TRACCC_THROUGPUT_TYPE}" +echo " USE_GBTS : ${TRACCC_USE_GBTS}" # Check whether the output file already exists. Refuse to overwrite existing # files. @@ -154,7 +159,7 @@ elif [[ "${TRACCC_THROUGPUT_TYPE}" != "traccc" ]]; then fi # The input directories to use. -TRACCC_INPUT_DIRS=("ttbar_mu140/hits" "ttbar_mu200/hits") +TRACCC_INPUT_DIRS=("ttbar_mu200/hits") #("ttbar_mu140/hits" "ttbar_mu200/hits") # Put a header on the CSV file. echo "directory,threads,loaded_events,cold_run_events,processed_events,warm_up_time,processing_time" \ @@ -192,7 +197,9 @@ for NTHREAD in $(seq ${TRACCC_MIN_THREADS} ${TRACCC_THREAD_STEP} ${TRACCC_MAX_TH --cold-run-events=$((5*${NTHREAD})) \ --processed-events=$((100*${NTHREAD})) \ --log-file="${TRACCC_CSV_FILE}" \ - ${TRACCC_CUTS[@]} + ${TRACCC_CUTS[@]} \ + --useGBTS="${TRACCC_USE_GBTS}" \ + --gbts_config_dir="${TRACCC_INPUT_DIR}" done done done diff --git a/traccc b/traccc new file mode 160000 index 0000000000..d668f0fdd6 --- /dev/null +++ b/traccc @@ -0,0 +1 @@ +Subproject commit d668f0fdd694f88d8d66506e506da0bfe4409023 From 9eb9de45c9dfb668a91ae95803d88b02f2992a1c Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 11 Nov 2025 18:29:54 +0100 Subject: [PATCH 02/28] setting up gbts algs in full_chain cpu/cuda compilation --- .../gbts_seeding/gbts_seeding_algorithm.hpp | 2 +- .../gbts_seeding/gbts_seeding_algorithm.cu | 2 +- .../traccc/options/track_gbts_seeding.hpp | 7 ++- examples/options/src/track_gbts_seeding.cpp | 57 +++++++++++++++++-- examples/run/common/throughput_mt.ipp | 20 +++++-- examples/run/common/throughput_st.ipp | 8 ++- examples/run/cpu/full_chain_algorithm.cpp | 4 +- examples/run/cpu/full_chain_algorithm.hpp | 7 +++ examples/run/cuda/full_chain_algorithm.cpp | 48 +++++++++++----- examples/run/cuda/full_chain_algorithm.hpp | 8 +++ extras/traccc_itk_throughput_mt_profiler.sh | 15 ++--- 11 files changed, 140 insertions(+), 38 deletions(-) diff --git a/device/cuda/include/traccc/cuda/gbts_seeding/gbts_seeding_algorithm.hpp b/device/cuda/include/traccc/cuda/gbts_seeding/gbts_seeding_algorithm.hpp index 1e8903c8f2..05c1014dc7 100644 --- a/device/cuda/include/traccc/cuda/gbts_seeding/gbts_seeding_algorithm.hpp +++ b/device/cuda/include/traccc/cuda/gbts_seeding/gbts_seeding_algorithm.hpp @@ -47,7 +47,7 @@ class gbts_seeding_algorithm /// @param str The CUDA stream to perform the operations in /// gbts_seeding_algorithm( - const gbts_seedfinder_config& cfg, traccc::memory_resource& mr, + const gbts_seedfinder_config& cfg, const traccc::memory_resource& mr, vecmem::copy& copy, stream& str, std::unique_ptr logger = getDummyLogger().clone()); diff --git a/device/cuda/src/gbts_seeding/gbts_seeding_algorithm.cu b/device/cuda/src/gbts_seeding/gbts_seeding_algorithm.cu index 3cf3696083..39313742bf 100644 --- a/device/cuda/src/gbts_seeding/gbts_seeding_algorithm.cu +++ b/device/cuda/src/gbts_seeding/gbts_seeding_algorithm.cu @@ -115,7 +115,7 @@ struct gbts_ctx { }; gbts_seeding_algorithm::gbts_seeding_algorithm( - const gbts_seedfinder_config& cfg, traccc::memory_resource& mr, + const gbts_seedfinder_config& cfg, const traccc::memory_resource& mr, vecmem::copy& copy, stream& str, std::unique_ptr logger) : messaging(logger->clone()), m_config(cfg), diff --git a/examples/options/include/traccc/options/track_gbts_seeding.hpp b/examples/options/include/traccc/options/track_gbts_seeding.hpp index aeca2826ff..e75812cce4 100644 --- a/examples/options/include/traccc/options/track_gbts_seeding.hpp +++ b/examples/options/include/traccc/options/track_gbts_seeding.hpp @@ -9,6 +9,7 @@ // Project include(s). #include "traccc/options/details/interface.hpp" +#include "traccc/gbts_seeding/gbts_seeding_config.hpp" // System include(s). #include @@ -24,8 +25,12 @@ class track_gbts_seeding : public interface { bool useGBTS = false; std::string config_dir = "DEFAULT"; - + /// @} + // config info from file + std::vector> barcodeBinning; + std::vector>> binTables; + traccc::device::gbts_layerInfo layerInfo; /// Constructor track_gbts_seeding(); diff --git a/examples/options/src/track_gbts_seeding.cpp b/examples/options/src/track_gbts_seeding.cpp index 77a52b06f0..ddb46a7e75 100644 --- a/examples/options/src/track_gbts_seeding.cpp +++ b/examples/options/src/track_gbts_seeding.cpp @@ -7,18 +7,19 @@ // Local include(s). #include "traccc/options/track_gbts_seeding.hpp" - #include "traccc/examples/utils/printable.hpp" // System include(s). #include -#include +#include +#include + namespace traccc::opts { track_gbts_seeding::track_gbts_seeding() : interface("GBTS Options") { m_desc.add_options()( "useGBTS", - boost::program_options::value(&useGBTS)->default_value(useGBTS), + boost::program_options::bool_switch(&useGBTS), "use gbts algorithm"); m_desc.add_options()( @@ -28,7 +29,55 @@ track_gbts_seeding::track_gbts_seeding() : interface("GBTS Options") { } void track_gbts_seeding::read(const boost::program_options::variables_map &) { - // where make config + // fill config + if(!useGBTS) { + return; + } + std::ifstream barcodeBinningFile( + std::filesystem::path(config_dir + "/barcodeBinning.txt")); + + int nBarcodes = 0; + barcodeBinningFile >> nBarcodes; + barcodeBinning.reserve(nBarcodes); + + std::pair barcodeLayerPair; + for(;nBarcodes>=0;--nBarcodes) { + barcodeBinningFile >> barcodeLayerPair.first; + barcodeBinningFile >> barcodeLayerPair.second; + + barcodeBinning.push_back(barcodeLayerPair); + } + + std::ifstream binTablesFile( + std::filesystem::path(config_dir + "/binTables.txt")); + + int nBinPairs = 0; + barcodeBinningFile >> nBinPairs; + binTables.reserve(nBinPairs); + std::pair> binPair; + int bin2 = 0; + for(;nBinPairs>=0;--nBinPairs) { + binTablesFile >> binPair.first; + binTablesFile >> bin2; + binPair.second.push_back(bin2); + } + + std::ifstream layerInfoFile( + std::filesystem::path(config_dir + "/layerInfo.txt")); + + int nLayers = 0; + layerInfoFile >> nLayers; + layerInfo.reserve(nLayers); + int type = 0; + int info[2] = {0, 0}; + float geo[2] = {0, 0}; + for(;nLayers>=0;--nLayers) { + layerInfoFile >> type; + layerInfoFile >> info[0] >> info[1]; + layerInfoFile >> geo[0] >> geo[1]; + + layerInfo.addLayer(type, info[0], info[1], geo[0], geo[1]); + } } std::unique_ptr track_gbts_seeding::as_printable() const { diff --git a/examples/run/common/throughput_mt.ipp b/examples/run/common/throughput_mt.ipp index 5c8070a4f8..97d8b0b72f 100644 --- a/examples/run/common/throughput_mt.ipp +++ b/examples/run/common/throughput_mt.ipp @@ -78,7 +78,7 @@ int throughput_mt(std::string_view description, int argc, char* argv[]) { opts::input_data input_opts; opts::clusterization clusterization_opts; opts::track_seeding seeding_opts; - opts::track_gbts_seeding gbts_seeding_opts; + opts::track_gbts_seeding seeding_gbts_opts; opts::track_finding finding_opts; opts::track_propagation propagation_opts; opts::track_fitting fitting_opts; @@ -88,12 +88,12 @@ int throughput_mt(std::string_view description, int argc, char* argv[]) { opts::program_options program_opts{ description, {detector_opts, bfield_opts, input_opts, clusterization_opts, - seeding_opts, gbts_seeding_opts, finding_opts, propagation_opts, + seeding_opts, seeding_gbts_opts, finding_opts, propagation_opts, fitting_opts, throughput_opts, threading_opts, logging_opts}, argc, argv, prelogger->cloneWithSuffix("Options")}; - + TRACCC_LOCAL_LOGGER( prelogger->clone(std::nullopt, traccc::Logging::Level(logging_opts))); @@ -149,10 +149,18 @@ int throughput_mt(std::string_view description, int argc, char* argv[]) { // Algorithm configuration(s). typename FULL_CHAIN_ALG::clustering_algorithm::config_type clustering_cfg( clusterization_opts); - const traccc::seedfinder_config seedfinder_config(seeding_opts); + + const traccc::seedfinder_config seedfinder_config(seeding_opts); const traccc::seedfilter_config seedfilter_config(seeding_opts); const traccc::spacepoint_grid_config spacepoint_grid_config(seeding_opts); const traccc::track_params_estimation_config track_params_estimation_config; + + traccc::gbts_seedfinder_config gbts_config; + if(!gbts_config.setLinkingScheme(seeding_gbts_opts.binTables, seeding_gbts_opts.layerInfo, seeding_gbts_opts.barcodeBinning, 900.0f, prelogger->clone("GBTSconfig"))) { + TRACCC_ERROR("faliure in setting gbts linking scheme"); + return -1; + } + detray::propagation::config propagation_config(propagation_opts); typename FULL_CHAIN_ALG::finding_algorithm::config_type finding_cfg( finding_opts); @@ -167,10 +175,10 @@ int throughput_mt(std::string_view description, int argc, char* argv[]) { algs.reserve(threading_opts.threads + 1); for (std::size_t i = 0; i < threading_opts.threads + 1; ++i) { algs.push_back({host_mr, clustering_cfg, seedfinder_config, - spacepoint_grid_config, seedfilter_config, + spacepoint_grid_config, seedfilter_config, gbts_config, track_params_estimation_config, finding_cfg, fitting_cfg, det_descr, det_cond, field, &detector, - logger().clone()}); + logger().clone(), seeding_gbts_opts.useGBTS}); } // Set up a lambda that calls the correct function on the algorithms. diff --git a/examples/run/common/throughput_st.ipp b/examples/run/common/throughput_st.ipp index ef69214752..f024164a0b 100644 --- a/examples/run/common/throughput_st.ipp +++ b/examples/run/common/throughput_st.ipp @@ -27,6 +27,7 @@ #include "traccc/options/track_fitting.hpp" #include "traccc/options/track_propagation.hpp" #include "traccc/options/track_seeding.hpp" +#include "traccc/options/track_gbts_seeding.hpp" // I/O include(s). #include "traccc/io/read_cells.hpp" @@ -131,8 +132,9 @@ int throughput_st(std::string_view description, int argc, char* argv[]) { const traccc::seedfinder_config seedfinder_config(seeding_opts); const traccc::seedfilter_config seedfilter_config(seeding_opts); const traccc::spacepoint_grid_config spacepoint_grid_config(seeding_opts); + traccc::gbts_seedfinder_config gbts_config; - const traccc::track_params_estimation_config track_params_estimation_config; + const traccc::track_params_estimation_config track_params_estimation_config; typename FULL_CHAIN_ALG::finding_algorithm::config_type finding_cfg( finding_opts); @@ -145,8 +147,8 @@ int throughput_st(std::string_view description, int argc, char* argv[]) { // Set up the full-chain algorithm. std::unique_ptr alg = std::make_unique( host_mr, clustering_cfg, seedfinder_config, spacepoint_grid_config, - seedfilter_config, track_params_estimation_config, finding_cfg, - fitting_cfg, det_descr, det_cond, field, &detector, + seedfilter_config, gbts_config, track_params_estimation_config, + finding_cfg, fitting_cfg, det_descr, det_cond, field, &detector, logger().clone("FullChainAlg")); // Seed the random number generator. diff --git a/examples/run/cpu/full_chain_algorithm.cpp b/examples/run/cpu/full_chain_algorithm.cpp index 3ab1f4573a..628bfc7416 100644 --- a/examples/run/cpu/full_chain_algorithm.cpp +++ b/examples/run/cpu/full_chain_algorithm.cpp @@ -15,13 +15,14 @@ full_chain_algorithm::full_chain_algorithm( const seedfinder_config& finder_config, const spacepoint_grid_config& grid_config, const seedfilter_config& filter_config, + const gbts_seedfinder_config& gbts_config, const track_params_estimation_config& track_params_estimation_config, const finding_algorithm::config_type& finding_config, const fitting_algorithm::config_type& fitting_config, const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, const host_detector* detector, - std::unique_ptr logger) + std::unique_ptr logger, const bool useGBTS) : messaging(logger->clone()), m_mr(mr), m_copy{std::make_unique()}, @@ -42,6 +43,7 @@ full_chain_algorithm::full_chain_algorithm( m_finder_config(finder_config), m_grid_config(grid_config), m_filter_config(filter_config), + m_gbts_config(gbts_config), m_track_params_estimation_config(track_params_estimation_config), m_finding_config(finding_config), m_fitting_config(fitting_config) {} diff --git a/examples/run/cpu/full_chain_algorithm.hpp b/examples/run/cpu/full_chain_algorithm.hpp index 89c5ca1cfe..409524f156 100644 --- a/examples/run/cpu/full_chain_algorithm.hpp +++ b/examples/run/cpu/full_chain_algorithm.hpp @@ -25,6 +25,8 @@ #include "traccc/utils/algorithm.hpp" #include "traccc/utils/messaging.hpp" #include "traccc/utils/propagation.hpp" +// GBTS include for dummy input (not implemented) +#include "traccc/gbts_seeding/gbts_seeding_config.hpp" // VecMem include(s). #include @@ -75,6 +77,7 @@ class full_chain_algorithm const seedfinder_config& finder_config, const spacepoint_grid_config& grid_config, const seedfilter_config& filter_config, + const gbts_seedfinder_config& gbts_config, const track_params_estimation_config& track_params_estimation_config, const finding_algorithm::config_type& finding_config, const fitting_algorithm::config_type& fitting_config, @@ -144,6 +147,8 @@ class full_chain_algorithm spacepoint_grid_config m_grid_config; /// Configuration for the seed filtering seedfilter_config m_filter_config; + // placeholder GBTS config + gbts_seedfinder_config m_gbts_config; /// Configuration for track parameter estimation track_params_estimation_config m_track_params_estimation_config; @@ -152,6 +157,8 @@ class full_chain_algorithm finding_algorithm::config_type m_finding_config; /// Configuration for the track fitting fitting_algorithm::config_type m_fitting_config; + + const bool usingGBTS; /// @} }; // class full_chain_algorithm diff --git a/examples/run/cuda/full_chain_algorithm.cpp b/examples/run/cuda/full_chain_algorithm.cpp index 26962a86d1..39c99415ab 100644 --- a/examples/run/cuda/full_chain_algorithm.cpp +++ b/examples/run/cuda/full_chain_algorithm.cpp @@ -37,13 +37,15 @@ full_chain_algorithm::full_chain_algorithm( const seedfinder_config& finder_config, const spacepoint_grid_config& grid_config, const seedfilter_config& filter_config, - const track_params_estimation_config& track_params_estimation_config, + const gbts_seedfinder_config& gbts_config, + + const track_params_estimation_config& track_params_estimation_config, const finding_algorithm::config_type& finding_config, const fitting_algorithm::config_type& fitting_config, const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, - std::unique_ptr logger) + std::unique_ptr logger, bool useGBTS) : messaging(logger->clone()), m_host_mr(host_mr), m_pinned_host_mr(), @@ -85,9 +87,12 @@ full_chain_algorithm::full_chain_algorithm( m_spacepoint_formation({m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, m_stream, logger->cloneWithSuffix("SpFormationAlg")), - m_seeding(finder_config, grid_config, filter_config, - {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, - m_stream, logger->cloneWithSuffix("SeedingAlg")), + m_seeding(finder_config, grid_config, filter_config, + {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, + m_stream, logger->cloneWithSuffix("SeedingAlg")), + m_gbts_seeding(gbts_config, + {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, + m_stream, logger->cloneWithSuffix("GbtsAlg")), m_track_parameter_estimation( track_params_estimation_config, {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, m_stream, @@ -100,9 +105,11 @@ full_chain_algorithm::full_chain_algorithm( m_finder_config(finder_config), m_grid_config(grid_config), m_filter_config(filter_config), + m_gbts_config(gbts_config), m_track_params_estimation_config(track_params_estimation_config), m_finding_config(finding_config), - m_fitting_config(fitting_config) { + m_fitting_config(fitting_config), + usingGBTS(useGBTS) { // Tell the user what device is being used. int device = 0; @@ -166,10 +173,12 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent) m_spacepoint_formation({m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, m_stream, parent.logger().cloneWithSuffix("SpFormationAlg")), - m_seeding(parent.m_finder_config, parent.m_grid_config, - parent.m_filter_config, - {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, - m_stream, parent.logger().cloneWithSuffix("SeedingAlg")), + m_seeding(parent.m_finder_config, parent.m_grid_config, parent.m_filter_config, + {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, + m_stream, parent.logger().cloneWithSuffix("SeedingAlg")), + m_gbts_seeding(parent.m_gbts_config, + {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, + m_stream, parent.logger().cloneWithSuffix("GbtsAlg")), m_track_parameter_estimation( parent.m_track_params_estimation_config, {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, m_stream, @@ -184,9 +193,11 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent) m_finder_config(parent.m_finder_config), m_grid_config(parent.m_grid_config), m_filter_config(parent.m_filter_config), + m_gbts_config(parent.m_gbts_config), m_track_params_estimation_config(parent.m_track_params_estimation_config), m_finding_config(parent.m_finding_config), - m_fitting_config(parent.m_fitting_config) { + m_fitting_config(parent.m_fitting_config), + usingGBTS(parent.usingGBTS) { m_copy.setup(m_device_det_descr)->wait(); m_copy(vecmem::get_data(m_det_descr.get()), m_device_det_descr)->wait(); @@ -218,9 +229,18 @@ full_chain_algorithm::output_type full_chain_algorithm::operator()( // Run the seed-finding (asynchronously). const spacepoint_formation_algorithm::output_type spacepoints = m_spacepoint_formation(m_device_detector, measurements); - const seed_parameter_estimation_algorithm::output_type track_params = - m_track_parameter_estimation(m_field, measurements, spacepoints, - m_seeding(spacepoints)); + + seeding_algorithm::output_type seeds; + + if(usingGBTS) { + seeds = m_gbts_seeding(spacepoints, measurements); + } + else { + seeds = m_seeding(spacepoints); + } + const seed_parameter_estimation_algorithm::output_type track_params = + m_track_parameter_estimation(m_field, measurements, spacepoints, + seeds); // Run the track finding (asynchronously). const finding_algorithm::output_type track_candidates = diff --git a/examples/run/cuda/full_chain_algorithm.hpp b/examples/run/cuda/full_chain_algorithm.hpp index ba7887d3bb..a0d76f354b 100644 --- a/examples/run/cuda/full_chain_algorithm.hpp +++ b/examples/run/cuda/full_chain_algorithm.hpp @@ -16,6 +16,7 @@ #include "traccc/cuda/seeding/seed_parameter_estimation_algorithm.hpp" #include "traccc/cuda/seeding/silicon_pixel_spacepoint_formation_algorithm.hpp" #include "traccc/cuda/seeding/triplet_seeding_algorithm.hpp" +#include "traccc/cuda/gbts_seeding/gbts_seeding_algorithm.hpp" #include "traccc/cuda/utils/stream.hpp" #include "traccc/edm/silicon_cell_collection.hpp" #include "traccc/edm/track_collection.hpp" @@ -77,6 +78,7 @@ class full_chain_algorithm const seedfinder_config& finder_config, const spacepoint_grid_config& grid_config, const seedfilter_config& filter_config, + const gbts_seedfinder_config& gbts_config, const track_params_estimation_config& track_params_estimation_config, const finding_algorithm::config_type& finding_config, const fitting_algorithm::config_type& fitting_config, @@ -158,6 +160,8 @@ class full_chain_algorithm spacepoint_formation_algorithm m_spacepoint_formation; /// Seeding algorithm triplet_seeding_algorithm m_seeding; + /// Seeding with GBTS algorithm + gbts_seeding_algorithm m_gbts_seeding; /// Track parameter estimation algorithm seed_parameter_estimation_algorithm m_track_parameter_estimation; @@ -179,6 +183,8 @@ class full_chain_algorithm spacepoint_grid_config m_grid_config; /// Configuration for the seed filtering seedfilter_config m_filter_config; + // Configuration for GBTS seeding + gbts_seedfinder_config m_gbts_config; /// Configuration for track parameter estimation track_params_estimation_config m_track_params_estimation_config; @@ -187,6 +193,8 @@ class full_chain_algorithm finding_algorithm::config_type m_finding_config; /// Configuration for the track fitting fitting_algorithm::config_type m_fitting_config; + + bool usingGBTS; /// @} }; // class full_chain_algorithm diff --git a/extras/traccc_itk_throughput_mt_profiler.sh b/extras/traccc_itk_throughput_mt_profiler.sh index d10b9d3be2..8710f9c994 100755 --- a/extras/traccc_itk_throughput_mt_profiler.sh +++ b/extras/traccc_itk_throughput_mt_profiler.sh @@ -29,7 +29,7 @@ usage() { echo " -r The number of repetitions in the test" echo " -e Multiplier for the number of events per thread" echo " -c Name of the output CSV file" - echo " -y Type of throughput test to run (traccc/g200/g100)" + echo " -y Type of throughput test to run (traccc/g200/g100, or with GBTS, g230/g130)" echo " -h Print this help" echo "" } @@ -43,8 +43,7 @@ TRACCC_THREAD_STEP=${TRACCC_THREAD_STEP:-1} TRACCC_REPETITIONS=${TRACCC_REPETITIONS:-5} TRACCC_CSV_FILE=${TRACCC_CSV_FILE:-"output.csv"} TRACCC_THROUGPUT_TYPE=${TRACCC_THROUGPUT_TYPE:-"traccc"} -TRACCC_USE_GBTS=${TRACCC_USE_GBTS:="false"} -while getopts ":x:i:m:t:r:c:y:g:h" opt; do +while getopts ":x:i:m:t:r:c:y:h" opt; do case $opt in x) TRACCC_EXECUTABLE=$OPTARG @@ -70,9 +69,6 @@ while getopts ":x:i:m:t:r:c:y:g:h" opt; do y) TRACCC_THROUGPUT_TYPE=$OPTARG ;; - g) - TRACCC_USE_GBTS=$OPTARG - ;; h) usage exit 0 @@ -100,7 +96,6 @@ echo " THREAD_STEP : ${TRACCC_THREAD_STEP}" echo " REPETITIONS : ${TRACCC_REPETITIONS}" echo " CSV_FILE : ${TRACCC_CSV_FILE}" echo " THROUGHPUT_TYPE : ${TRACCC_THROUGPUT_TYPE}" -echo " USE_GBTS : ${TRACCC_USE_GBTS}" # Check whether the output file already exists. Refuse to overwrite existing # files. @@ -151,6 +146,12 @@ if [[ "${TRACCC_THROUGPUT_TYPE}" == "g200" ]]; then TRACCC_CUTS=${G200_CUTS[@]} elif [[ "${TRACCC_THROUGPUT_TYPE}" == "g100" ]]; then TRACCC_CUTS=${G100_CUTS[@]} +elif [[ "${TRACCC_THROUGPUT_TYPE}" == "g230" ]]; then + TRACCC_CUTS=${G200_CUTS[@]} + TRACCC_CUTS+=(--useGBTS --gbts_config_dir="${TRACCC_INPUT_DIR}") +elif [[ "${TRACCC_THROUGPUT_TYPE}" == "g130" ]]; then + TRACCC_CUTS=${G100_CUTS[@]} + TRACCC_CUTS+=(--useGBTS --gbts_config_dir="${TRACCC_INPUT_DIR}") elif [[ "${TRACCC_THROUGPUT_TYPE}" != "traccc" ]]; then echo "***" echo "*** Unknown throughput type: '${TRACCC_THROUGPUT_TYPE}'" From 799d66709d6294902e1c45101a467f14eeec0f77 Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 12 Nov 2025 16:05:57 +0100 Subject: [PATCH 03/28] GBTS working in the mt --- .../gbts_seeding/gbts_seeding_algorithm.cu | 1 - examples/options/src/track_gbts_seeding.cpp | 22 +++++++++---------- examples/run/common/throughput_mt.ipp | 8 ++++--- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/device/cuda/src/gbts_seeding/gbts_seeding_algorithm.cu b/device/cuda/src/gbts_seeding/gbts_seeding_algorithm.cu index 39313742bf..3a6a98e22f 100644 --- a/device/cuda/src/gbts_seeding/gbts_seeding_algorithm.cu +++ b/device/cuda/src/gbts_seeding/gbts_seeding_algorithm.cu @@ -282,7 +282,6 @@ gbts_seeding_algorithm::output_type gbts_seeding_algorithm::operator()( nNodesPerBlock, ctx.nNodes, m_config.n_phi_bins); cudaStreamSynchronize(stream); - error = cudaGetLastError(); if (error != cudaSuccess) { diff --git a/examples/options/src/track_gbts_seeding.cpp b/examples/options/src/track_gbts_seeding.cpp index ddb46a7e75..097092858f 100644 --- a/examples/options/src/track_gbts_seeding.cpp +++ b/examples/options/src/track_gbts_seeding.cpp @@ -13,7 +13,8 @@ #include #include #include - +//TESTING +#include namespace traccc::opts { track_gbts_seeding::track_gbts_seeding() : interface("GBTS Options") { @@ -41,7 +42,7 @@ void track_gbts_seeding::read(const boost::program_options::variables_map &) { barcodeBinning.reserve(nBarcodes); std::pair barcodeLayerPair; - for(;nBarcodes>=0;--nBarcodes) { + for(;nBarcodes>0;--nBarcodes) { barcodeBinningFile >> barcodeLayerPair.first; barcodeBinningFile >> barcodeLayerPair.second; @@ -52,14 +53,14 @@ void track_gbts_seeding::read(const boost::program_options::variables_map &) { std::filesystem::path(config_dir + "/binTables.txt")); int nBinPairs = 0; - barcodeBinningFile >> nBinPairs; + binTablesFile >> nBinPairs; binTables.reserve(nBinPairs); - std::pair> binPair; - int bin2 = 0; - for(;nBinPairs>=0;--nBinPairs) { - binTablesFile >> binPair.first; - binTablesFile >> bin2; - binPair.second.push_back(bin2); + int bin1 = 0; + std::vector bin2 = { 0 }; + for(;nBinPairs>0;--nBinPairs) { + binTablesFile >> bin1; + binTablesFile >> bin2[0]; + binTables.push_back(std::make_pair(bin1, bin2)); } std::ifstream layerInfoFile( @@ -71,11 +72,10 @@ void track_gbts_seeding::read(const boost::program_options::variables_map &) { int type = 0; int info[2] = {0, 0}; float geo[2] = {0, 0}; - for(;nLayers>=0;--nLayers) { + for(;nLayers>0;--nLayers) { layerInfoFile >> type; layerInfoFile >> info[0] >> info[1]; layerInfoFile >> geo[0] >> geo[1]; - layerInfo.addLayer(type, info[0], info[1], geo[0], geo[1]); } } diff --git a/examples/run/common/throughput_mt.ipp b/examples/run/common/throughput_mt.ipp index 97d8b0b72f..ba1c5e0a0b 100644 --- a/examples/run/common/throughput_mt.ipp +++ b/examples/run/common/throughput_mt.ipp @@ -156,9 +156,11 @@ int throughput_mt(std::string_view description, int argc, char* argv[]) { const traccc::track_params_estimation_config track_params_estimation_config; traccc::gbts_seedfinder_config gbts_config; - if(!gbts_config.setLinkingScheme(seeding_gbts_opts.binTables, seeding_gbts_opts.layerInfo, seeding_gbts_opts.barcodeBinning, 900.0f, prelogger->clone("GBTSconfig"))) { - TRACCC_ERROR("faliure in setting gbts linking scheme"); - return -1; + if(seeding_gbts_opts.useGBTS) { + if(!gbts_config.setLinkingScheme(seeding_gbts_opts.binTables, seeding_gbts_opts.layerInfo, seeding_gbts_opts.barcodeBinning, 900.0f, prelogger->clone("GBTSconfig"))) { + TRACCC_ERROR("faliure in setting gbts linking scheme"); + return -1; + } } detray::propagation::config propagation_config(propagation_opts); From ff55e6cc4ed8a0a43f3a940b9a09a2790d48fddc Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 12 Nov 2025 16:40:53 +0100 Subject: [PATCH 04/28] adding placeholders for backends without GBTS impl --- examples/run/alpaka/full_chain_algorithm.cpp | 6 +++++ examples/run/alpaka/full_chain_algorithm.hpp | 12 +++++----- examples/run/cpu/full_chain_algorithm.hpp | 4 ++-- examples/run/sycl/full_chain_algorithm.cpp | 3 +++ examples/run/sycl/full_chain_algorithm.hpp | 23 +++++++++++++++++++- 5 files changed, 40 insertions(+), 8 deletions(-) diff --git a/examples/run/alpaka/full_chain_algorithm.cpp b/examples/run/alpaka/full_chain_algorithm.cpp index 839f93e234..950cae10e7 100644 --- a/examples/run/alpaka/full_chain_algorithm.cpp +++ b/examples/run/alpaka/full_chain_algorithm.cpp @@ -23,8 +23,10 @@ full_chain_algorithm::full_chain_algorithm( const seedfinder_config& finder_config, const spacepoint_grid_config& grid_config, const seedfilter_config& filter_config, + const gbts_seedfinder_config& gbts_config, const track_params_estimation_config& track_params_estimation_config, const finding_algorithm::config_type& finding_config, + const finding_algorithm::config_type& finding_config, const fitting_algorithm::config_type& fitting_config, const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, @@ -90,8 +92,10 @@ full_chain_algorithm::full_chain_algorithm( m_finder_config(finder_config), m_grid_config(grid_config), m_filter_config(filter_config), + m_gbts_config(gbts_config), m_track_params_estimation_config(track_params_estimation_config), m_finding_config(finding_config), + m_finding_config(finding_config), m_fitting_config(fitting_config) { std::cout << traccc::alpaka::get_device_info() << std::endl; @@ -172,8 +176,10 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent) m_finder_config(parent.m_finder_config), m_grid_config(parent.m_grid_config), m_filter_config(parent.m_filter_config), + m_gbts_config(parent.m_gbts_config), m_track_params_estimation_config(parent.m_track_params_estimation_config), m_finding_config(parent.m_finding_config), + m_finding_config(parent.m_finding_config), m_fitting_config(parent.m_fitting_config) { // Copy the detector (description) to the device. diff --git a/examples/run/alpaka/full_chain_algorithm.hpp b/examples/run/alpaka/full_chain_algorithm.hpp index cca056989c..a18c1365c4 100644 --- a/examples/run/alpaka/full_chain_algorithm.hpp +++ b/examples/run/alpaka/full_chain_algorithm.hpp @@ -31,6 +31,8 @@ #include "traccc/utils/algorithm.hpp" #include "traccc/utils/messaging.hpp" #include "traccc/utils/propagation.hpp" +// GBTS include for placeholder input (not implemented) +#include "traccc/gbts_seeding/gbts_seeding_config.hpp" // VecMem include(s). #include @@ -79,6 +81,7 @@ class full_chain_algorithm const seedfinder_config& finder_config, const spacepoint_grid_config& grid_config, const seedfilter_config& filter_config, + const gbts_seedfinder_config& gbts_config, const track_params_estimation_config& track_params_estimation_config, const finding_algorithm::config_type& finding_config, const fitting_algorithm::config_type& fitting_config, @@ -181,13 +184,12 @@ class full_chain_algorithm spacepoint_grid_config m_grid_config; /// Configuration for the seed filtering seedfilter_config m_filter_config; + /// placeholder GBTS config + gbts_seedfinder_config m_gbts_config; /// Configuration for track parameter estimation track_params_estimation_config m_track_params_estimation_config; - /// Configuration for the track finding - finding_algorithm::config_type m_finding_config; - /// Configuration for the track fitting - fitting_algorithm::config_type m_fitting_config; - + + bool usingGBTS; /// @} }; // class full_chain_algorithm diff --git a/examples/run/cpu/full_chain_algorithm.hpp b/examples/run/cpu/full_chain_algorithm.hpp index 409524f156..4e29604c06 100644 --- a/examples/run/cpu/full_chain_algorithm.hpp +++ b/examples/run/cpu/full_chain_algorithm.hpp @@ -147,13 +147,13 @@ class full_chain_algorithm spacepoint_grid_config m_grid_config; /// Configuration for the seed filtering seedfilter_config m_filter_config; - // placeholder GBTS config + /// placeholder GBTS config gbts_seedfinder_config m_gbts_config; /// Configuration for track parameter estimation track_params_estimation_config m_track_params_estimation_config; - /// Configuration for the track finding + /// Configuration for the track finding finding_algorithm::config_type m_finding_config; /// Configuration for the track fitting fitting_algorithm::config_type m_fitting_config; diff --git a/examples/run/sycl/full_chain_algorithm.cpp b/examples/run/sycl/full_chain_algorithm.cpp index 516e77e42b..f50622db16 100644 --- a/examples/run/sycl/full_chain_algorithm.cpp +++ b/examples/run/sycl/full_chain_algorithm.cpp @@ -29,6 +29,7 @@ full_chain_algorithm::full_chain_algorithm( const seedfinder_config& finder_config, const spacepoint_grid_config& grid_config, const seedfilter_config& filter_config, + const gbts_seedfinder_config& gbts_config, const track_params_estimation_config& track_params_estimation_config, const finding_algorithm::config_type& finding_config, const fitting_algorithm::config_type& fitting_config, @@ -110,6 +111,7 @@ full_chain_algorithm::full_chain_algorithm( m_finder_config(finder_config), m_grid_config(grid_config), m_filter_config(filter_config), + m_gbts_config(gbts_config), m_track_params_estimation_config(track_params_estimation_config), m_finding_config(finding_config), m_fitting_config(fitting_config) { @@ -200,6 +202,7 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent) m_clustering_config(parent.m_clustering_config), m_finder_config(parent.m_finder_config), m_grid_config(parent.m_grid_config), + m_gbts_config(parent.m_gbts_config), m_filter_config(parent.m_filter_config), m_track_params_estimation_config(parent.m_track_params_estimation_config), m_finding_config(parent.m_finding_config), diff --git a/examples/run/sycl/full_chain_algorithm.hpp b/examples/run/sycl/full_chain_algorithm.hpp index 4840ab7ae2..cdc7b47bb9 100644 --- a/examples/run/sycl/full_chain_algorithm.hpp +++ b/examples/run/sycl/full_chain_algorithm.hpp @@ -24,6 +24,8 @@ #include "traccc/sycl/seeding/triplet_seeding_algorithm.hpp" #include "traccc/utils/algorithm.hpp" #include "traccc/utils/propagation.hpp" +// GBTS include for placeholder input (not implemented) +#include "traccc/gbts_seeding/gbts_seeding_config.hpp" // VecMem include(s). #include @@ -72,6 +74,7 @@ class full_chain_algorithm /// @param mr The memory resource to use for the intermediate and result /// objects /// +<<<<<<< HEAD full_chain_algorithm( vecmem::memory_resource& host_mr, const clustering_config& clustering_config, @@ -85,6 +88,19 @@ class full_chain_algorithm const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, std::unique_ptr logger); +======= + full_chain_algorithm(vecmem::memory_resource& host_mr, + const clustering_config& clustering_config, + const seedfinder_config& finder_config, + const spacepoint_grid_config& grid_config, + const seedfilter_config& filter_config, + const gbts_seedfinder_config& gbts_config, + const finding_algorithm::config_type& finding_config, + const fitting_algorithm::config_type& fitting_config, + const silicon_detector_description::host& det_descr, + const magnetic_field& field, host_detector* detector, + std::unique_ptr logger); +>>>>>>> 9181282c (adding placeholders for backends without GBTS impl) /// Copy constructor /// @@ -182,12 +198,17 @@ class full_chain_algorithm spacepoint_grid_config m_grid_config; /// Configuration for the seed filtering seedfilter_config m_filter_config; + /// placeholder GBTS config + m_gbts_seedfinder_config m_gbts_config; /// Configuration for track parameter estimation track_params_estimation_config m_track_params_estimation_config; - /// Configuration for the track finding + + /// Configuration for the track finding finding_algorithm::config_type m_finding_config; /// Configuration for the track fitting fitting_algorithm::config_type m_fitting_config; + + bool usingGBTS; /// @} }; // class full_chain_algorithm From 404343efc0e03996c637d1bd2bc5d6b65d939866 Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 12 Nov 2025 22:12:01 +0100 Subject: [PATCH 05/28] formatting and placeholders for sycl alpaka --- examples/options/CMakeLists.txt | 2 +- .../traccc/options/track_gbts_seeding.hpp | 12 +- examples/options/src/track_gbts_seeding.cpp | 111 +++++++++--------- examples/run/alpaka/full_chain_algorithm.cpp | 6 +- examples/run/alpaka/full_chain_algorithm.hpp | 14 +++ examples/run/common/throughput_mt.ipp | 23 ++-- examples/run/common/throughput_st.ipp | 3 +- examples/run/cpu/full_chain_algorithm.cpp | 3 +- examples/run/cpu/full_chain_algorithm.hpp | 21 +++- examples/run/cuda/full_chain_algorithm.cpp | 15 ++- examples/run/cuda/full_chain_algorithm.hpp | 11 +- examples/run/sycl/full_chain_algorithm.cpp | 10 +- examples/run/sycl/full_chain_algorithm.hpp | 21 +--- 13 files changed, 140 insertions(+), 112 deletions(-) diff --git a/examples/options/CMakeLists.txt b/examples/options/CMakeLists.txt index 4e608703a6..42466e4a8c 100644 --- a/examples/options/CMakeLists.txt +++ b/examples/options/CMakeLists.txt @@ -49,7 +49,7 @@ traccc_add_library( traccc_options options TYPE SHARED "src/track_matching.cpp" "src/track_propagation.cpp" "src/track_resolution.cpp" - "src/track_seeding.cpp" + "src/track_seeding.cpp" "src/track_gbts_seeding.cpp" "src/truth_finding.cpp" ) diff --git a/examples/options/include/traccc/options/track_gbts_seeding.hpp b/examples/options/include/traccc/options/track_gbts_seeding.hpp index e75812cce4..ebdad02928 100644 --- a/examples/options/include/traccc/options/track_gbts_seeding.hpp +++ b/examples/options/include/traccc/options/track_gbts_seeding.hpp @@ -8,8 +8,8 @@ #pragma once // Project include(s). -#include "traccc/options/details/interface.hpp" #include "traccc/gbts_seeding/gbts_seeding_config.hpp" +#include "traccc/options/details/interface.hpp" // System include(s). #include @@ -25,12 +25,12 @@ class track_gbts_seeding : public interface { bool useGBTS = false; std::string config_dir = "DEFAULT"; - + /// @} - // config info from file - std::vector> barcodeBinning; - std::vector>> binTables; - traccc::device::gbts_layerInfo layerInfo; + // config info from file + std::vector> barcodeBinning; + std::vector>> binTables; + traccc::device::gbts_layerInfo layerInfo; /// Constructor track_gbts_seeding(); diff --git a/examples/options/src/track_gbts_seeding.cpp b/examples/options/src/track_gbts_seeding.cpp index 097092858f..ab37cda960 100644 --- a/examples/options/src/track_gbts_seeding.cpp +++ b/examples/options/src/track_gbts_seeding.cpp @@ -10,19 +10,17 @@ #include "traccc/examples/utils/printable.hpp" // System include(s). -#include -#include #include -//TESTING -#include +#include +#include + namespace traccc::opts { track_gbts_seeding::track_gbts_seeding() : interface("GBTS Options") { - m_desc.add_options()( - "useGBTS", - boost::program_options::bool_switch(&useGBTS), - "use gbts algorithm"); - + m_desc.add_options()("useGBTS", + boost::program_options::bool_switch(&useGBTS), + "use gbts algorithm"); + m_desc.add_options()( "gbts_config_dir", boost::program_options::value(&config_dir)->default_value(config_dir), @@ -30,57 +28,58 @@ track_gbts_seeding::track_gbts_seeding() : interface("GBTS Options") { } void track_gbts_seeding::read(const boost::program_options::variables_map &) { - // fill config - if(!useGBTS) { - return; - } - std::ifstream barcodeBinningFile( - std::filesystem::path(config_dir + "/barcodeBinning.txt")); - - int nBarcodes = 0; - barcodeBinningFile >> nBarcodes; - barcodeBinning.reserve(nBarcodes); - - std::pair barcodeLayerPair; - for(;nBarcodes>0;--nBarcodes) { - barcodeBinningFile >> barcodeLayerPair.first; - barcodeBinningFile >> barcodeLayerPair.second; - - barcodeBinning.push_back(barcodeLayerPair); - } + // fill config + if (!useGBTS) { + return; + } + std::ifstream barcodeBinningFile( + std::filesystem::path(config_dir + "/barcodeBinning.txt")); + + int nBarcodes = 0; + barcodeBinningFile >> nBarcodes; + barcodeBinning.reserve(nBarcodes); + + std::pair barcodeLayerPair; + for (; nBarcodes > 0; --nBarcodes) { + barcodeBinningFile >> barcodeLayerPair.first; + barcodeBinningFile >> barcodeLayerPair.second; + + barcodeBinning.push_back(barcodeLayerPair); + } std::ifstream binTablesFile( - std::filesystem::path(config_dir + "/binTables.txt")); - - int nBinPairs = 0; - binTablesFile >> nBinPairs; - binTables.reserve(nBinPairs); - int bin1 = 0; - std::vector bin2 = { 0 }; - for(;nBinPairs>0;--nBinPairs) { - binTablesFile >> bin1; - binTablesFile >> bin2[0]; - binTables.push_back(std::make_pair(bin1, bin2)); - } - - std::ifstream layerInfoFile( - std::filesystem::path(config_dir + "/layerInfo.txt")); - - int nLayers = 0; - layerInfoFile >> nLayers; - layerInfo.reserve(nLayers); - int type = 0; - int info[2] = {0, 0}; - float geo[2] = {0, 0}; - for(;nLayers>0;--nLayers) { - layerInfoFile >> type; - layerInfoFile >> info[0] >> info[1]; - layerInfoFile >> geo[0] >> geo[1]; - layerInfo.addLayer(type, info[0], info[1], geo[0], geo[1]); - } + std::filesystem::path(config_dir + "/binTables.txt")); + + int nBinPairs = 0; + binTablesFile >> nBinPairs; + binTables.reserve(nBinPairs); + int bin1 = 0; + std::vector bin2 = {0}; + for (; nBinPairs > 0; --nBinPairs) { + binTablesFile >> bin1; + binTablesFile >> bin2[0]; + binTables.push_back(std::make_pair(bin1, bin2)); + } + + std::ifstream layerInfoFile( + std::filesystem::path(config_dir + "/layerInfo.txt")); + + int nLayers = 0; + layerInfoFile >> nLayers; + layerInfo.reserve(nLayers); + char type = 0; + int info[2] = {0, 0}; + float geo[2] = {0, 0}; + for (; nLayers > 0; --nLayers) { + layerInfoFile >> type; + layerInfoFile >> info[0] >> info[1]; + layerInfoFile >> geo[0] >> geo[1]; + layerInfo.addLayer(type, info[0], info[1], geo[0], geo[1]); + } } -std::unique_ptr track_gbts_seeding::as_printable() const { +std::unique_ptr track_gbts_seeding::as_printable() + const { auto cat = std::make_unique(m_description); cat->add_child(std::make_unique( diff --git a/examples/run/alpaka/full_chain_algorithm.cpp b/examples/run/alpaka/full_chain_algorithm.cpp index 950cae10e7..09e7829067 100644 --- a/examples/run/alpaka/full_chain_algorithm.cpp +++ b/examples/run/alpaka/full_chain_algorithm.cpp @@ -26,7 +26,6 @@ full_chain_algorithm::full_chain_algorithm( const gbts_seedfinder_config& gbts_config, const track_params_estimation_config& track_params_estimation_config, const finding_algorithm::config_type& finding_config, - const finding_algorithm::config_type& finding_config, const fitting_algorithm::config_type& fitting_config, const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, @@ -93,9 +92,13 @@ full_chain_algorithm::full_chain_algorithm( m_grid_config(grid_config), m_filter_config(filter_config), m_gbts_config(gbts_config), +<<<<<<< HEAD m_track_params_estimation_config(track_params_estimation_config), m_finding_config(finding_config), m_finding_config(finding_config), +======= + m_finding_config(finding_config), +>>>>>>> 0ac700c4 (formatting and placeholders for sycl alpaka) m_fitting_config(fitting_config) { std::cout << traccc::alpaka::get_device_info() << std::endl; @@ -179,7 +182,6 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent) m_gbts_config(parent.m_gbts_config), m_track_params_estimation_config(parent.m_track_params_estimation_config), m_finding_config(parent.m_finding_config), - m_finding_config(parent.m_finding_config), m_fitting_config(parent.m_fitting_config) { // Copy the detector (description) to the device. diff --git a/examples/run/alpaka/full_chain_algorithm.hpp b/examples/run/alpaka/full_chain_algorithm.hpp index a18c1365c4..b53ee6687f 100644 --- a/examples/run/alpaka/full_chain_algorithm.hpp +++ b/examples/run/alpaka/full_chain_algorithm.hpp @@ -75,6 +75,7 @@ class full_chain_algorithm /// @param mr The memory resource to use for the intermediate and result /// objects /// +<<<<<<< HEAD full_chain_algorithm( vecmem::memory_resource& host_mr, const clustering_config& clustering_config, @@ -89,6 +90,19 @@ class full_chain_algorithm const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, std::unique_ptr logger); +======= + full_chain_algorithm(vecmem::memory_resource& host_mr, + const clustering_config& clustering_config, + const seedfinder_config& finder_config, + const spacepoint_grid_config& grid_config, + const seedfilter_config& filter_config, + const gbts_seedfinder_config& gbts_config, + const finding_algorithm::config_type& finding_config, + const fitting_algorithm::config_type& fitting_config, + const silicon_detector_description::host& det_descr, + const magnetic_field& field, host_detector* detector, + std::unique_ptr logger); +>>>>>>> 0ac700c4 (formatting and placeholders for sycl alpaka) /// Copy constructor /// diff --git a/examples/run/common/throughput_mt.ipp b/examples/run/common/throughput_mt.ipp index ba1c5e0a0b..d4518dacd9 100644 --- a/examples/run/common/throughput_mt.ipp +++ b/examples/run/common/throughput_mt.ipp @@ -26,9 +26,9 @@ #include "traccc/options/throughput.hpp" #include "traccc/options/track_finding.hpp" #include "traccc/options/track_fitting.hpp" +#include "traccc/options/track_gbts_seeding.hpp" #include "traccc/options/track_propagation.hpp" #include "traccc/options/track_seeding.hpp" -#include "traccc/options/track_gbts_seeding.hpp" // I/O include(s). #include "traccc/io/read_cells.hpp" @@ -89,7 +89,7 @@ int throughput_mt(std::string_view description, int argc, char* argv[]) { description, {detector_opts, bfield_opts, input_opts, clusterization_opts, seeding_opts, seeding_gbts_opts, finding_opts, propagation_opts, - fitting_opts, throughput_opts, threading_opts, logging_opts}, + fitting_opts, throughput_opts, threading_opts, logging_opts}, argc, argv, prelogger->cloneWithSuffix("Options")}; @@ -150,18 +150,21 @@ int throughput_mt(std::string_view description, int argc, char* argv[]) { typename FULL_CHAIN_ALG::clustering_algorithm::config_type clustering_cfg( clusterization_opts); - const traccc::seedfinder_config seedfinder_config(seeding_opts); + const traccc::seedfinder_config seedfinder_config(seeding_opts); const traccc::seedfilter_config seedfilter_config(seeding_opts); const traccc::spacepoint_grid_config spacepoint_grid_config(seeding_opts); const traccc::track_params_estimation_config track_params_estimation_config; - traccc::gbts_seedfinder_config gbts_config; - if(seeding_gbts_opts.useGBTS) { - if(!gbts_config.setLinkingScheme(seeding_gbts_opts.binTables, seeding_gbts_opts.layerInfo, seeding_gbts_opts.barcodeBinning, 900.0f, prelogger->clone("GBTSconfig"))) { - TRACCC_ERROR("faliure in setting gbts linking scheme"); - return -1; - } - } + traccc::gbts_seedfinder_config gbts_config; + if (seeding_gbts_opts.useGBTS) { + if (!gbts_config.setLinkingScheme( + seeding_gbts_opts.binTables, seeding_gbts_opts.layerInfo, + seeding_gbts_opts.barcodeBinning, 900.0f, + prelogger->clone("GBTSconfig"))) { + TRACCC_ERROR("failure in setting gbts linking scheme"); + return -1; + } + } detray::propagation::config propagation_config(propagation_opts); typename FULL_CHAIN_ALG::finding_algorithm::config_type finding_cfg( diff --git a/examples/run/common/throughput_st.ipp b/examples/run/common/throughput_st.ipp index f024164a0b..bf53284678 100644 --- a/examples/run/common/throughput_st.ipp +++ b/examples/run/common/throughput_st.ipp @@ -25,9 +25,9 @@ #include "traccc/options/throughput.hpp" #include "traccc/options/track_finding.hpp" #include "traccc/options/track_fitting.hpp" +#include "traccc/options/track_gbts_seeding.hpp" #include "traccc/options/track_propagation.hpp" #include "traccc/options/track_seeding.hpp" -#include "traccc/options/track_gbts_seeding.hpp" // I/O include(s). #include "traccc/io/read_cells.hpp" @@ -133,7 +133,6 @@ int throughput_st(std::string_view description, int argc, char* argv[]) { const traccc::seedfilter_config seedfilter_config(seeding_opts); const traccc::spacepoint_grid_config spacepoint_grid_config(seeding_opts); traccc::gbts_seedfinder_config gbts_config; - const traccc::track_params_estimation_config track_params_estimation_config; typename FULL_CHAIN_ALG::finding_algorithm::config_type finding_cfg( diff --git a/examples/run/cpu/full_chain_algorithm.cpp b/examples/run/cpu/full_chain_algorithm.cpp index 628bfc7416..0c888e59a9 100644 --- a/examples/run/cpu/full_chain_algorithm.cpp +++ b/examples/run/cpu/full_chain_algorithm.cpp @@ -46,7 +46,8 @@ full_chain_algorithm::full_chain_algorithm( m_gbts_config(gbts_config), m_track_params_estimation_config(track_params_estimation_config), m_finding_config(finding_config), - m_fitting_config(fitting_config) {} + m_fitting_config(fitting_config), + usingGBTS(useGBTS) {} full_chain_algorithm::output_type full_chain_algorithm::operator()( const edm::silicon_cell_collection::host& cells) const { diff --git a/examples/run/cpu/full_chain_algorithm.hpp b/examples/run/cpu/full_chain_algorithm.hpp index 4e29604c06..146ea11852 100644 --- a/examples/run/cpu/full_chain_algorithm.hpp +++ b/examples/run/cpu/full_chain_algorithm.hpp @@ -71,6 +71,7 @@ class full_chain_algorithm /// @param dummy This is not used anywhere. Allows templating CPU/Device /// algorithm. /// +<<<<<<< HEAD full_chain_algorithm( vecmem::memory_resource& mr, const clustering_algorithm::config_type& dummy, @@ -85,6 +86,21 @@ class full_chain_algorithm const detector_conditions_description::host& det_cond, const magnetic_field& field, const host_detector* detector, std::unique_ptr logger); +======= + full_chain_algorithm(vecmem::memory_resource& mr, + const clustering_algorithm::config_type& dummy, + const seedfinder_config& finder_config, + const spacepoint_grid_config& grid_config, + const seedfilter_config& filter_config, + const gbts_seedfinder_config& gbts_config, + const finding_algorithm::config_type& finding_config, + const fitting_algorithm::config_type& fitting_config, + const silicon_detector_description::host& det_descr, + const magnetic_field& field, + const host_detector* detector, + std::unique_ptr logger, + const bool useGBTS); +>>>>>>> 0ac700c4 (formatting and placeholders for sycl alpaka) /// Reconstruct track parameters in the entire detector /// @@ -149,7 +165,6 @@ class full_chain_algorithm seedfilter_config m_filter_config; /// placeholder GBTS config gbts_seedfinder_config m_gbts_config; - /// Configuration for track parameter estimation track_params_estimation_config m_track_params_estimation_config; @@ -157,8 +172,8 @@ class full_chain_algorithm finding_algorithm::config_type m_finding_config; /// Configuration for the track fitting fitting_algorithm::config_type m_fitting_config; - - const bool usingGBTS; + + const bool usingGBTS; /// @} }; // class full_chain_algorithm diff --git a/examples/run/cuda/full_chain_algorithm.cpp b/examples/run/cuda/full_chain_algorithm.cpp index 39c99415ab..90fb576802 100644 --- a/examples/run/cuda/full_chain_algorithm.cpp +++ b/examples/run/cuda/full_chain_algorithm.cpp @@ -38,7 +38,6 @@ full_chain_algorithm::full_chain_algorithm( const spacepoint_grid_config& grid_config, const seedfilter_config& filter_config, const gbts_seedfinder_config& gbts_config, - const track_params_estimation_config& track_params_estimation_config, const finding_algorithm::config_type& finding_config, const fitting_algorithm::config_type& fitting_config, @@ -87,12 +86,12 @@ full_chain_algorithm::full_chain_algorithm( m_spacepoint_formation({m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, m_stream, logger->cloneWithSuffix("SpFormationAlg")), - m_seeding(finder_config, grid_config, filter_config, - {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, - m_stream, logger->cloneWithSuffix("SeedingAlg")), - m_gbts_seeding(gbts_config, - {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, - m_stream, logger->cloneWithSuffix("GbtsAlg")), + m_seeding(finder_config, grid_config, filter_config, + {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, + m_stream, logger->cloneWithSuffix("SeedingAlg")), + m_gbts_seeding(gbts_config, + {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, + m_stream, logger->cloneWithSuffix("GbtsAlg")), m_track_parameter_estimation( track_params_estimation_config, {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, m_stream, @@ -105,7 +104,7 @@ full_chain_algorithm::full_chain_algorithm( m_finder_config(finder_config), m_grid_config(grid_config), m_filter_config(filter_config), - m_gbts_config(gbts_config), + m_gbts_config(gbts_config), m_track_params_estimation_config(track_params_estimation_config), m_finding_config(finding_config), m_fitting_config(fitting_config), diff --git a/examples/run/cuda/full_chain_algorithm.hpp b/examples/run/cuda/full_chain_algorithm.hpp index a0d76f354b..61b31ff680 100644 --- a/examples/run/cuda/full_chain_algorithm.hpp +++ b/examples/run/cuda/full_chain_algorithm.hpp @@ -85,7 +85,8 @@ class full_chain_algorithm const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, - std::unique_ptr logger); + std::unique_ptr logger + bool usingGBTS = false); /// Copy constructor /// @@ -183,8 +184,8 @@ class full_chain_algorithm spacepoint_grid_config m_grid_config; /// Configuration for the seed filtering seedfilter_config m_filter_config; - // Configuration for GBTS seeding - gbts_seedfinder_config m_gbts_config; + // Configuration for GBTS seeding + gbts_seedfinder_config m_gbts_config; /// Configuration for track parameter estimation track_params_estimation_config m_track_params_estimation_config; @@ -193,8 +194,8 @@ class full_chain_algorithm finding_algorithm::config_type m_finding_config; /// Configuration for the track fitting fitting_algorithm::config_type m_fitting_config; - - bool usingGBTS; + + bool usingGBTS; /// @} }; // class full_chain_algorithm diff --git a/examples/run/sycl/full_chain_algorithm.cpp b/examples/run/sycl/full_chain_algorithm.cpp index f50622db16..bf0b9ded63 100644 --- a/examples/run/sycl/full_chain_algorithm.cpp +++ b/examples/run/sycl/full_chain_algorithm.cpp @@ -30,7 +30,10 @@ full_chain_algorithm::full_chain_algorithm( const spacepoint_grid_config& grid_config, const seedfilter_config& filter_config, const gbts_seedfinder_config& gbts_config, +<<<<<<< HEAD const track_params_estimation_config& track_params_estimation_config, +======= +>>>>>>> 0ac700c4 (formatting and placeholders for sycl alpaka) const finding_algorithm::config_type& finding_config, const fitting_algorithm::config_type& fitting_config, const detector_design_description::host& det_descr, @@ -111,8 +114,12 @@ full_chain_algorithm::full_chain_algorithm( m_finder_config(finder_config), m_grid_config(grid_config), m_filter_config(filter_config), +<<<<<<< HEAD m_gbts_config(gbts_config), m_track_params_estimation_config(track_params_estimation_config), +======= + m_gbts_config(gbts_config), +>>>>>>> 0ac700c4 (formatting and placeholders for sycl alpaka) m_finding_config(finding_config), m_fitting_config(fitting_config) { @@ -206,7 +213,8 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent) m_filter_config(parent.m_filter_config), m_track_params_estimation_config(parent.m_track_params_estimation_config), m_finding_config(parent.m_finding_config), - m_fitting_config(parent.m_fitting_config) { + m_fitting_config(parent.m_fitting_config), + usingGBTS = parent.usingGBTS { // Copy the detector (description) to the device. m_copy(vecmem::get_data(m_det_descr.get()), m_device_det_descr)->wait(); diff --git a/examples/run/sycl/full_chain_algorithm.hpp b/examples/run/sycl/full_chain_algorithm.hpp index cdc7b47bb9..5e25070460 100644 --- a/examples/run/sycl/full_chain_algorithm.hpp +++ b/examples/run/sycl/full_chain_algorithm.hpp @@ -74,7 +74,6 @@ class full_chain_algorithm /// @param mr The memory resource to use for the intermediate and result /// objects /// -<<<<<<< HEAD full_chain_algorithm( vecmem::memory_resource& host_mr, const clustering_config& clustering_config, @@ -87,20 +86,8 @@ class full_chain_algorithm const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, - std::unique_ptr logger); -======= - full_chain_algorithm(vecmem::memory_resource& host_mr, - const clustering_config& clustering_config, - const seedfinder_config& finder_config, - const spacepoint_grid_config& grid_config, - const seedfilter_config& filter_config, - const gbts_seedfinder_config& gbts_config, - const finding_algorithm::config_type& finding_config, - const fitting_algorithm::config_type& fitting_config, - const silicon_detector_description::host& det_descr, - const magnetic_field& field, host_detector* detector, - std::unique_ptr logger); ->>>>>>> 9181282c (adding placeholders for backends without GBTS impl) + std::unique_ptr logger, + bool useGBTS = false); /// Copy constructor /// @@ -207,8 +194,8 @@ class full_chain_algorithm finding_algorithm::config_type m_finding_config; /// Configuration for the track fitting fitting_algorithm::config_type m_fitting_config; - - bool usingGBTS; + + bool usingGBTS; /// @} }; // class full_chain_algorithm From 30b5b2cb4aedf447548f61706a96ce4b51424147 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 13 Nov 2025 00:38:44 +0100 Subject: [PATCH 06/28] testing with extra compiler flags --- cmake/traccc-compiler-options-cpp.cmake | 3 +++ cmake/traccc-compiler-options-cuda.cmake | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/cmake/traccc-compiler-options-cpp.cmake b/cmake/traccc-compiler-options-cpp.cmake index 3638026206..be6a002484 100644 --- a/cmake/traccc-compiler-options-cpp.cmake +++ b/cmake/traccc-compiler-options-cpp.cmake @@ -27,6 +27,9 @@ if( ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" ) OR traccc_add_flag( CMAKE_CXX_FLAGS "-Wold-style-cast" ) if(PROJECT_IS_TOP_LEVEL) traccc_add_flag( CMAKE_CXX_FLAGS "-Wconversion" ) + traccc_add_flag( CMAKE_CXX_FLAGS "-Wint-conversion" ) + traccc_add_flag( CMAKE_CXX_FLAGS "-Wfloat-conversion" ) + traccc_add_flag( CMAKE_CXX_FLAGS "-Wsign-conversion" ) endif() # Fail on warnings, if asked for that behaviour. diff --git a/cmake/traccc-compiler-options-cuda.cmake b/cmake/traccc-compiler-options-cuda.cmake index 69ded835c2..0a9aa96c8c 100644 --- a/cmake/traccc-compiler-options-cuda.cmake +++ b/cmake/traccc-compiler-options-cuda.cmake @@ -23,6 +23,10 @@ if( "${CMAKE_CUDA_COMPILER_ID}" MATCHES "NVIDIA" ) traccc_add_flag( CMAKE_CUDA_FLAGS "-Wall" ) traccc_add_flag( CMAKE_CUDA_FLAGS "-Wextra" ) traccc_add_flag( CMAKE_CUDA_FLAGS "-Wconversion" ) + traccc_add_flag( CMAKE_CUDA_FLAGS "-Wfloat-conversion" ) + traccc_add_flag( CMAKE_CUDA_FLAGS "-Wsign-conversion" ) + traccc_add_flag( CMAKE_CUDA_FLAGS "-Wall" ) + traccc_add_flag( CMAKE_CUDA_FLAGS "-Wextra" ) endif() # Allow to use functions in device code that are constexpr, even if they are From 0945a505ed2111504ec6308e405cb755f2ebdbf6 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 14 Nov 2025 00:53:14 +0100 Subject: [PATCH 07/28] formatting --- examples/options/src/track_gbts_seeding.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/options/src/track_gbts_seeding.cpp b/examples/options/src/track_gbts_seeding.cpp index ab37cda960..76d742a0b7 100644 --- a/examples/options/src/track_gbts_seeding.cpp +++ b/examples/options/src/track_gbts_seeding.cpp @@ -7,6 +7,7 @@ // Local include(s). #include "traccc/options/track_gbts_seeding.hpp" + #include "traccc/examples/utils/printable.hpp" // System include(s). From e50c3a83a1f5bc8cd4a6daef1bd9dadada39e34b Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 14 Nov 2025 14:50:06 +0100 Subject: [PATCH 08/28] reverting extra compilation flags --- cmake/traccc-compiler-options-cpp.cmake | 3 --- cmake/traccc-compiler-options-cuda.cmake | 4 ---- 2 files changed, 7 deletions(-) diff --git a/cmake/traccc-compiler-options-cpp.cmake b/cmake/traccc-compiler-options-cpp.cmake index be6a002484..3638026206 100644 --- a/cmake/traccc-compiler-options-cpp.cmake +++ b/cmake/traccc-compiler-options-cpp.cmake @@ -27,9 +27,6 @@ if( ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" ) OR traccc_add_flag( CMAKE_CXX_FLAGS "-Wold-style-cast" ) if(PROJECT_IS_TOP_LEVEL) traccc_add_flag( CMAKE_CXX_FLAGS "-Wconversion" ) - traccc_add_flag( CMAKE_CXX_FLAGS "-Wint-conversion" ) - traccc_add_flag( CMAKE_CXX_FLAGS "-Wfloat-conversion" ) - traccc_add_flag( CMAKE_CXX_FLAGS "-Wsign-conversion" ) endif() # Fail on warnings, if asked for that behaviour. diff --git a/cmake/traccc-compiler-options-cuda.cmake b/cmake/traccc-compiler-options-cuda.cmake index 0a9aa96c8c..69ded835c2 100644 --- a/cmake/traccc-compiler-options-cuda.cmake +++ b/cmake/traccc-compiler-options-cuda.cmake @@ -23,10 +23,6 @@ if( "${CMAKE_CUDA_COMPILER_ID}" MATCHES "NVIDIA" ) traccc_add_flag( CMAKE_CUDA_FLAGS "-Wall" ) traccc_add_flag( CMAKE_CUDA_FLAGS "-Wextra" ) traccc_add_flag( CMAKE_CUDA_FLAGS "-Wconversion" ) - traccc_add_flag( CMAKE_CUDA_FLAGS "-Wfloat-conversion" ) - traccc_add_flag( CMAKE_CUDA_FLAGS "-Wsign-conversion" ) - traccc_add_flag( CMAKE_CUDA_FLAGS "-Wall" ) - traccc_add_flag( CMAKE_CUDA_FLAGS "-Wextra" ) endif() # Allow to use functions in device code that are constexpr, even if they are From 35dda815c86efc2b7b0ffb828850acec0f5a60c0 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 14 Nov 2025 15:52:00 +0100 Subject: [PATCH 09/28] removing submodule --- traccc | 1 - 1 file changed, 1 deletion(-) delete mode 160000 traccc diff --git a/traccc b/traccc deleted file mode 160000 index d668f0fdd6..0000000000 --- a/traccc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d668f0fdd694f88d8d66506e506da0bfe4409023 From 3cab4d6f0256dcc2357b6851e32d64e5c2ed25ea Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 14 Nov 2025 15:58:36 +0100 Subject: [PATCH 10/28] more itk_throughput tyding --- extras/traccc_itk_throughput_mt_profiler.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/traccc_itk_throughput_mt_profiler.sh b/extras/traccc_itk_throughput_mt_profiler.sh index 8710f9c994..58a9be2a7b 100755 --- a/extras/traccc_itk_throughput_mt_profiler.sh +++ b/extras/traccc_itk_throughput_mt_profiler.sh @@ -160,7 +160,7 @@ elif [[ "${TRACCC_THROUGPUT_TYPE}" != "traccc" ]]; then fi # The input directories to use. -TRACCC_INPUT_DIRS=("ttbar_mu200/hits") #("ttbar_mu140/hits" "ttbar_mu200/hits") +TRACCC_INPUT_DIRS=("ttbar_mu140/hits" "ttbar_mu200/hits") # Put a header on the CSV file. echo "directory,threads,loaded_events,cold_run_events,processed_events,warm_up_time,processing_time" \ From 57a6fb2d2493f7f426c52a57cffa38ae9cfbd2c4 Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 17 Nov 2025 17:37:04 +0100 Subject: [PATCH 11/28] sign conversion and array type fixes --- examples/options/src/track_gbts_seeding.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/options/src/track_gbts_seeding.cpp b/examples/options/src/track_gbts_seeding.cpp index 76d742a0b7..6ce0757540 100644 --- a/examples/options/src/track_gbts_seeding.cpp +++ b/examples/options/src/track_gbts_seeding.cpp @@ -36,12 +36,12 @@ void track_gbts_seeding::read(const boost::program_options::variables_map &) { std::ifstream barcodeBinningFile( std::filesystem::path(config_dir + "/barcodeBinning.txt")); - int nBarcodes = 0; + unsigned int nBarcodes = 0; barcodeBinningFile >> nBarcodes; barcodeBinning.reserve(nBarcodes); std::pair barcodeLayerPair; - for (; nBarcodes > 0; --nBarcodes) { + for (; nBarcodes > 0u; --nBarcodes) { barcodeBinningFile >> barcodeLayerPair.first; barcodeBinningFile >> barcodeLayerPair.second; @@ -51,7 +51,7 @@ void track_gbts_seeding::read(const boost::program_options::variables_map &) { std::ifstream binTablesFile( std::filesystem::path(config_dir + "/binTables.txt")); - int nBinPairs = 0; + unsigned int nBinPairs = 0; binTablesFile >> nBinPairs; binTables.reserve(nBinPairs); int bin1 = 0; @@ -59,19 +59,19 @@ void track_gbts_seeding::read(const boost::program_options::variables_map &) { for (; nBinPairs > 0; --nBinPairs) { binTablesFile >> bin1; binTablesFile >> bin2[0]; - binTables.push_back(std::make_pair(bin1, bin2)); + binTables.emplace_back(std::make_pair(bin1, bin2)); } std::ifstream layerInfoFile( std::filesystem::path(config_dir + "/layerInfo.txt")); - int nLayers = 0; + unsigned int nLayers = 0; layerInfoFile >> nLayers; layerInfo.reserve(nLayers); char type = 0; - int info[2] = {0, 0}; - float geo[2] = {0, 0}; - for (; nLayers > 0; --nLayers) { + std::array info = {0, 0}; + std::array geo = {0, 0}; + for (; nLayers > 0u; --nLayers) { layerInfoFile >> type; layerInfoFile >> info[0] >> info[1]; layerInfoFile >> geo[0] >> geo[1]; From 93107769b8de928b854612f8cf754d3bf263a933 Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 17 Nov 2025 18:15:07 +0100 Subject: [PATCH 12/28] rebase fixes --- examples/run/cpu/full_chain_algorithm.hpp | 18 +----------------- examples/run/cuda/full_chain_algorithm.hpp | 2 +- examples/run/sycl/full_chain_algorithm.cpp | 10 ++-------- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/examples/run/cpu/full_chain_algorithm.hpp b/examples/run/cpu/full_chain_algorithm.hpp index 146ea11852..ec540e479f 100644 --- a/examples/run/cpu/full_chain_algorithm.hpp +++ b/examples/run/cpu/full_chain_algorithm.hpp @@ -71,7 +71,6 @@ class full_chain_algorithm /// @param dummy This is not used anywhere. Allows templating CPU/Device /// algorithm. /// -<<<<<<< HEAD full_chain_algorithm( vecmem::memory_resource& mr, const clustering_algorithm::config_type& dummy, @@ -85,22 +84,7 @@ class full_chain_algorithm const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, const host_detector* detector, - std::unique_ptr logger); -======= - full_chain_algorithm(vecmem::memory_resource& mr, - const clustering_algorithm::config_type& dummy, - const seedfinder_config& finder_config, - const spacepoint_grid_config& grid_config, - const seedfilter_config& filter_config, - const gbts_seedfinder_config& gbts_config, - const finding_algorithm::config_type& finding_config, - const fitting_algorithm::config_type& fitting_config, - const silicon_detector_description::host& det_descr, - const magnetic_field& field, - const host_detector* detector, - std::unique_ptr logger, - const bool useGBTS); ->>>>>>> 0ac700c4 (formatting and placeholders for sycl alpaka) + std::unique_ptr logger, const bool useGBTS); /// Reconstruct track parameters in the entire detector /// diff --git a/examples/run/cuda/full_chain_algorithm.hpp b/examples/run/cuda/full_chain_algorithm.hpp index 61b31ff680..0e6e06c5cd 100644 --- a/examples/run/cuda/full_chain_algorithm.hpp +++ b/examples/run/cuda/full_chain_algorithm.hpp @@ -86,7 +86,7 @@ class full_chain_algorithm const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, std::unique_ptr logger - bool usingGBTS = false); + bool useGBTS = false); /// Copy constructor /// diff --git a/examples/run/sycl/full_chain_algorithm.cpp b/examples/run/sycl/full_chain_algorithm.cpp index bf0b9ded63..b23fbf48a3 100644 --- a/examples/run/sycl/full_chain_algorithm.cpp +++ b/examples/run/sycl/full_chain_algorithm.cpp @@ -30,10 +30,7 @@ full_chain_algorithm::full_chain_algorithm( const spacepoint_grid_config& grid_config, const seedfilter_config& filter_config, const gbts_seedfinder_config& gbts_config, -<<<<<<< HEAD const track_params_estimation_config& track_params_estimation_config, -======= ->>>>>>> 0ac700c4 (formatting and placeholders for sycl alpaka) const finding_algorithm::config_type& finding_config, const fitting_algorithm::config_type& fitting_config, const detector_design_description::host& det_descr, @@ -114,14 +111,11 @@ full_chain_algorithm::full_chain_algorithm( m_finder_config(finder_config), m_grid_config(grid_config), m_filter_config(filter_config), -<<<<<<< HEAD m_gbts_config(gbts_config), m_track_params_estimation_config(track_params_estimation_config), -======= - m_gbts_config(gbts_config), ->>>>>>> 0ac700c4 (formatting and placeholders for sycl alpaka) m_finding_config(finding_config), - m_fitting_config(fitting_config) { + m_fitting_config(fitting_config), + usingGBTS = useGBTS { // Tell the user what device is being used. TRACCC_INFO("Using SYCL device: " << m_data->m_queue.device_name()); From 10e356a478e6f7f81024c04e08628a9ae4ab3fe1 Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 17 Nov 2025 22:03:56 +0100 Subject: [PATCH 13/28] reabse fixes and adding GBTS to full_chain seeding --- examples/run/alpaka/full_chain_algorithm.cpp | 14 +++++------ examples/run/alpaka/full_chain_algorithm.hpp | 25 +++++++------------- examples/run/cpu/full_chain_algorithm.cpp | 3 ++- examples/run/cuda/full_chain_algorithm.cpp | 13 +++++++--- 4 files changed, 27 insertions(+), 28 deletions(-) diff --git a/examples/run/alpaka/full_chain_algorithm.cpp b/examples/run/alpaka/full_chain_algorithm.cpp index 09e7829067..1ba5703bce 100644 --- a/examples/run/alpaka/full_chain_algorithm.cpp +++ b/examples/run/alpaka/full_chain_algorithm.cpp @@ -30,7 +30,8 @@ full_chain_algorithm::full_chain_algorithm( const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, - std::unique_ptr logger) + std::unique_ptr logger, + bool useGBTS = false) : messaging(logger->clone()), m_queue(), m_vecmem_objects(m_queue), @@ -92,14 +93,10 @@ full_chain_algorithm::full_chain_algorithm( m_grid_config(grid_config), m_filter_config(filter_config), m_gbts_config(gbts_config), -<<<<<<< HEAD m_track_params_estimation_config(track_params_estimation_config), m_finding_config(finding_config), - m_finding_config(finding_config), -======= - m_finding_config(finding_config), ->>>>>>> 0ac700c4 (formatting and placeholders for sycl alpaka) - m_fitting_config(fitting_config) { + m_fitting_config(fitting_config), + usingGBTS(useGBTS) { std::cout << traccc::alpaka::get_device_info() << std::endl; @@ -182,7 +179,8 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent) m_gbts_config(parent.m_gbts_config), m_track_params_estimation_config(parent.m_track_params_estimation_config), m_finding_config(parent.m_finding_config), - m_fitting_config(parent.m_fitting_config) { + m_fitting_config(parent.m_fitting_config), + usingGBTS(parent.usingGBTS) { // Copy the detector (description) to the device. m_vecmem_objects diff --git a/examples/run/alpaka/full_chain_algorithm.hpp b/examples/run/alpaka/full_chain_algorithm.hpp index b53ee6687f..2f89045651 100644 --- a/examples/run/alpaka/full_chain_algorithm.hpp +++ b/examples/run/alpaka/full_chain_algorithm.hpp @@ -75,7 +75,6 @@ class full_chain_algorithm /// @param mr The memory resource to use for the intermediate and result /// objects /// -<<<<<<< HEAD full_chain_algorithm( vecmem::memory_resource& host_mr, const clustering_config& clustering_config, @@ -89,20 +88,8 @@ class full_chain_algorithm const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, - std::unique_ptr logger); -======= - full_chain_algorithm(vecmem::memory_resource& host_mr, - const clustering_config& clustering_config, - const seedfinder_config& finder_config, - const spacepoint_grid_config& grid_config, - const seedfilter_config& filter_config, - const gbts_seedfinder_config& gbts_config, - const finding_algorithm::config_type& finding_config, - const fitting_algorithm::config_type& fitting_config, - const silicon_detector_description::host& det_descr, - const magnetic_field& field, host_detector* detector, - std::unique_ptr logger); ->>>>>>> 0ac700c4 (formatting and placeholders for sycl alpaka) + std::unique_ptr logger, + useGBTS = false); /// Copy constructor /// @@ -202,9 +189,15 @@ class full_chain_algorithm gbts_seedfinder_config m_gbts_config; /// Configuration for track parameter estimation track_params_estimation_config m_track_params_estimation_config; + + /// Configuration for the track finding + finding_algorithm::config_type m_finding_config; + /// Configuration for the track fitting + fitting_algorithm::config_type m_fitting_config; bool usingGBTS; - /// @} + + /// @} }; // class full_chain_algorithm diff --git a/examples/run/cpu/full_chain_algorithm.cpp b/examples/run/cpu/full_chain_algorithm.cpp index 0c888e59a9..7212d351d2 100644 --- a/examples/run/cpu/full_chain_algorithm.cpp +++ b/examples/run/cpu/full_chain_algorithm.cpp @@ -22,7 +22,8 @@ full_chain_algorithm::full_chain_algorithm( const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, const host_detector* detector, - std::unique_ptr logger, const bool useGBTS) + std::unique_ptr logger, + const bool useGBTS) : messaging(logger->clone()), m_mr(mr), m_copy{std::make_unique()}, diff --git a/examples/run/cuda/full_chain_algorithm.cpp b/examples/run/cuda/full_chain_algorithm.cpp index 90fb576802..c4a3353b98 100644 --- a/examples/run/cuda/full_chain_algorithm.cpp +++ b/examples/run/cuda/full_chain_algorithm.cpp @@ -289,9 +289,16 @@ bound_track_parameters_collection_types::host full_chain_algorithm::seeding( // Run the seed-finding (asynchronously). const spacepoint_formation_algorithm::output_type spacepoints = m_spacepoint_formation(m_device_detector, measurements); - const seed_parameter_estimation_algorithm::output_type track_params = - m_track_parameter_estimation(m_field, measurements, spacepoints, - m_seeding(spacepoints)); + + seeding_algorithm::output_type seeds; + if (usingGBTS) { + seeds = m_gbts_seeding(spacepoints, measurements); + } else { + seeds = m_seeding(spacepoints); + } + const seed_parameter_estimation_algorithm::output_type track_params = + m_track_parameter_estimation(m_field, measurements, spacepoints, + seeds); // Copy a limited amount of result data back to the host. const auto host_seeds = m_copy.to(track_params, m_cached_pinned_host_mr, From b77e627cc803950d4791583d7fbda8daf3744095 Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 17 Nov 2025 23:55:04 +0100 Subject: [PATCH 14/28] formatting --- examples/run/alpaka/full_chain_algorithm.cpp | 7 +++---- examples/run/alpaka/full_chain_algorithm.hpp | 21 ++++++++++---------- examples/run/common/throughput_st.ipp | 4 ++-- examples/run/cpu/full_chain_algorithm.cpp | 3 +-- examples/run/cpu/full_chain_algorithm.hpp | 11 +++++----- examples/run/cuda/full_chain_algorithm.cpp | 6 +++--- examples/run/cuda/full_chain_algorithm.hpp | 5 ++--- examples/run/sycl/full_chain_algorithm.cpp | 8 ++++---- examples/run/sycl/full_chain_algorithm.hpp | 11 +++++----- 9 files changed, 36 insertions(+), 40 deletions(-) diff --git a/examples/run/alpaka/full_chain_algorithm.cpp b/examples/run/alpaka/full_chain_algorithm.cpp index 1ba5703bce..ffb38d817a 100644 --- a/examples/run/alpaka/full_chain_algorithm.cpp +++ b/examples/run/alpaka/full_chain_algorithm.cpp @@ -30,8 +30,7 @@ full_chain_algorithm::full_chain_algorithm( const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, - std::unique_ptr logger, - bool useGBTS = false) + std::unique_ptr logger, bool useGBTS = false) : messaging(logger->clone()), m_queue(), m_vecmem_objects(m_queue), @@ -96,7 +95,7 @@ full_chain_algorithm::full_chain_algorithm( m_track_params_estimation_config(track_params_estimation_config), m_finding_config(finding_config), m_fitting_config(fitting_config), - usingGBTS(useGBTS) { + usingGBTS(useGBTS) { std::cout << traccc::alpaka::get_device_info() << std::endl; @@ -180,7 +179,7 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent) m_track_params_estimation_config(parent.m_track_params_estimation_config), m_finding_config(parent.m_finding_config), m_fitting_config(parent.m_fitting_config), - usingGBTS(parent.usingGBTS) { + usingGBTS(parent.usingGBTS) { // Copy the detector (description) to the device. m_vecmem_objects diff --git a/examples/run/alpaka/full_chain_algorithm.hpp b/examples/run/alpaka/full_chain_algorithm.hpp index 2f89045651..e71c4b9971 100644 --- a/examples/run/alpaka/full_chain_algorithm.hpp +++ b/examples/run/alpaka/full_chain_algorithm.hpp @@ -81,15 +81,14 @@ class full_chain_algorithm const seedfinder_config& finder_config, const spacepoint_grid_config& grid_config, const seedfilter_config& filter_config, - const gbts_seedfinder_config& gbts_config, + const gbts_seedfinder_config& gbts_config, const track_params_estimation_config& track_params_estimation_config, const finding_algorithm::config_type& finding_config, const fitting_algorithm::config_type& fitting_config, const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, - std::unique_ptr logger, - useGBTS = false); + std::unique_ptr logger, useGBTS = false); /// Copy constructor /// @@ -185,19 +184,19 @@ class full_chain_algorithm spacepoint_grid_config m_grid_config; /// Configuration for the seed filtering seedfilter_config m_filter_config; - /// placeholder GBTS config - gbts_seedfinder_config m_gbts_config; + /// placeholder GBTS config + gbts_seedfinder_config m_gbts_config; /// Configuration for track parameter estimation track_params_estimation_config m_track_params_estimation_config; - - /// Configuration for the track finding + + /// Configuration for the track finding finding_algorithm::config_type m_finding_config; /// Configuration for the track fitting fitting_algorithm::config_type m_fitting_config; - - bool usingGBTS; - - /// @} + + bool usingGBTS; + + /// @} }; // class full_chain_algorithm diff --git a/examples/run/common/throughput_st.ipp b/examples/run/common/throughput_st.ipp index bf53284678..02b43742c4 100644 --- a/examples/run/common/throughput_st.ipp +++ b/examples/run/common/throughput_st.ipp @@ -132,8 +132,8 @@ int throughput_st(std::string_view description, int argc, char* argv[]) { const traccc::seedfinder_config seedfinder_config(seeding_opts); const traccc::seedfilter_config seedfilter_config(seeding_opts); const traccc::spacepoint_grid_config spacepoint_grid_config(seeding_opts); - traccc::gbts_seedfinder_config gbts_config; - const traccc::track_params_estimation_config track_params_estimation_config; + traccc::gbts_seedfinder_config gbts_config; + const traccc::track_params_estimation_config track_params_estimation_config; typename FULL_CHAIN_ALG::finding_algorithm::config_type finding_cfg( finding_opts); diff --git a/examples/run/cpu/full_chain_algorithm.cpp b/examples/run/cpu/full_chain_algorithm.cpp index 7212d351d2..0c888e59a9 100644 --- a/examples/run/cpu/full_chain_algorithm.cpp +++ b/examples/run/cpu/full_chain_algorithm.cpp @@ -22,8 +22,7 @@ full_chain_algorithm::full_chain_algorithm( const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, const host_detector* detector, - std::unique_ptr logger, - const bool useGBTS) + std::unique_ptr logger, const bool useGBTS) : messaging(logger->clone()), m_mr(mr), m_copy{std::make_unique()}, diff --git a/examples/run/cpu/full_chain_algorithm.hpp b/examples/run/cpu/full_chain_algorithm.hpp index ec540e479f..b5d324be16 100644 --- a/examples/run/cpu/full_chain_algorithm.hpp +++ b/examples/run/cpu/full_chain_algorithm.hpp @@ -77,14 +77,15 @@ class full_chain_algorithm const seedfinder_config& finder_config, const spacepoint_grid_config& grid_config, const seedfilter_config& filter_config, - const gbts_seedfinder_config& gbts_config, + const gbts_seedfinder_config& gbts_config, const track_params_estimation_config& track_params_estimation_config, const finding_algorithm::config_type& finding_config, const fitting_algorithm::config_type& fitting_config, const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, const host_detector* detector, - std::unique_ptr logger, const bool useGBTS); + std::unique_ptr logger, + const bool useGBTS = false); /// Reconstruct track parameters in the entire detector /// @@ -147,12 +148,12 @@ class full_chain_algorithm spacepoint_grid_config m_grid_config; /// Configuration for the seed filtering seedfilter_config m_filter_config; - /// placeholder GBTS config - gbts_seedfinder_config m_gbts_config; + /// placeholder GBTS config + gbts_seedfinder_config m_gbts_config; /// Configuration for track parameter estimation track_params_estimation_config m_track_params_estimation_config; - /// Configuration for the track finding + /// Configuration for the track finding finding_algorithm::config_type m_finding_config; /// Configuration for the track fitting fitting_algorithm::config_type m_fitting_config; diff --git a/examples/run/cuda/full_chain_algorithm.cpp b/examples/run/cuda/full_chain_algorithm.cpp index c4a3353b98..efc544cc3f 100644 --- a/examples/run/cuda/full_chain_algorithm.cpp +++ b/examples/run/cuda/full_chain_algorithm.cpp @@ -37,8 +37,8 @@ full_chain_algorithm::full_chain_algorithm( const seedfinder_config& finder_config, const spacepoint_grid_config& grid_config, const seedfilter_config& filter_config, - const gbts_seedfinder_config& gbts_config, - const track_params_estimation_config& track_params_estimation_config, + const gbts_seedfinder_config& gbts_config, + const track_params_estimation_config& track_params_estimation_config, const finding_algorithm::config_type& finding_config, const fitting_algorithm::config_type& fitting_config, const detector_design_description::host& det_descr, @@ -192,7 +192,7 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent) m_finder_config(parent.m_finder_config), m_grid_config(parent.m_grid_config), m_filter_config(parent.m_filter_config), - m_gbts_config(parent.m_gbts_config), + m_gbts_config(parent.m_gbts_config), m_track_params_estimation_config(parent.m_track_params_estimation_config), m_finding_config(parent.m_finding_config), m_fitting_config(parent.m_fitting_config), diff --git a/examples/run/cuda/full_chain_algorithm.hpp b/examples/run/cuda/full_chain_algorithm.hpp index 0e6e06c5cd..0dfa8601d9 100644 --- a/examples/run/cuda/full_chain_algorithm.hpp +++ b/examples/run/cuda/full_chain_algorithm.hpp @@ -78,15 +78,14 @@ class full_chain_algorithm const seedfinder_config& finder_config, const spacepoint_grid_config& grid_config, const seedfilter_config& filter_config, - const gbts_seedfinder_config& gbts_config, + const gbts_seedfinder_config& gbts_config, const track_params_estimation_config& track_params_estimation_config, const finding_algorithm::config_type& finding_config, const fitting_algorithm::config_type& fitting_config, const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, - std::unique_ptr logger - bool useGBTS = false); + std::unique_ptr logger, bool useGBTS = false); /// Copy constructor /// diff --git a/examples/run/sycl/full_chain_algorithm.cpp b/examples/run/sycl/full_chain_algorithm.cpp index b23fbf48a3..bbcc8860a3 100644 --- a/examples/run/sycl/full_chain_algorithm.cpp +++ b/examples/run/sycl/full_chain_algorithm.cpp @@ -111,11 +111,11 @@ full_chain_algorithm::full_chain_algorithm( m_finder_config(finder_config), m_grid_config(grid_config), m_filter_config(filter_config), - m_gbts_config(gbts_config), + m_gbts_config(gbts_config), m_track_params_estimation_config(track_params_estimation_config), m_finding_config(finding_config), m_fitting_config(fitting_config), - usingGBTS = useGBTS { + usingGBTS = useGBTS { // Tell the user what device is being used. TRACCC_INFO("Using SYCL device: " << m_data->m_queue.device_name()); @@ -203,12 +203,12 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent) m_clustering_config(parent.m_clustering_config), m_finder_config(parent.m_finder_config), m_grid_config(parent.m_grid_config), - m_gbts_config(parent.m_gbts_config), + m_gbts_config(parent.m_gbts_config), m_filter_config(parent.m_filter_config), m_track_params_estimation_config(parent.m_track_params_estimation_config), m_finding_config(parent.m_finding_config), m_fitting_config(parent.m_fitting_config), - usingGBTS = parent.usingGBTS { + usingGBTS = parent.usingGBTS { // Copy the detector (description) to the device. m_copy(vecmem::get_data(m_det_descr.get()), m_device_det_descr)->wait(); diff --git a/examples/run/sycl/full_chain_algorithm.hpp b/examples/run/sycl/full_chain_algorithm.hpp index 5e25070460..26699e4fb1 100644 --- a/examples/run/sycl/full_chain_algorithm.hpp +++ b/examples/run/sycl/full_chain_algorithm.hpp @@ -86,8 +86,7 @@ class full_chain_algorithm const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, - std::unique_ptr logger, - bool useGBTS = false); + std::unique_ptr logger, bool useGBTS = false); /// Copy constructor /// @@ -185,12 +184,12 @@ class full_chain_algorithm spacepoint_grid_config m_grid_config; /// Configuration for the seed filtering seedfilter_config m_filter_config; - /// placeholder GBTS config - m_gbts_seedfinder_config m_gbts_config; + /// placeholder GBTS config + m_gbts_seedfinder_config m_gbts_config; /// Configuration for track parameter estimation track_params_estimation_config m_track_params_estimation_config; - - /// Configuration for the track finding + + /// Configuration for the track finding finding_algorithm::config_type m_finding_config; /// Configuration for the track fitting fitting_algorithm::config_type m_fitting_config; From a1df388560a9bca2eff050e1d0daa23cab7af590 Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 18 Nov 2025 12:51:13 +0100 Subject: [PATCH 15/28] reorder arguments --- examples/run/sycl/full_chain_algorithm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/run/sycl/full_chain_algorithm.cpp b/examples/run/sycl/full_chain_algorithm.cpp index bbcc8860a3..3b8a8265e4 100644 --- a/examples/run/sycl/full_chain_algorithm.cpp +++ b/examples/run/sycl/full_chain_algorithm.cpp @@ -203,8 +203,8 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent) m_clustering_config(parent.m_clustering_config), m_finder_config(parent.m_finder_config), m_grid_config(parent.m_grid_config), - m_gbts_config(parent.m_gbts_config), m_filter_config(parent.m_filter_config), + m_gbts_config(parent.m_gbts_config), m_track_params_estimation_config(parent.m_track_params_estimation_config), m_finding_config(parent.m_finding_config), m_fitting_config(parent.m_fitting_config), From b763ab189fee20976e2e4d8fa39cdc71420a58b5 Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 19 Nov 2025 16:25:57 +0100 Subject: [PATCH 16/28] fixes and adding asserts to alpaka and sycl --- examples/run/alpaka/full_chain_algorithm.cpp | 3 ++- examples/run/alpaka/full_chain_algorithm.hpp | 2 +- examples/run/sycl/full_chain_algorithm.cpp | 7 ++++--- examples/run/sycl/full_chain_algorithm.hpp | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/run/alpaka/full_chain_algorithm.cpp b/examples/run/alpaka/full_chain_algorithm.cpp index ffb38d817a..28e40b4b2d 100644 --- a/examples/run/alpaka/full_chain_algorithm.cpp +++ b/examples/run/alpaka/full_chain_algorithm.cpp @@ -30,7 +30,7 @@ full_chain_algorithm::full_chain_algorithm( const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, - std::unique_ptr logger, bool useGBTS = false) + std::unique_ptr logger, bool useGBTS) : messaging(logger->clone()), m_queue(), m_vecmem_objects(m_queue), @@ -97,6 +97,7 @@ full_chain_algorithm::full_chain_algorithm( m_fitting_config(fitting_config), usingGBTS(useGBTS) { + assert(!usingGBTS && "GBTS not implemented for alpaka"); std::cout << traccc::alpaka::get_device_info() << std::endl; // Copy the detector (description) to the device. diff --git a/examples/run/alpaka/full_chain_algorithm.hpp b/examples/run/alpaka/full_chain_algorithm.hpp index e71c4b9971..6c251c09bb 100644 --- a/examples/run/alpaka/full_chain_algorithm.hpp +++ b/examples/run/alpaka/full_chain_algorithm.hpp @@ -88,7 +88,7 @@ class full_chain_algorithm const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, - std::unique_ptr logger, useGBTS = false); + std::unique_ptr logger, bool useGBTS = false); /// Copy constructor /// diff --git a/examples/run/sycl/full_chain_algorithm.cpp b/examples/run/sycl/full_chain_algorithm.cpp index 3b8a8265e4..21bbcbd2e1 100644 --- a/examples/run/sycl/full_chain_algorithm.cpp +++ b/examples/run/sycl/full_chain_algorithm.cpp @@ -36,7 +36,7 @@ full_chain_algorithm::full_chain_algorithm( const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, - std::unique_ptr log) + std::unique_ptr log, bool useGBTS) : messaging(log->clone()), m_data(std::make_unique()), m_host_mr(host_mr), @@ -115,8 +115,9 @@ full_chain_algorithm::full_chain_algorithm( m_track_params_estimation_config(track_params_estimation_config), m_finding_config(finding_config), m_fitting_config(fitting_config), - usingGBTS = useGBTS { + usingGBTS(useGBTS) { + assert(!usingGBTS && "GBTS not implemented for sycl"); // Tell the user what device is being used. TRACCC_INFO("Using SYCL device: " << m_data->m_queue.device_name()); @@ -208,7 +209,7 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent) m_track_params_estimation_config(parent.m_track_params_estimation_config), m_finding_config(parent.m_finding_config), m_fitting_config(parent.m_fitting_config), - usingGBTS = parent.usingGBTS { + usingGBTS(parent.usingGBTS) { // Copy the detector (description) to the device. m_copy(vecmem::get_data(m_det_descr.get()), m_device_det_descr)->wait(); diff --git a/examples/run/sycl/full_chain_algorithm.hpp b/examples/run/sycl/full_chain_algorithm.hpp index 26699e4fb1..bac8ff7532 100644 --- a/examples/run/sycl/full_chain_algorithm.hpp +++ b/examples/run/sycl/full_chain_algorithm.hpp @@ -86,7 +86,7 @@ class full_chain_algorithm const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, - std::unique_ptr logger, bool useGBTS = false); + std::unique_ptr logger, bool useGBTS); /// Copy constructor /// From e9f25413891da31c253c87ffefe38f767f35b36b Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 20 Nov 2025 23:45:09 +0100 Subject: [PATCH 17/28] changing asserts to print statments --- examples/options/src/track_gbts_seeding.cpp | 2 +- examples/run/alpaka/full_chain_algorithm.cpp | 6 +++++- examples/run/cpu/full_chain_algorithm.cpp | 9 ++++++++- examples/run/sycl/full_chain_algorithm.cpp | 6 +++++- examples/run/sycl/full_chain_algorithm.hpp | 2 +- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/examples/options/src/track_gbts_seeding.cpp b/examples/options/src/track_gbts_seeding.cpp index 6ce0757540..7ba53eea23 100644 --- a/examples/options/src/track_gbts_seeding.cpp +++ b/examples/options/src/track_gbts_seeding.cpp @@ -59,7 +59,7 @@ void track_gbts_seeding::read(const boost::program_options::variables_map &) { for (; nBinPairs > 0; --nBinPairs) { binTablesFile >> bin1; binTablesFile >> bin2[0]; - binTables.emplace_back(std::make_pair(bin1, bin2)); + binTables.emplace_back(bin1, bin2); } std::ifstream layerInfoFile( diff --git a/examples/run/alpaka/full_chain_algorithm.cpp b/examples/run/alpaka/full_chain_algorithm.cpp index 28e40b4b2d..ceb650f7dc 100644 --- a/examples/run/alpaka/full_chain_algorithm.cpp +++ b/examples/run/alpaka/full_chain_algorithm.cpp @@ -97,7 +97,11 @@ full_chain_algorithm::full_chain_algorithm( m_fitting_config(fitting_config), usingGBTS(useGBTS) { - assert(!usingGBTS && "GBTS not implemented for alpaka"); + if (usingGBTS) { + std::cout << "ERROR: GBTS not implemented for alpaka, this will run " + "with default seeding" + << std::endl; + } std::cout << traccc::alpaka::get_device_info() << std::endl; // Copy the detector (description) to the device. diff --git a/examples/run/cpu/full_chain_algorithm.cpp b/examples/run/cpu/full_chain_algorithm.cpp index 0c888e59a9..0900c24fd9 100644 --- a/examples/run/cpu/full_chain_algorithm.cpp +++ b/examples/run/cpu/full_chain_algorithm.cpp @@ -47,7 +47,14 @@ full_chain_algorithm::full_chain_algorithm( m_track_params_estimation_config(track_params_estimation_config), m_finding_config(finding_config), m_fitting_config(fitting_config), - usingGBTS(useGBTS) {} + usingGBTS(useGBTS) { + + if (usingGBTS) { + std::cout << "ERROR: GBTS not implemented for cpu, this will run with " + "default seeding" + << std::endl; + } +} full_chain_algorithm::output_type full_chain_algorithm::operator()( const edm::silicon_cell_collection::host& cells) const { diff --git a/examples/run/sycl/full_chain_algorithm.cpp b/examples/run/sycl/full_chain_algorithm.cpp index 21bbcbd2e1..9d38261fe5 100644 --- a/examples/run/sycl/full_chain_algorithm.cpp +++ b/examples/run/sycl/full_chain_algorithm.cpp @@ -117,7 +117,11 @@ full_chain_algorithm::full_chain_algorithm( m_fitting_config(fitting_config), usingGBTS(useGBTS) { - assert(!usingGBTS && "GBTS not implemented for sycl"); + if (usingGBTS) { + std::cout << "ERROR: GBTS not implemented for sycl, this will run with " + "default seeding" + << std::endl; + } // Tell the user what device is being used. TRACCC_INFO("Using SYCL device: " << m_data->m_queue.device_name()); diff --git a/examples/run/sycl/full_chain_algorithm.hpp b/examples/run/sycl/full_chain_algorithm.hpp index bac8ff7532..26699e4fb1 100644 --- a/examples/run/sycl/full_chain_algorithm.hpp +++ b/examples/run/sycl/full_chain_algorithm.hpp @@ -86,7 +86,7 @@ class full_chain_algorithm const detector_design_description::host& det_descr, const detector_conditions_description::host& det_cond, const magnetic_field& field, host_detector* detector, - std::unique_ptr logger, bool useGBTS); + std::unique_ptr logger, bool useGBTS = false); /// Copy constructor /// From e0ce408fa6fb96c51e74df56d255128771926941 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 21 Nov 2025 01:03:59 +0100 Subject: [PATCH 18/28] add unused to gbts config --- examples/run/alpaka/full_chain_algorithm.hpp | 2 +- examples/run/cpu/full_chain_algorithm.hpp | 2 +- examples/run/sycl/full_chain_algorithm.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/run/alpaka/full_chain_algorithm.hpp b/examples/run/alpaka/full_chain_algorithm.hpp index 6c251c09bb..90de44c324 100644 --- a/examples/run/alpaka/full_chain_algorithm.hpp +++ b/examples/run/alpaka/full_chain_algorithm.hpp @@ -185,7 +185,7 @@ class full_chain_algorithm /// Configuration for the seed filtering seedfilter_config m_filter_config; /// placeholder GBTS config - gbts_seedfinder_config m_gbts_config; + [[maybe_unused]] gbts_seedfinder_config m_gbts_config; /// Configuration for track parameter estimation track_params_estimation_config m_track_params_estimation_config; diff --git a/examples/run/cpu/full_chain_algorithm.hpp b/examples/run/cpu/full_chain_algorithm.hpp index b5d324be16..d203376b19 100644 --- a/examples/run/cpu/full_chain_algorithm.hpp +++ b/examples/run/cpu/full_chain_algorithm.hpp @@ -149,7 +149,7 @@ class full_chain_algorithm /// Configuration for the seed filtering seedfilter_config m_filter_config; /// placeholder GBTS config - gbts_seedfinder_config m_gbts_config; + [[maybe_unused]] gbts_seedfinder_config m_gbts_config; /// Configuration for track parameter estimation track_params_estimation_config m_track_params_estimation_config; diff --git a/examples/run/sycl/full_chain_algorithm.hpp b/examples/run/sycl/full_chain_algorithm.hpp index 26699e4fb1..440f50de18 100644 --- a/examples/run/sycl/full_chain_algorithm.hpp +++ b/examples/run/sycl/full_chain_algorithm.hpp @@ -185,7 +185,7 @@ class full_chain_algorithm /// Configuration for the seed filtering seedfilter_config m_filter_config; /// placeholder GBTS config - m_gbts_seedfinder_config m_gbts_config; + [[maybe_unused]] m_gbts_seedfinder_config m_gbts_config; /// Configuration for track parameter estimation track_params_estimation_config m_track_params_estimation_config; From d44435fd4e5a3aa3f446924ce86e88c949dfddc0 Mon Sep 17 00:00:00 2001 From: Mark Brettell Date: Tue, 3 Mar 2026 11:07:02 +0000 Subject: [PATCH 19/28] update GBTS not implemented logging --- examples/run/alpaka/full_chain_algorithm.cpp | 6 +++--- examples/run/cpu/full_chain_algorithm.cpp | 6 +++--- examples/run/cuda/full_chain_algorithm.cpp | 20 ++++++++++---------- examples/run/sycl/full_chain_algorithm.cpp | 6 +++--- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/examples/run/alpaka/full_chain_algorithm.cpp b/examples/run/alpaka/full_chain_algorithm.cpp index ceb650f7dc..ed6ef14db4 100644 --- a/examples/run/alpaka/full_chain_algorithm.cpp +++ b/examples/run/alpaka/full_chain_algorithm.cpp @@ -98,9 +98,9 @@ full_chain_algorithm::full_chain_algorithm( usingGBTS(useGBTS) { if (usingGBTS) { - std::cout << "ERROR: GBTS not implemented for alpaka, this will run " - "with default seeding" - << std::endl; + TRACCC_LOCAL_LOGGER(std::move(log)); + TRACCC_ERROR("GBTS not implemented for alpaka, this will run with " + "triplet seeding"); } std::cout << traccc::alpaka::get_device_info() << std::endl; diff --git a/examples/run/cpu/full_chain_algorithm.cpp b/examples/run/cpu/full_chain_algorithm.cpp index 0900c24fd9..0117b195de 100644 --- a/examples/run/cpu/full_chain_algorithm.cpp +++ b/examples/run/cpu/full_chain_algorithm.cpp @@ -50,9 +50,9 @@ full_chain_algorithm::full_chain_algorithm( usingGBTS(useGBTS) { if (usingGBTS) { - std::cout << "ERROR: GBTS not implemented for cpu, this will run with " - "default seeding" - << std::endl; + TRACCC_LOCAL_LOGGER(std::move(logger)); + TRACCC_ERROR("GBTS not implemented for CPU, this will run with " + "triplet seeding"); } } diff --git a/examples/run/cuda/full_chain_algorithm.cpp b/examples/run/cuda/full_chain_algorithm.cpp index efc544cc3f..0277ff5de6 100644 --- a/examples/run/cuda/full_chain_algorithm.cpp +++ b/examples/run/cuda/full_chain_algorithm.cpp @@ -289,16 +289,16 @@ bound_track_parameters_collection_types::host full_chain_algorithm::seeding( // Run the seed-finding (asynchronously). const spacepoint_formation_algorithm::output_type spacepoints = m_spacepoint_formation(m_device_detector, measurements); - - seeding_algorithm::output_type seeds; - if (usingGBTS) { - seeds = m_gbts_seeding(spacepoints, measurements); - } else { - seeds = m_seeding(spacepoints); - } - const seed_parameter_estimation_algorithm::output_type track_params = - m_track_parameter_estimation(m_field, measurements, spacepoints, - seeds); + + triplet_seeding_algorithm::output_type seeds; + if (usingGBTS) { + seeds = m_gbts_seeding(spacepoints, measurements); + } else { + seeds = m_seeding(spacepoints); + } + const seed_parameter_estimation_algorithm::output_type track_params = + m_track_parameter_estimation(m_field, measurements, spacepoints, + seeds); // Copy a limited amount of result data back to the host. const auto host_seeds = m_copy.to(track_params, m_cached_pinned_host_mr, diff --git a/examples/run/sycl/full_chain_algorithm.cpp b/examples/run/sycl/full_chain_algorithm.cpp index 9d38261fe5..3e17ae360e 100644 --- a/examples/run/sycl/full_chain_algorithm.cpp +++ b/examples/run/sycl/full_chain_algorithm.cpp @@ -118,9 +118,9 @@ full_chain_algorithm::full_chain_algorithm( usingGBTS(useGBTS) { if (usingGBTS) { - std::cout << "ERROR: GBTS not implemented for sycl, this will run with " - "default seeding" - << std::endl; + //TRACCC_LOCAL_LOGGER(std::move(log)); + TRACCC_ERROR("GBTS not implemented for sycl, this will run with " + "triplet seeding"); } // Tell the user what device is being used. TRACCC_INFO("Using SYCL device: " << m_data->m_queue.device_name()); From 22f3cc1dc9f4e1b939f1c3c0f82c793eac8fd68d Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 3 Mar 2026 23:29:20 +0100 Subject: [PATCH 20/28] fix logger --- examples/run/alpaka/full_chain_algorithm.cpp | 4 ++-- examples/run/cpu/full_chain_algorithm.cpp | 4 ++-- examples/run/sycl/full_chain_algorithm.cpp | 4 ++-- extras/traccc_itk_throughput_mt_profiler.sh | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/run/alpaka/full_chain_algorithm.cpp b/examples/run/alpaka/full_chain_algorithm.cpp index ed6ef14db4..84dd0646cd 100644 --- a/examples/run/alpaka/full_chain_algorithm.cpp +++ b/examples/run/alpaka/full_chain_algorithm.cpp @@ -98,8 +98,8 @@ full_chain_algorithm::full_chain_algorithm( usingGBTS(useGBTS) { if (usingGBTS) { - TRACCC_LOCAL_LOGGER(std::move(log)); - TRACCC_ERROR("GBTS not implemented for alpaka, this will run with " + TRACCC_LOCAL_LOGGER(std::move(logger)); + TRACCC_ERROR("GBTS not implemented for alpaka, this will run with " "triplet seeding"); } std::cout << traccc::alpaka::get_device_info() << std::endl; diff --git a/examples/run/cpu/full_chain_algorithm.cpp b/examples/run/cpu/full_chain_algorithm.cpp index 0117b195de..12c82efd5f 100644 --- a/examples/run/cpu/full_chain_algorithm.cpp +++ b/examples/run/cpu/full_chain_algorithm.cpp @@ -50,8 +50,8 @@ full_chain_algorithm::full_chain_algorithm( usingGBTS(useGBTS) { if (usingGBTS) { - TRACCC_LOCAL_LOGGER(std::move(logger)); - TRACCC_ERROR("GBTS not implemented for CPU, this will run with " + TRACCC_LOCAL_LOGGER(std::move(logger)); + TRACCC_ERROR("GBTS not implemented for CPU, this will run with " "triplet seeding"); } } diff --git a/examples/run/sycl/full_chain_algorithm.cpp b/examples/run/sycl/full_chain_algorithm.cpp index 3e17ae360e..479ea08cee 100644 --- a/examples/run/sycl/full_chain_algorithm.cpp +++ b/examples/run/sycl/full_chain_algorithm.cpp @@ -118,8 +118,8 @@ full_chain_algorithm::full_chain_algorithm( usingGBTS(useGBTS) { if (usingGBTS) { - //TRACCC_LOCAL_LOGGER(std::move(log)); - TRACCC_ERROR("GBTS not implemented for sycl, this will run with " + TRACCC_LOCAL_LOGGER(std::move(log)); + TRACCC_ERROR("GBTS not implemented for sycl, this will run with " "triplet seeding"); } // Tell the user what device is being used. diff --git a/extras/traccc_itk_throughput_mt_profiler.sh b/extras/traccc_itk_throughput_mt_profiler.sh index 58a9be2a7b..eb382a0301 100755 --- a/extras/traccc_itk_throughput_mt_profiler.sh +++ b/extras/traccc_itk_throughput_mt_profiler.sh @@ -43,7 +43,7 @@ TRACCC_THREAD_STEP=${TRACCC_THREAD_STEP:-1} TRACCC_REPETITIONS=${TRACCC_REPETITIONS:-5} TRACCC_CSV_FILE=${TRACCC_CSV_FILE:-"output.csv"} TRACCC_THROUGPUT_TYPE=${TRACCC_THROUGPUT_TYPE:-"traccc"} -while getopts ":x:i:m:t:r:c:y:h" opt; do +while getopts ":x:i:m:t:s:r:c:y:h" opt; do case $opt in x) TRACCC_EXECUTABLE=$OPTARG From 16d32bb1e320e0d7f40adf6444d00112f1f502a4 Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 4 Mar 2026 01:38:16 +0100 Subject: [PATCH 21/28] formatting --- examples/run/alpaka/full_chain_algorithm.cpp | 5 +-- examples/run/cpu/full_chain_algorithm.cpp | 5 +-- examples/run/cuda/full_chain_algorithm.cpp | 32 ++++++++++++++------ examples/run/cuda/full_chain_algorithm.hpp | 6 ++-- examples/run/sycl/full_chain_algorithm.cpp | 5 +-- 5 files changed, 34 insertions(+), 19 deletions(-) diff --git a/examples/run/alpaka/full_chain_algorithm.cpp b/examples/run/alpaka/full_chain_algorithm.cpp index 84dd0646cd..a9b2def79a 100644 --- a/examples/run/alpaka/full_chain_algorithm.cpp +++ b/examples/run/alpaka/full_chain_algorithm.cpp @@ -99,8 +99,9 @@ full_chain_algorithm::full_chain_algorithm( if (usingGBTS) { TRACCC_LOCAL_LOGGER(std::move(logger)); - TRACCC_ERROR("GBTS not implemented for alpaka, this will run with " - "triplet seeding"); + TRACCC_ERROR( + "GBTS not implemented for alpaka, this will run with " + "triplet seeding"); } std::cout << traccc::alpaka::get_device_info() << std::endl; diff --git a/examples/run/cpu/full_chain_algorithm.cpp b/examples/run/cpu/full_chain_algorithm.cpp index 12c82efd5f..1b010f7a33 100644 --- a/examples/run/cpu/full_chain_algorithm.cpp +++ b/examples/run/cpu/full_chain_algorithm.cpp @@ -51,8 +51,9 @@ full_chain_algorithm::full_chain_algorithm( if (usingGBTS) { TRACCC_LOCAL_LOGGER(std::move(logger)); - TRACCC_ERROR("GBTS not implemented for CPU, this will run with " - "triplet seeding"); + TRACCC_ERROR( + "GBTS not implemented for CPU, this will run with " + "triplet seeding"); } } diff --git a/examples/run/cuda/full_chain_algorithm.cpp b/examples/run/cuda/full_chain_algorithm.cpp index 0277ff5de6..3dafcf3324 100644 --- a/examples/run/cuda/full_chain_algorithm.cpp +++ b/examples/run/cuda/full_chain_algorithm.cpp @@ -104,7 +104,7 @@ full_chain_algorithm::full_chain_algorithm( m_finder_config(finder_config), m_grid_config(grid_config), m_filter_config(filter_config), - m_gbts_config(gbts_config), + m_gbts_config(gbts_config), m_track_params_estimation_config(track_params_estimation_config), m_finding_config(finding_config), m_fitting_config(fitting_config), @@ -229,6 +229,7 @@ full_chain_algorithm::output_type full_chain_algorithm::operator()( const spacepoint_formation_algorithm::output_type spacepoints = m_spacepoint_formation(m_device_detector, measurements); +<<<<<<< HEAD seeding_algorithm::output_type seeds; if(usingGBTS) { @@ -240,6 +241,17 @@ full_chain_algorithm::output_type full_chain_algorithm::operator()( const seed_parameter_estimation_algorithm::output_type track_params = m_track_parameter_estimation(m_field, measurements, spacepoints, seeds); +======= + triplet_seeding_algorithm::output_type seeds; + if (usingGBTS) { + seeds = m_gbts_seeding(spacepoints, measurements); + } else { + seeds = m_seeding(spacepoints); + } + const seed_parameter_estimation_algorithm::output_type track_params = + m_track_parameter_estimation(m_field, measurements, spacepoints, + seeds); +>>>>>>> fa3ee41c (formatting) // Run the track finding (asynchronously). const finding_algorithm::output_type track_candidates = @@ -290,15 +302,15 @@ bound_track_parameters_collection_types::host full_chain_algorithm::seeding( const spacepoint_formation_algorithm::output_type spacepoints = m_spacepoint_formation(m_device_detector, measurements); - triplet_seeding_algorithm::output_type seeds; - if (usingGBTS) { - seeds = m_gbts_seeding(spacepoints, measurements); - } else { - seeds = m_seeding(spacepoints); - } - const seed_parameter_estimation_algorithm::output_type track_params = - m_track_parameter_estimation(m_field, measurements, spacepoints, - seeds); + seeding_algorithm::output_type seeds; + if (usingGBTS) { + seeds = m_gbts_seeding(spacepoints, measurements); + } else { + seeds = m_seeding(spacepoints); + } + const seed_parameter_estimation_algorithm::output_type track_params = + m_track_parameter_estimation(m_field, measurements, spacepoints, + seeds); // Copy a limited amount of result data back to the host. const auto host_seeds = m_copy.to(track_params, m_cached_pinned_host_mr, diff --git a/examples/run/cuda/full_chain_algorithm.hpp b/examples/run/cuda/full_chain_algorithm.hpp index 0dfa8601d9..663da07eb7 100644 --- a/examples/run/cuda/full_chain_algorithm.hpp +++ b/examples/run/cuda/full_chain_algorithm.hpp @@ -13,10 +13,10 @@ #include "traccc/cuda/clusterization/measurement_sorting_algorithm.hpp" #include "traccc/cuda/finding/combinatorial_kalman_filter_algorithm.hpp" #include "traccc/cuda/fitting/kalman_fitting_algorithm.hpp" +#include "traccc/cuda/gbts_seeding/gbts_seeding_algorithm.hpp" #include "traccc/cuda/seeding/seed_parameter_estimation_algorithm.hpp" #include "traccc/cuda/seeding/silicon_pixel_spacepoint_formation_algorithm.hpp" #include "traccc/cuda/seeding/triplet_seeding_algorithm.hpp" -#include "traccc/cuda/gbts_seeding/gbts_seeding_algorithm.hpp" #include "traccc/cuda/utils/stream.hpp" #include "traccc/edm/silicon_cell_collection.hpp" #include "traccc/edm/track_collection.hpp" @@ -160,8 +160,8 @@ class full_chain_algorithm spacepoint_formation_algorithm m_spacepoint_formation; /// Seeding algorithm triplet_seeding_algorithm m_seeding; - /// Seeding with GBTS algorithm - gbts_seeding_algorithm m_gbts_seeding; + /// Seeding with GBTS algorithm + gbts_seeding_algorithm m_gbts_seeding; /// Track parameter estimation algorithm seed_parameter_estimation_algorithm m_track_parameter_estimation; diff --git a/examples/run/sycl/full_chain_algorithm.cpp b/examples/run/sycl/full_chain_algorithm.cpp index 479ea08cee..9693f1d039 100644 --- a/examples/run/sycl/full_chain_algorithm.cpp +++ b/examples/run/sycl/full_chain_algorithm.cpp @@ -119,8 +119,9 @@ full_chain_algorithm::full_chain_algorithm( if (usingGBTS) { TRACCC_LOCAL_LOGGER(std::move(log)); - TRACCC_ERROR("GBTS not implemented for sycl, this will run with " - "triplet seeding"); + TRACCC_ERROR( + "GBTS not implemented for sycl, this will run with " + "triplet seeding"); } // Tell the user what device is being used. TRACCC_INFO("Using SYCL device: " << m_data->m_queue.device_name()); From 817a6a8575628297fe4446f01684f2a2a55cc0c2 Mon Sep 17 00:00:00 2001 From: Fabrice Le Goff Date: Wed, 1 Apr 2026 14:05:03 +0200 Subject: [PATCH 22/28] fixed: forgotten rebase conflict --- examples/run/cuda/full_chain_algorithm.cpp | 26 ++++++---------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/examples/run/cuda/full_chain_algorithm.cpp b/examples/run/cuda/full_chain_algorithm.cpp index 3dafcf3324..ad7429061d 100644 --- a/examples/run/cuda/full_chain_algorithm.cpp +++ b/examples/run/cuda/full_chain_algorithm.cpp @@ -229,29 +229,17 @@ full_chain_algorithm::output_type full_chain_algorithm::operator()( const spacepoint_formation_algorithm::output_type spacepoints = m_spacepoint_formation(m_device_detector, measurements); -<<<<<<< HEAD - seeding_algorithm::output_type seeds; - - if(usingGBTS) { - seeds = m_gbts_seeding(spacepoints, measurements); - } - else { - seeds = m_seeding(spacepoints); - } - const seed_parameter_estimation_algorithm::output_type track_params = - m_track_parameter_estimation(m_field, measurements, spacepoints, - seeds); -======= - triplet_seeding_algorithm::output_type seeds; - if (usingGBTS) { + seeding_algorithm::output_type seeds; + + if(usingGBTS) { seeds = m_gbts_seeding(spacepoints, measurements); - } else { + } + else { seeds = m_seeding(spacepoints); } const seed_parameter_estimation_algorithm::output_type track_params = - m_track_parameter_estimation(m_field, measurements, spacepoints, - seeds); ->>>>>>> fa3ee41c (formatting) + m_track_parameter_estimation(m_field, measurements, spacepoints, + seeds); // Run the track finding (asynchronously). const finding_algorithm::output_type track_candidates = From c803e17e3addcdbbc57c5e04e9bc1f114a9348f2 Mon Sep 17 00:00:00 2001 From: Fabrice Le Goff Date: Wed, 1 Apr 2026 15:33:21 +0200 Subject: [PATCH 23/28] revert to triplet_seeding_alg output type for the common seed type --- examples/run/cuda/full_chain_algorithm.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/run/cuda/full_chain_algorithm.cpp b/examples/run/cuda/full_chain_algorithm.cpp index ad7429061d..ed2fa44d07 100644 --- a/examples/run/cuda/full_chain_algorithm.cpp +++ b/examples/run/cuda/full_chain_algorithm.cpp @@ -229,8 +229,7 @@ full_chain_algorithm::output_type full_chain_algorithm::operator()( const spacepoint_formation_algorithm::output_type spacepoints = m_spacepoint_formation(m_device_detector, measurements); - seeding_algorithm::output_type seeds; - + triplet_seeding_algorithm::output_type seeds; if(usingGBTS) { seeds = m_gbts_seeding(spacepoints, measurements); } @@ -290,7 +289,7 @@ bound_track_parameters_collection_types::host full_chain_algorithm::seeding( const spacepoint_formation_algorithm::output_type spacepoints = m_spacepoint_formation(m_device_detector, measurements); - seeding_algorithm::output_type seeds; + triplet_seeding_algorithm::output_type seeds; if (usingGBTS) { seeds = m_gbts_seeding(spacepoints, measurements); } else { From 45404e18e29ad75d59fcff7c4dcdf3aa8f975b39 Mon Sep 17 00:00:00 2001 From: Mark Brettell Date: Fri, 3 Apr 2026 15:57:23 +0100 Subject: [PATCH 24/28] changing "not impl" prints --- examples/run/alpaka/full_chain_algorithm.cpp | 5 +---- examples/run/cpu/full_chain_algorithm.cpp | 5 +---- examples/run/sycl/full_chain_algorithm.cpp | 1 - 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/examples/run/alpaka/full_chain_algorithm.cpp b/examples/run/alpaka/full_chain_algorithm.cpp index a9b2def79a..b79593c3e0 100644 --- a/examples/run/alpaka/full_chain_algorithm.cpp +++ b/examples/run/alpaka/full_chain_algorithm.cpp @@ -98,10 +98,7 @@ full_chain_algorithm::full_chain_algorithm( usingGBTS(useGBTS) { if (usingGBTS) { - TRACCC_LOCAL_LOGGER(std::move(logger)); - TRACCC_ERROR( - "GBTS not implemented for alpaka, this will run with " - "triplet seeding"); + std::cout << "GBTS not implemented for alpaka, this will run with triplet seeding" << std::endl; } std::cout << traccc::alpaka::get_device_info() << std::endl; diff --git a/examples/run/cpu/full_chain_algorithm.cpp b/examples/run/cpu/full_chain_algorithm.cpp index 1b010f7a33..41833de215 100644 --- a/examples/run/cpu/full_chain_algorithm.cpp +++ b/examples/run/cpu/full_chain_algorithm.cpp @@ -50,10 +50,7 @@ full_chain_algorithm::full_chain_algorithm( usingGBTS(useGBTS) { if (usingGBTS) { - TRACCC_LOCAL_LOGGER(std::move(logger)); - TRACCC_ERROR( - "GBTS not implemented for CPU, this will run with " - "triplet seeding"); + std::cout << "GBTS not implemented for CPU, this will run with triplet seeding" << std::endl; } } diff --git a/examples/run/sycl/full_chain_algorithm.cpp b/examples/run/sycl/full_chain_algorithm.cpp index 9693f1d039..b2936cee33 100644 --- a/examples/run/sycl/full_chain_algorithm.cpp +++ b/examples/run/sycl/full_chain_algorithm.cpp @@ -118,7 +118,6 @@ full_chain_algorithm::full_chain_algorithm( usingGBTS(useGBTS) { if (usingGBTS) { - TRACCC_LOCAL_LOGGER(std::move(log)); TRACCC_ERROR( "GBTS not implemented for sycl, this will run with " "triplet seeding"); From a2f62ffc480a25cdc9a1dd0a0410b81e22f4595a Mon Sep 17 00:00:00 2001 From: Mark Brettell Date: Fri, 3 Apr 2026 16:13:00 +0100 Subject: [PATCH 25/28] char conversion fix --- examples/options/src/track_gbts_seeding.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/options/src/track_gbts_seeding.cpp b/examples/options/src/track_gbts_seeding.cpp index 7ba53eea23..2fb56c6b6f 100644 --- a/examples/options/src/track_gbts_seeding.cpp +++ b/examples/options/src/track_gbts_seeding.cpp @@ -68,14 +68,14 @@ void track_gbts_seeding::read(const boost::program_options::variables_map &) { unsigned int nLayers = 0; layerInfoFile >> nLayers; layerInfo.reserve(nLayers); - char type = 0; + int type = 0; std::array info = {0, 0}; std::array geo = {0, 0}; for (; nLayers > 0u; --nLayers) { layerInfoFile >> type; layerInfoFile >> info[0] >> info[1]; layerInfoFile >> geo[0] >> geo[1]; - layerInfo.addLayer(type, info[0], info[1], geo[0], geo[1]); + layerInfo.addLayer(static_cast(type), info[0], info[1], geo[0], geo[1]); } } From e00014250bc7e4b507e7efd93d62b20925db7467 Mon Sep 17 00:00:00 2001 From: Mark Brettell Date: Fri, 3 Apr 2026 16:14:54 +0100 Subject: [PATCH 26/28] formating --- examples/options/src/track_gbts_seeding.cpp | 3 ++- examples/run/alpaka/full_chain_algorithm.cpp | 4 +++- examples/run/cpu/full_chain_algorithm.cpp | 4 +++- examples/run/cuda/full_chain_algorithm.cpp | 24 ++++++++++---------- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/examples/options/src/track_gbts_seeding.cpp b/examples/options/src/track_gbts_seeding.cpp index 2fb56c6b6f..fd655df081 100644 --- a/examples/options/src/track_gbts_seeding.cpp +++ b/examples/options/src/track_gbts_seeding.cpp @@ -75,7 +75,8 @@ void track_gbts_seeding::read(const boost::program_options::variables_map &) { layerInfoFile >> type; layerInfoFile >> info[0] >> info[1]; layerInfoFile >> geo[0] >> geo[1]; - layerInfo.addLayer(static_cast(type), info[0], info[1], geo[0], geo[1]); + layerInfo.addLayer(static_cast(type), info[0], info[1], geo[0], + geo[1]); } } diff --git a/examples/run/alpaka/full_chain_algorithm.cpp b/examples/run/alpaka/full_chain_algorithm.cpp index b79593c3e0..7c4c967521 100644 --- a/examples/run/alpaka/full_chain_algorithm.cpp +++ b/examples/run/alpaka/full_chain_algorithm.cpp @@ -98,7 +98,9 @@ full_chain_algorithm::full_chain_algorithm( usingGBTS(useGBTS) { if (usingGBTS) { - std::cout << "GBTS not implemented for alpaka, this will run with triplet seeding" << std::endl; + std::cout << "GBTS not implemented for alpaka, this will run with " + "triplet seeding" + << std::endl; } std::cout << traccc::alpaka::get_device_info() << std::endl; diff --git a/examples/run/cpu/full_chain_algorithm.cpp b/examples/run/cpu/full_chain_algorithm.cpp index 41833de215..960683865b 100644 --- a/examples/run/cpu/full_chain_algorithm.cpp +++ b/examples/run/cpu/full_chain_algorithm.cpp @@ -50,7 +50,9 @@ full_chain_algorithm::full_chain_algorithm( usingGBTS(useGBTS) { if (usingGBTS) { - std::cout << "GBTS not implemented for CPU, this will run with triplet seeding" << std::endl; + std::cout << "GBTS not implemented for CPU, this will run with triplet " + "seeding" + << std::endl; } } diff --git a/examples/run/cuda/full_chain_algorithm.cpp b/examples/run/cuda/full_chain_algorithm.cpp index ed2fa44d07..a3e74233d9 100644 --- a/examples/run/cuda/full_chain_algorithm.cpp +++ b/examples/run/cuda/full_chain_algorithm.cpp @@ -108,7 +108,7 @@ full_chain_algorithm::full_chain_algorithm( m_track_params_estimation_config(track_params_estimation_config), m_finding_config(finding_config), m_fitting_config(fitting_config), - usingGBTS(useGBTS) { + usingGBTS(useGBTS) { // Tell the user what device is being used. int device = 0; @@ -172,12 +172,13 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent) m_spacepoint_formation({m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, m_stream, parent.logger().cloneWithSuffix("SpFormationAlg")), - m_seeding(parent.m_finder_config, parent.m_grid_config, parent.m_filter_config, - {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, - m_stream, parent.logger().cloneWithSuffix("SeedingAlg")), - m_gbts_seeding(parent.m_gbts_config, - {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, - m_stream, parent.logger().cloneWithSuffix("GbtsAlg")), + m_seeding(parent.m_finder_config, parent.m_grid_config, + parent.m_filter_config, + {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, + m_stream, parent.logger().cloneWithSuffix("SeedingAlg")), + m_gbts_seeding(parent.m_gbts_config, + {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, + m_stream, parent.logger().cloneWithSuffix("GbtsAlg")), m_track_parameter_estimation( parent.m_track_params_estimation_config, {m_cached_device_mr, &m_cached_pinned_host_mr}, m_copy, m_stream, @@ -230,15 +231,14 @@ full_chain_algorithm::output_type full_chain_algorithm::operator()( m_spacepoint_formation(m_device_detector, measurements); triplet_seeding_algorithm::output_type seeds; - if(usingGBTS) { + if (usingGBTS) { seeds = m_gbts_seeding(spacepoints, measurements); - } - else { + } else { seeds = m_seeding(spacepoints); } const seed_parameter_estimation_algorithm::output_type track_params = - m_track_parameter_estimation(m_field, measurements, spacepoints, - seeds); + m_track_parameter_estimation(m_field, measurements, spacepoints, + seeds); // Run the track finding (asynchronously). const finding_algorithm::output_type track_candidates = From 86fb8cdf0b4268829bbf97adf450a5c00accd3df Mon Sep 17 00:00:00 2001 From: Mark Brettell Date: Fri, 3 Apr 2026 16:41:00 +0100 Subject: [PATCH 27/28] fix type name for sycl --- examples/run/sycl/full_chain_algorithm.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/run/sycl/full_chain_algorithm.hpp b/examples/run/sycl/full_chain_algorithm.hpp index 440f50de18..10207d6ca2 100644 --- a/examples/run/sycl/full_chain_algorithm.hpp +++ b/examples/run/sycl/full_chain_algorithm.hpp @@ -185,7 +185,7 @@ class full_chain_algorithm /// Configuration for the seed filtering seedfilter_config m_filter_config; /// placeholder GBTS config - [[maybe_unused]] m_gbts_seedfinder_config m_gbts_config; + [[maybe_unused]] gbts_seedfinder_config m_gbts_config; /// Configuration for track parameter estimation track_params_estimation_config m_track_params_estimation_config; From aa672d719eda3b84de8995f46f2462a312e7ccf4 Mon Sep 17 00:00:00 2001 From: Mark Brettell Date: Fri, 3 Apr 2026 16:49:25 +0100 Subject: [PATCH 28/28] adding gbts_config to full_chain sycl header --- examples/run/sycl/full_chain_algorithm.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/run/sycl/full_chain_algorithm.hpp b/examples/run/sycl/full_chain_algorithm.hpp index 10207d6ca2..0f3ac369f9 100644 --- a/examples/run/sycl/full_chain_algorithm.hpp +++ b/examples/run/sycl/full_chain_algorithm.hpp @@ -80,6 +80,7 @@ class full_chain_algorithm const seedfinder_config& finder_config, const spacepoint_grid_config& grid_config, const seedfilter_config& filter_config, + const gbts_seedfinder_config& gbts_config, const track_params_estimation_config& track_params_estimation_config, const finding_algorithm::config_type& finding_config, const fitting_algorithm::config_type& fitting_config,