Skip to content

Commit 26f8099

Browse files
m-brettellMark BrettellMarkMark BrettellFabrice Le Goff
authored
GBTS in throughput examples (#1194)
* Add GBTS options for mt runner * setting up gbts algs in full_chain cpu/cuda compilation * GBTS working in the mt * adding placeholders for backends without GBTS impl * formatting and placeholders for sycl alpaka * testing with extra compiler flags * formatting * reverting extra compilation flags * removing submodule * more itk_throughput tyding * sign conversion and array type fixes * rebase fixes * reabse fixes and adding GBTS to full_chain seeding * formatting * reorder arguments * fixes and adding asserts to alpaka and sycl * changing asserts to print statments * add unused to gbts config * update GBTS not implemented logging * fix logger * formatting * fixed: forgotten rebase conflict * revert to triplet_seeding_alg output type for the common seed type * changing "not impl" prints * char conversion fix * formating * fix type name for sycl * adding gbts_config to full_chain sycl header * extra configs * finishing options print out * ruff formatting --------- Co-authored-by: Mark Brettell <mbrettel@lxplus902.cern.ch> Co-authored-by: Mark <markbrettel@cern.ch> Co-authored-by: Mark Brettell <egi71871@hepacc09.pp.rl.ac.uk> Co-authored-by: Fabrice Le Goff <fabrice.le.goff@cern.ch>
1 parent 7b0be07 commit 26f8099

17 files changed

Lines changed: 509 additions & 46 deletions

File tree

core/include/traccc/gbts_seeding/gbts_seeding_config.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ struct gbts_seedfinder_config {
149149
unsigned int n_eta_bins = 0; // calculated from input layerInfo
150150
unsigned int n_phi_bins = 128;
151151
// graph making maxiums
152-
unsigned char max_num_neighbours = 10;
152+
unsigned int max_num_neighbours = 10;
153153
// graph extraction cuts
154154
int minLevel = 3; // equivlent to a cut of #seed edges or #spacepoints-1
155155

device/cuda/include/traccc/cuda/gbts_seeding/gbts_seeding_algorithm.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class gbts_seeding_algorithm
4646
/// @param str The CUDA stream to perform the operations in
4747
///
4848
gbts_seeding_algorithm(
49-
const gbts_seedfinder_config& cfg, traccc::memory_resource& mr,
49+
const gbts_seedfinder_config& cfg, const traccc::memory_resource& mr,
5050
vecmem::copy& copy, stream& str,
5151
std::unique_ptr<const Logger> logger = getDummyLogger().clone());
5252

device/cuda/src/gbts_seeding/gbts_seeding_algorithm.cu

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ struct gbts_ctx {
111111
};
112112

113113
gbts_seeding_algorithm::gbts_seeding_algorithm(
114-
const gbts_seedfinder_config& cfg, traccc::memory_resource& mr,
114+
const gbts_seedfinder_config& cfg, const traccc::memory_resource& mr,
115115
vecmem::copy& copy, stream& str, std::unique_ptr<const Logger> logger)
116116
: messaging(logger->clone()),
117117
m_config(cfg),
@@ -280,7 +280,6 @@ gbts_seeding_algorithm::output_type gbts_seeding_algorithm::operator()(
280280
nNodesPerBlock, ctx.nNodes, m_config.n_phi_bins);
281281

282282
cudaStreamSynchronize(stream);
283-
284283
error = cudaGetLastError();
285284

286285
if (error != cudaSuccess) {
@@ -716,8 +715,6 @@ gbts_seeding_algorithm::output_type gbts_seeding_algorithm::operator()(
716715
data_size = ctx.nConnectedEdges * sizeof(int);
717716

718717
cudaMalloc(&ctx.d_active_edges, data_size);
719-
cudaMemsetAsync(ctx.d_active_edges, 0xFF, data_size,
720-
stream); // initialize to -1
721718

722719
data_size = 2 * ctx.nConnectedEdges * sizeof(unsigned char);
723720

examples/options/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ traccc_add_library( traccc_options options TYPE SHARED
2727
"include/traccc/options/track_propagation.hpp"
2828
"include/traccc/options/track_resolution.hpp"
2929
"include/traccc/options/track_seeding.hpp"
30+
"include/traccc/options/track_gbts_seeding.hpp"
3031
# source files
3132
"src/details/interface.cpp"
3233
"src/accelerator.cpp"
@@ -49,6 +50,7 @@ traccc_add_library( traccc_options options TYPE SHARED
4950
"src/track_propagation.cpp"
5051
"src/track_resolution.cpp"
5152
"src/track_seeding.cpp"
53+
"src/track_gbts_seeding.cpp"
5254
"src/truth_finding.cpp"
5355
)
5456
target_link_libraries( traccc_options
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/** TRACCC library, part of the ACTS project (R&D line)
2+
*
3+
* (c) 2022-2024 CERN for the benefit of the ACTS project
4+
*
5+
* Mozilla Public License Version 2.0
6+
*/
7+
8+
#pragma once
9+
10+
// Project include(s).
11+
#include "traccc/gbts_seeding/gbts_seeding_config.hpp"
12+
#include "traccc/options/details/config_provider.hpp"
13+
#include "traccc/options/details/interface.hpp"
14+
15+
// System include(s).
16+
#include <cstddef>
17+
18+
namespace traccc::opts {
19+
20+
/// Option(s) for multi-threaded code execution
21+
class track_gbts_seeding : public interface,
22+
public config_provider<gbts_seedfinder_config> {
23+
24+
public:
25+
/// @name Options
26+
/// @{
27+
bool useGBTS = false;
28+
std::string config_dir = "DEFAULT";
29+
30+
/// @}
31+
// algorithm config
32+
float min_pt = 900;
33+
gbts_seedfinder_config gbts_config;
34+
explicit operator gbts_seedfinder_config() const override;
35+
36+
/// Constructor
37+
track_gbts_seeding();
38+
39+
/// Read/process the command line options
40+
///
41+
/// @param vm The command line options to interpret/read
42+
///
43+
void read(const boost::program_options::variables_map& vm) override;
44+
45+
std::unique_ptr<configuration_printable> as_printable() const override;
46+
};
47+
48+
} // namespace traccc::opts

0 commit comments

Comments
 (0)