Skip to content

Commit

Permalink
Temporarily re-enable the gpu-wf-spec in itsreco-wf
Browse files Browse the repository at this point in the history
  • Loading branch information
mconcas committed Apr 21, 2024
1 parent 08e4039 commit 5c460c9
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ struct TrackerParamConfig : public o2::conf::ConfigurableParamHelper<TrackerPara
int nROFsPerIterations = 0;
bool perPrimaryVertexProcessing = false;
bool saveTimeBenchmarks = false;
bool overrideBeamEstimation = false; // used by gpuwf only
int trackingMode = -1; // -1: unset, 0=sync, 1=async, 2=cosmics used by gpuwf only

O2ParamDef(TrackerParamConfig, "ITSCATrackerParam");
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ class ITSTrackingInterface
void setClusterDictionary(const o2::itsmft::TopologyDictionary* d) { mDict = d; }
void setMeanVertex(const o2::dataformats::MeanVertexObject* v)
{
if (!v) {
if (v == nullptr) {
LOGP(error, "Mean Vertex Object is nullptr");
return;
} else {
LOGP(info, "Mean Vertex set with x: {} y: {}", v->getX(), v->getY());
}
mMeanVertex = v;
}
Expand All @@ -73,7 +75,7 @@ class ITSTrackingInterface
bool mRunVertexer = true;
bool mCosmicsProcessing = false;
int mUseTriggers = 0;
TrackingMode mMode = TrackingMode::Sync;
TrackingMode mMode = TrackingMode::Unset;
bool mOverrideBeamEstimation = false;
const o2::itsmft::TopologyDictionary* mDict = nullptr;
std::unique_ptr<Tracker> mTracker = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion Detectors/ITSMFT/ITS/tracking/src/Vertexer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void Vertexer::getGlobalConfiguration()
verPar.PhiBins = vc.PhiBins;

TimeFrameGPUParameters tfGPUpar;
tfGPUpar.nROFsPerChunk = grc.nROFsPerChunk;
// tfGPUpar.nROFsPerChunk = grc.nROFsPerChunk;

mTraits->updateVertexingParameters(verPar, tfGPUpar);
}
Expand Down
30 changes: 29 additions & 1 deletion Detectors/ITSMFT/ITS/workflow/src/RecoWorkflow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,35 @@ framework::WorkflowSpec getWorkflow(bool useMC,
}
if (!trmode.empty()) {
if (useCAtracker) {
specs.emplace_back(o2::its::getTrackerSpec(useMC, useGeom, useTrig, trmode, overrideBeamPosition, dtype));
if (useGPUWF) {
o2::gpu::GPURecoWorkflowSpec::Config cfg;
cfg.runITSTracking = true;
cfg.itsTriggerType = useTrig;
cfg.itsOverrBeamEst = overrideBeamPosition;

Inputs ggInputs;
auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(false, true, false, true, true,
useGeom ? o2::base::GRPGeomRequest::Aligned : o2::base::GRPGeomRequest::None,
ggInputs, true);
if (!useGeom) {
ggRequest->addInput({"itsTGeo", "ITS", "GEOMTGEO", 0, Lifetime::Condition, framework::ccdbParamSpec("ITS/Config/Geometry")}, ggInputs);
}

auto task = std::make_shared<o2::gpu::GPURecoWorkflowSpec>(&gPolicyData, cfg, std::vector<int>(), 0, ggRequest);
gTask = task;
Inputs taskInputs = task->inputs();
Options taskOptions = task->options();
std::move(ggInputs.begin(), ggInputs.end(), std::back_inserter(taskInputs));

specs.emplace_back(DataProcessorSpec{
"its-tracker",
taskInputs,
task->outputs(),
AlgorithmSpec{adoptTask<o2::gpu::GPURecoWorkflowSpec>(task)},
taskOptions});
} else {
specs.emplace_back(o2::its::getTrackerSpec(useMC, useGeom, useTrig, trmode, overrideBeamPosition, dtype));
}
} else {
specs.emplace_back(o2::its::getCookedTrackerSpec(useMC, useGeom, useTrig, trmode));
}
Expand Down

0 comments on commit 5c460c9

Please sign in to comment.