Skip to content

Commit 45ca699

Browse files
committed
GPU: Some cleanup
1 parent bbbf449 commit 45ca699

File tree

4 files changed

+15
-19
lines changed

4 files changed

+15
-19
lines changed

GPU/GPUTracking/Base/GPUMemoryResource.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,10 @@ class GPUMemoryResource
7878
ALLOCATION_INDIVIDUAL = 1,
7979
ALLOCATION_GLOBAL = 2 };
8080

81-
#ifndef GPUCA_GPUCODE
8281
GPUMemoryResource(GPUProcessor* proc, void* (GPUProcessor::*setPtr)(void*), MemoryType type, const char* name = "") : mProcessor(proc), mPtr(nullptr), mPtrDevice(nullptr), mSetPointers(setPtr), mName(name), mSize(0), mOverrideSize(0), mReuse(-1), mType(type)
8382
{
8483
}
8584
GPUMemoryResource(const GPUMemoryResource&) CON_DEFAULT;
86-
#endif
8785

8886
void* SetPointers(void* ptr)
8987
{

GPU/GPUTracking/Base/GPUReconstruction.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ size_t GPUReconstruction::AllocateRegisteredMemoryHelper(GPUMemoryResource* res,
531531
return retVal;
532532
}
533533
if (memorypool == nullptr) {
534-
GPUInfo("Memory pool uninitialized");
534+
GPUError("Cannot allocate memory from uninitialized pool");
535535
throw std::bad_alloc();
536536
}
537537
size_t retVal;

GPU/Workflow/include/GPUWorkflow/GPUWorkflowSpec.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ class GPURecoWorkflowSpec : public o2::framework::Task
8484
using CompletionPolicyData = std::vector<framework::InputSpec>;
8585

8686
struct Config {
87+
int itsTriggerType = 0;
88+
int lumiScaleMode = 0;
8789
bool decompressTPC = false;
8890
bool decompressTPCFromROOT = false;
8991
bool caClusterer = false;
@@ -104,9 +106,7 @@ class GPURecoWorkflowSpec : public o2::framework::Task
104106
bool requireCTPLumi = false;
105107
bool outputErrorQA = false;
106108
bool runITSTracking = false;
107-
int itsTriggerType = 0;
108109
bool itsOverrBeamEst = false;
109-
int lumiScaleMode = 0;
110110
};
111111

112112
GPURecoWorkflowSpec(CompletionPolicyData* policyData, Config const& specconfig, std::vector<int> const& tpcsectors, unsigned long tpcSectorMask, std::shared_ptr<o2::base::GRPGeomRequest>& ggr);
@@ -134,7 +134,7 @@ class GPURecoWorkflowSpec : public o2::framework::Task
134134
bool fetchCalibsCCDBTPC(o2::framework::ProcessingContext& pc, T& newCalibObjects);
135135
bool fetchCalibsCCDBITS(o2::framework::ProcessingContext& pc);
136136
/// storing the new calib objects by overwritting the old calibs
137-
void storeUpdatedCalibsTPCPtrs();
137+
void cleanOldCalibsTPCPtrs();
138138

139139
void doCalibUpdates(o2::framework::ProcessingContext& pc);
140140

GPU/Workflow/src/GPUWorkflowSpec.cxx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ void GPURecoWorkflowSpec::run(ProcessingContext& pc)
720720
o2::utils::DebugStreamer::instance()->flush();
721721

722722
// setting TPC calibration objects
723-
storeUpdatedCalibsTPCPtrs();
723+
cleanOldCalibsTPCPtrs();
724724

725725
mTracker->Clear(false);
726726

@@ -1312,17 +1312,17 @@ Outputs GPURecoWorkflowSpec::outputs()
13121312
}
13131313

13141314
if (mSpecConfig.runITSTracking) {
1315-
outputSpecs.emplace_back("ITS", "TRACKS", 0, Lifetime::Timeframe);
1316-
outputSpecs.emplace_back("ITS", "TRACKCLSID", 0, Lifetime::Timeframe);
1317-
outputSpecs.emplace_back("ITS", "ITSTrackROF", 0, Lifetime::Timeframe);
1318-
outputSpecs.emplace_back("ITS", "VERTICES", 0, Lifetime::Timeframe);
1319-
outputSpecs.emplace_back("ITS", "VERTICESROF", 0, Lifetime::Timeframe);
1320-
outputSpecs.emplace_back("ITS", "IRFRAMES", 0, Lifetime::Timeframe);
1315+
outputSpecs.emplace_back(gDataOriginITS, "TRACKS", 0, Lifetime::Timeframe);
1316+
outputSpecs.emplace_back(gDataOriginITS, "TRACKCLSID", 0, Lifetime::Timeframe);
1317+
outputSpecs.emplace_back(gDataOriginITS, "ITSTrackROF", 0, Lifetime::Timeframe);
1318+
outputSpecs.emplace_back(gDataOriginITS, "VERTICES", 0, Lifetime::Timeframe);
1319+
outputSpecs.emplace_back(gDataOriginITS, "VERTICESROF", 0, Lifetime::Timeframe);
1320+
outputSpecs.emplace_back(gDataOriginITS, "IRFRAMES", 0, Lifetime::Timeframe);
13211321

13221322
if (mSpecConfig.processMC) {
1323-
outputSpecs.emplace_back("ITS", "VERTICESMCTR", 0, Lifetime::Timeframe);
1324-
outputSpecs.emplace_back("ITS", "TRACKSMCTR", 0, Lifetime::Timeframe);
1325-
outputSpecs.emplace_back("ITS", "ITSTrackMC2ROF", 0, Lifetime::Timeframe);
1323+
outputSpecs.emplace_back(gDataOriginITS, "VERTICESMCTR", 0, Lifetime::Timeframe);
1324+
outputSpecs.emplace_back(gDataOriginITS, "TRACKSMCTR", 0, Lifetime::Timeframe);
1325+
outputSpecs.emplace_back(gDataOriginITS, "ITSTrackMC2ROF", 0, Lifetime::Timeframe);
13261326
}
13271327
}
13281328

@@ -1681,16 +1681,14 @@ bool GPURecoWorkflowSpec::fetchCalibsCCDBTPC(ProcessingContext& pc, T& newCalibO
16811681
return false;
16821682
}
16831683

1684-
void GPURecoWorkflowSpec::storeUpdatedCalibsTPCPtrs()
1684+
void GPURecoWorkflowSpec::cleanOldCalibsTPCPtrs()
16851685
{
16861686
if (mdEdxCalibContainerBufferNew) {
16871687
mdEdxCalibContainer = std::move(mdEdxCalibContainerBufferNew);
16881688
}
1689-
16901689
if (mTPCPadGainCalibBufferNew) {
16911690
mTPCPadGainCalib = std::move(mTPCPadGainCalibBufferNew);
16921691
}
1693-
16941692
if (mFastTransformNew) {
16951693
mFastTransform = std::move(mFastTransformNew);
16961694
}

0 commit comments

Comments
 (0)