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

Tool providing CUDA-based traccc spacepoint formation algorithm. More...

#include <CUDASPFormationAlgProviderTool.h>

Inheritance diagram for ActsTrk::CUDASPFormationAlgProviderTool:
Collaboration diagram for ActsTrk::CUDASPFormationAlgProviderTool:

Public Member Functions

virtual StatusCode initialize () override
 Function initializing the algorithm.
virtual DeviceAlgorithmT< traccc::device::silicon_pixel_spacepoint_formation_algorithm > getAlgorithm (const EventContext &ctx) const override
 Function constructing the traccc cuda clusterization 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 spacepoint formation algorithm.

This tool constructs the traccc device spacepoint formation 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 spacepoint formation 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 CUDASPFormationAlgProviderTool.h.

Member Function Documentation

◆ getAlgorithm()

DeviceAlgorithmT< traccc::device::silicon_pixel_spacepoint_formation_algorithm > ActsTrk::CUDASPFormationAlgProviderTool::getAlgorithm ( const EventContext & ctx) const
overridevirtual

Function constructing the traccc cuda clusterization algorithm.

Returns
cuda spacepoint formation algorithm and vecmem copy object

Definition at line 29 of file CUDASPFormationAlgProviderTool.cxx.

30{
31
32 ATH_MSG_VERBOSE("Constructing CUDA traccc pixel spacepoint formation algorithm");
33
34 auto copy = m_copy->copy(ctx);
35
36 return {copy, std::make_shared<traccc::cuda::silicon_pixel_spacepoint_formation_algorithm>(
37 traccc::memory_resource{m_MRs->mainMR(), m_MRs->hostMR()},
38 *copy,
39 traccc::cuda::stream_wrapper{m_streamTool->stream(ctx)},
40 makeActsAthenaLogger(this, "TracccSPFormationCUDA"))};
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
bool copy
Definition calibdata.py:26

◆ initialize()

StatusCode ActsTrk::CUDASPFormationAlgProviderTool::initialize ( )
overridevirtual

Function initializing the algorithm.

Definition at line 16 of file CUDASPFormationAlgProviderTool.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::CUDASPFormationAlgProviderTool::m_copy
private
Initial value:
{this, "CopyProviderTool", "",
"Vecmem copy provider tool"}

Definition at line 54 of file CUDASPFormationAlgProviderTool.h.

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

◆ m_MRs

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

Definition at line 49 of file CUDASPFormationAlgProviderTool.h.

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

◆ m_streamTool

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

Definition at line 57 of file CUDASPFormationAlgProviderTool.h.

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

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