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 DeviceAlgorithmT< traccc::device::triplet_seeding_algorithm > getTripletSeedingAlgorithm (const EventContext &ctx, const traccc::seedfinder_config &seedfinder, const traccc::spacepoint_grid_config &grid, const traccc::seedfilter_config &seedfilter) const override
 Function constructing the traccc cuda seeding algorithm.
virtual DeviceAlgorithmT< traccc::device::gbts_seeding_algorithm > getGBTSAlgorithm (const EventContext &ctx, const traccc::gbts_seedfinder_config &gbts_config) const override
 Get the device specific GBTS seeding algorithm.

Private Attributes

The host and device memory resources tool to use for memory

allocations

ToolHandle< AthDevice::IMemoryResourcesTool > m_MRs
The device copy tool to use
ToolHandle< AthDevice::ICopyTool > m_copy
The cuda stream provider tool
ToolHandle< AthCUDA::IStreamTool > m_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 33 of file CUDASeedingAlgProviderTool.h.

Member Function Documentation

◆ getGBTSAlgorithm()

DeviceAlgorithmT< traccc::device::gbts_seeding_algorithm > ActsTrk::CUDASeedingAlgProviderTool::getGBTSAlgorithm ( const EventContext & ctx,
const traccc::gbts_seedfinder_config & gbts_config ) const
overridevirtual

Get the device specific GBTS seeding algorithm.

Definition at line 48 of file CUDASeedingAlgProviderTool.cxx.

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

DeviceAlgorithmT< traccc::device::triplet_seeding_algorithm > ActsTrk::CUDASeedingAlgProviderTool::getTripletSeedingAlgorithm ( const EventContext & ctx,
const traccc::seedfinder_config & seedfinder,
const traccc::spacepoint_grid_config & grid,
const traccc::seedfilter_config & seedfilter ) const
overridevirtual

Function constructing the traccc cuda seeding algorithm.

Returns
cuda triplet seeding algorithm and vecmem copy object

Definition at line 30 of file CUDASeedingAlgProviderTool.cxx.

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

◆ initialize()

StatusCode ActsTrk::CUDASeedingAlgProviderTool::initialize ( )
overridevirtual

Function initializing the algorithm.

Definition at line 17 of file CUDASeedingAlgProviderTool.cxx.

18{
19 ATH_MSG_DEBUG("Initializing.");
20
21 ATH_CHECK(m_MRs.retrieve());
22 ATH_CHECK(m_copy.retrieve());
23 ATH_CHECK(m_streamTool.retrieve());
24
25 ATH_MSG_DEBUG("Successfully initialized");
26 return StatusCode::SUCCESS;
27}
#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 61 of file CUDASeedingAlgProviderTool.h.

61 {this, "CopyProviderTool", "",
62 "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 56 of file CUDASeedingAlgProviderTool.h.

56 {
57 this, "MemoryResourcesTool", "",
58 "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 64 of file CUDASeedingAlgProviderTool.h.

64 {this, "StreamTool", "",
65 "CUDA stream provider tool"};

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