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

Tool providing CUDA-based traccc track parameter estimation algorithm. More...

#include <CUDATrkParamAlgProviderTool.h>

Inheritance diagram for ActsTrk::CUDATrkParamAlgProviderTool:
Collaboration diagram for ActsTrk::CUDATrkParamAlgProviderTool:

Public Member Functions

virtual StatusCode initialize () override
 Function initializing the algorithm.
virtual DeviceAlgorithmT< traccc::device::seed_parameter_estimation_algorithm > getAlgorithm (const EventContext &ctx, const traccc::track_params_estimation_config &trkparam_config) const override
 Function constructing the traccc cuda track parameter estimation 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 parameter estimation algorithm.

This tool constructs the traccc device track parameter estimation 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.

Currently only pixel seeding is implemented in Traccc, so strip seeding and param est. should be appropriately configured.

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

Definition at line 34 of file CUDATrkParamAlgProviderTool.h.

Member Function Documentation

◆ getAlgorithm()

DeviceAlgorithmT< traccc::device::seed_parameter_estimation_algorithm > ActsTrk::CUDATrkParamAlgProviderTool::getAlgorithm ( const EventContext & ctx,
const traccc::track_params_estimation_config & trkparam_config ) const
overridevirtual

Function constructing the traccc cuda track parameter estimation algorithm.

Returns
cuda track parameter estimation algorithm and vecmem copy object

Definition at line 29 of file CUDATrkParamAlgProviderTool.cxx.

30{
31
32 ATH_MSG_VERBOSE("Constructing CUDA traccc track parameter estimation algorithm");
33 auto copy = m_copy->copy(ctx);
34
35 return {copy, std::make_shared<traccc::cuda::seed_parameter_estimation_algorithm>(
36 trkparam_config,
37 traccc::memory_resource{m_MRs->mainMR(), m_MRs->hostMR()},
38 *copy,
39 traccc::cuda::stream_wrapper{m_streamTool->stream(ctx)},
40 makeActsAthenaLogger(this, "TracccTrkParamEstimationCUDA"))};
41
42}
#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
ToolHandle< AthCUDA::IStreamTool > m_streamTool
ToolHandle< AthDevice::ICopyTool > m_copy
bool copy
Definition calibdata.py:26

◆ initialize()

StatusCode ActsTrk::CUDATrkParamAlgProviderTool::initialize ( )
overridevirtual

Function initializing the algorithm.

Definition at line 16 of file CUDATrkParamAlgProviderTool.cxx.

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

Member Data Documentation

◆ m_copy

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

Definition at line 56 of file CUDATrkParamAlgProviderTool.h.

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

◆ m_MRs

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

Definition at line 51 of file CUDATrkParamAlgProviderTool.h.

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

◆ m_streamTool

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

Definition at line 59 of file CUDATrkParamAlgProviderTool.h.

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

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