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

Tool providing CUDA-based traccc seeding algorithm. More...

#include <CUDASeedingAlgProviderTool.h>

Inheritance diagram for ActsTrk::CUDASeedingAlgProviderTool:
Collaboration diagram for ActsTrk::CUDASeedingAlgProviderTool:

Public Member Functions

virtual StatusCode initialize () override
 Function initializing the algorithm.
virtual std::pair< std::shared_ptr< const vecmem::copy >, std::shared_ptr< const traccc::device::triplet_seeding_algorithm > > getTripletSeedingAlgorithm (const EventContext &ctx, const traccc::seedfinder_config &seedfinder, const traccc::seedfilter_config &seedfilter) const override
 Function constructing the traccc cuda seeding algorithm.
virtual std::pair< std::shared_ptr< const vecmem::copy >, std::shared_ptr< const traccc::device::gbts_seeding_algorithm > > getGBTSAlgorithm (const EventContext &ctx, const traccc::gbts_seedfinder_config &gbts_config) const override

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 seeding algorithm.

This tool constructs the traccc device seeding 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

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

Definition at line 35 of file CUDASeedingAlgProviderTool.h.

Member Function Documentation

◆ getGBTSAlgorithm()

std::pair< std::shared_ptr< const vecmem::copy >, std::shared_ptr< const traccc::device::gbts_seeding_algorithm > > ActsTrk::CUDASeedingAlgProviderTool::getGBTSAlgorithm ( const EventContext & ctx,
const traccc::gbts_seedfinder_config & gbts_config ) const
overridevirtual

Definition at line 45 of file CUDASeedingAlgProviderTool.cxx.

46{
47
48 ATH_MSG_VERBOSE("Constructing CUDA traccc pixel GBTS seeding algorithm");
49 traccc::memory_resource mr{m_MRs->mainMR(), m_MRs->hostMR()};
50 auto copy = m_copy->copy(ctx);
51
52 return std::make_pair(copy, std::make_shared<traccc::cuda::gbts_seeding_algorithm>(
53 gbts_config,
54 mr,
55 *copy,
56 traccc::cuda::stream_wrapper{m_streamTool->stream(ctx)},
57 makeActsAthenaLogger(this, "TracccGBTSSeedingCUDA")));
58
59}
#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

◆ getTripletSeedingAlgorithm()

std::pair< std::shared_ptr< const vecmem::copy >, std::shared_ptr< const traccc::device::triplet_seeding_algorithm > > ActsTrk::CUDASeedingAlgProviderTool::getTripletSeedingAlgorithm ( const EventContext & ctx,
const traccc::seedfinder_config & seedfinder,
const traccc::seedfilter_config & seedfilter ) const
overridevirtual

Function constructing the traccc cuda seeding algorithm.

Returns
cuda seeding algorithm and vecmem copy object

Definition at line 26 of file CUDASeedingAlgProviderTool.cxx.

27{
28
29 ATH_MSG_VERBOSE("Constructing CUDA traccc pixel triplet seeding algorithm");
30 traccc::memory_resource mr{m_MRs->mainMR(), m_MRs->hostMR()};
31 auto copy = m_copy->copy(ctx);
32
33 return std::make_pair(copy, std::make_shared<traccc::cuda::triplet_seeding_algorithm>(
34 seedfinder,
35 seedfinder,
36 seedfilter,
37 mr,
38 *copy,
39 traccc::cuda::stream_wrapper{m_streamTool->stream(ctx)},
40 makeActsAthenaLogger(this, "TracccSPFormationCUDA")));
41
42}

◆ initialize()

StatusCode ActsTrk::CUDASeedingAlgProviderTool::initialize ( )
overridevirtual

Function initializing the algorithm.

Definition at line 13 of file CUDASeedingAlgProviderTool.cxx.

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

Member Data Documentation

◆ m_copy

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

Definition at line 58 of file CUDASeedingAlgProviderTool.h.

58 {
59 this, "CopyProviderTool", "", "Vecmem copy provider tool"};

◆ m_MRs

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

Definition at line 53 of file CUDASeedingAlgProviderTool.h.

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

◆ m_streamTool

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

Definition at line 61 of file CUDASeedingAlgProviderTool.h.

61 {
62 this, "StreamTool", "", "CUDA stream provider tool"};

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