|
ATLAS Offline Software
|
Go to the documentation of this file.
30 return StatusCode::SUCCESS;
41 std::ostringstream
str;
44 <<
" GPU kernel(s) in parallel on device(s):\n"
48 return StatusCode::SUCCESS;
58 const double percentage =
61 static_cast< double >(
m_totalTasks.load() ) * 100.0 ) : 0.0 );
63 << percentage <<
"%)" );
69 return StatusCode::SUCCESS;
75 if( task.get() ==
nullptr ) {
77 return StatusCode::FAILURE;
92 if( task->finished( task->execute(
dummy ),
94 ATH_MSG_ERROR(
"Failed to execute task in the caller thread!" );
95 return StatusCode::FAILURE;
99 return StatusCode::SUCCESS;
109 m_impl->execute( std::move( task ) );
112 return StatusCode::SUCCESS;
std::atomic_uint m_gpuTasks
The number of tasks sent to the GPU during the job.
static const Info & instance()
Singleton accessor function.
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
@ Synchronous
The kernel was executed synchronously on the CPU.
virtual StatusCode initialize() override
Initialise the service.
#define ATH_MSG_VERBOSE(x)
std::unique_ptr< KernelRunnerSvcImpl > m_impl
Implementation helper object.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< int > m_nKernels
The number of streams to use.
ServiceHandle< IStreamPoolSvc > m_streamPoolSvc
Service managing CUDA the streams.
std::atomic_int m_kernelsInFlight
The current number of kernels being executed.
Helper class for handling CUDA streams.
std::atomic_uint m_totalTasks
The number of tasks executed during the job in total.
virtual StatusCode finalize() override
Finalise the service.
virtual StatusCode execute(std::unique_ptr< IKernelTask > task) override
Execute a user specified kernel task.