ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::CUDATrackFindingAlgProviderTool Class Reference

Tool providing CUDA-based traccc track findng algorithm. More...

#include <CUDATrackFindingAlgProviderTool.h>

Inheritance diagram for ActsTrk::CUDATrackFindingAlgProviderTool:
Collaboration diagram for ActsTrk::CUDATrackFindingAlgProviderTool:

Public Member Functions

virtual StatusCode initialize () override
 Function initializing the algorithm.
virtual DeviceAlgorithmT< traccc::device::combinatorial_kalman_filter_algorithm > getAlgorithm (const EventContext &ctx, const traccc::finding_config &trkfinding_config) const override
 Function constructing the traccc cuda track finding algorithm.

Private Attributes

The host and device memory resources tool to use for memory allocations
ToolHandle< AthDevice::IMemoryResourcesToolm_MRs
The device copy tool to use
ToolHandle< AthDevice::ICopyToolm_copy
The cuda stream provider tool
ToolHandle< AthCUDA::IStreamToolm_streamTool

Detailed Description

Tool providing CUDA-based traccc track findng algorithm.

This tool constructs the traccc device track reconstruction algorithm, configured to run on with CUDA backend. It relies on separate tools to provide the host/device memory resources and the vecmem copy object. It can accept a traccc device fitter as well, but currently MBF is emplyed ie we are fitting through finding

Author
Neža Ribarič neza..nosp@m.riba.nosp@m.ric@c.nosp@m.ern..nosp@m.ch

Definition at line 33 of file CUDATrackFindingAlgProviderTool.h.

Member Function Documentation

◆ getAlgorithm()

DeviceAlgorithmT< traccc::device::combinatorial_kalman_filter_algorithm > ActsTrk::CUDATrackFindingAlgProviderTool::getAlgorithm ( const EventContext & ctx,
const traccc::finding_config & trkfinding_config ) const
overridevirtual

Function constructing the traccc cuda track finding algorithm.

Returns
cuda track finding algorithm and vecmem copy object

Definition at line 25 of file CUDATrackFindingAlgProviderTool.cxx.

26{
27
28 ATH_MSG_VERBOSE("Constructing CUDA traccc track finding algorithm");
29
30 auto copy = m_copy->copy(ctx);
31
32 return {copy, std::make_shared<traccc::cuda::combinatorial_kalman_filter_algorithm>(
33 trkfinding_config,
34 traccc::memory_resource{m_MRs->mainMR(), m_MRs->hostMR()},
35 *copy,
36 traccc::cuda::stream_wrapper{m_streamTool->stream(ctx)},
37 makeActsAthenaLogger(this, "TracccTrackFindingCUDA"),
38 nullptr)};
39
40}
#define ATH_MSG_VERBOSE(x,...)
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
Definition Logger.cxx:64
ToolHandle< AthDevice::IMemoryResourcesTool > m_MRs
bool copy
Definition calibdata.py:26

◆ initialize()

StatusCode ActsTrk::CUDATrackFindingAlgProviderTool::initialize ( )
overridevirtual

Function initializing the algorithm.

Definition at line 12 of file CUDATrackFindingAlgProviderTool.cxx.

13{
14 ATH_MSG_DEBUG("Initializing.");
15
16 ATH_CHECK(m_MRs.retrieve());
17 ATH_CHECK(m_copy.retrieve());
18 ATH_CHECK(m_streamTool.retrieve());
19
20 ATH_MSG_DEBUG("Successfully initialized");
21 return StatusCode::SUCCESS;
22}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)

Member Data Documentation

◆ m_copy

ToolHandle<AthDevice::ICopyTool> ActsTrk::CUDATrackFindingAlgProviderTool::m_copy
private
Initial value:
{
this, "CopyProviderTool", "", "Vecmem copy provider tool"}

Definition at line 55 of file CUDATrackFindingAlgProviderTool.h.

55 {
56 this, "CopyProviderTool", "", "Vecmem copy provider tool"};

◆ m_MRs

ToolHandle<AthDevice::IMemoryResourcesTool> ActsTrk::CUDATrackFindingAlgProviderTool::m_MRs
private
Initial value:
{
this, "MemoryResourcesTool", "",
"The memory resources tool to use for allocating memory on the device"}

Definition at line 50 of file CUDATrackFindingAlgProviderTool.h.

50 {
51 this, "MemoryResourcesTool", "",
52 "The memory resources tool to use for allocating memory on the device"};

◆ m_streamTool

ToolHandle<AthCUDA::IStreamTool> ActsTrk::CUDATrackFindingAlgProviderTool::m_streamTool
private
Initial value:
{
this, "StreamTool", "", "CUDA stream provider tool"}

Definition at line 58 of file CUDATrackFindingAlgProviderTool.h.

58 {
59 this, "StreamTool", "", "CUDA stream provider tool"};

The documentation for this class was generated from the following files: