Skip to content
Snippets Groups Projects
Commit 6654966d authored by Felix Weiglhofer's avatar Felix Weiglhofer Committed by Volker Friese
Browse files

GpuRecoSts: Small fixes.

parent 9117f2bf
No related branches found
No related tags found
1 merge request!927GpuRecoSts: Small fixes.
Pipeline #18513 passed
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
#include <iomanip> #include <iomanip>
#include <xpu/host.h>
#if __has_include(<omp.h>) #if __has_include(<omp.h>)
#include <omp.h> #include <omp.h>
#endif #endif
...@@ -334,6 +336,14 @@ InitStatus CbmRecoSts::Init() ...@@ -334,6 +336,14 @@ InitStatus CbmRecoSts::Init()
LOG(info) << "=========================================================="; LOG(info) << "==========================================================";
LOG(info) << GetName() << ": Initialising "; LOG(info) << GetName() << ": Initialising ";
// Initialize xpu.
// TODO: This call can be relatively expensive.
// We need a way to ensure this happens only once at the beginning.
if (fUseGpuReco) {
setenv("XPU_PROFILE", "1", 1); // Always enable profiling in xpu
xpu::initialize();
}
// --- Check IO-Manager // --- Check IO-Manager
FairRootManager* ioman = FairRootManager::Instance(); FairRootManager* ioman = FairRootManager::Instance();
assert(ioman); assert(ioman);
......
...@@ -190,9 +190,6 @@ void CbmGpuRecoSts::Setup(size_t maxDigisPerModule, size_t nDigitsTotal) ...@@ -190,9 +190,6 @@ void CbmGpuRecoSts::Setup(size_t maxDigisPerModule, size_t nDigitsTotal)
void CbmGpuRecoSts::RunHitFinder() void CbmGpuRecoSts::RunHitFinder()
{ {
setenv("XPU_PROFILE", "1", 1);
xpu::initialize();
auto& hfc = fHitfinderCpu; auto& hfc = fHitfinderCpu;
// ROCm bug: Mi100 name is an emtpy string... // ROCm bug: Mi100 name is an emtpy string...
...@@ -368,6 +365,10 @@ void CbmGpuRecoSts::FetchDigis(size_t& maxDigisPerModule, size_t& nDigisTotal) ...@@ -368,6 +365,10 @@ void CbmGpuRecoSts::FetchDigis(size_t& maxDigisPerModule, size_t& nDigisTotal)
CbmDigiManager* digis = CbmDigiManager::Instance(); CbmDigiManager* digis = CbmDigiManager::Instance();
auto& hfc = fHitfinderCpu; auto& hfc = fHitfinderCpu;
// Remove digis from previous timeslice
fDigisByModuleB.clear();
fDigisByModuleF.clear();
// FIXME: GPU reco should use regular digi class too // FIXME: GPU reco should use regular digi class too
nDigis = digis->GetNofDigis(ECbmModuleId::kSts); nDigis = digis->GetNofDigis(ECbmModuleId::kSts);
nDigisTotal = 0; nDigisTotal = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment