Skip to content

Commit b23656f

Browse files
authored
Merge 9d91731 into sapling-pr-archive-ehellbar
2 parents 80278f6 + 9d91731 commit b23656f

File tree

216 files changed

+7507
-3106
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+7507
-3106
lines changed

Common/ML/include/ML/OrtInterface.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class OrtModel
5151
void initOptions(std::unordered_map<std::string, std::string> optionsMap);
5252
void initEnvironment();
5353
void initSession();
54+
void initSessionFromBuffer(const char* buffer, size_t bufferSize);
5455
void memoryOnDevice(int32_t = 0);
5556
bool isInitialized() { return mInitialized; }
5657
void resetSession();

Common/ML/src/OrtInterface.cxx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,24 @@ void OrtModel::initEnvironment()
138138
(mPImplOrt->env)->DisableTelemetryEvents(); // Disable telemetry events
139139
}
140140

141+
void OrtModel::initSessionFromBuffer(const char* buffer, size_t bufferSize)
142+
{
143+
mPImplOrt->sessionOptions.AddConfigEntry("session.load_model_format", "ONNX");
144+
mPImplOrt->sessionOptions.AddConfigEntry("session.use_ort_model_bytes_directly", "1");
145+
146+
mPImplOrt->session = std::make_unique<Ort::Session>(*mPImplOrt->env,
147+
buffer,
148+
bufferSize,
149+
mPImplOrt->sessionOptions);
150+
mPImplOrt->ioBinding = std::make_unique<Ort::IoBinding>(*mPImplOrt->session);
151+
152+
setIO();
153+
154+
if (mLoggingLevel < 2) {
155+
LOG(info) << "(ORT) Model loaded successfully from buffer! (inputs: " << printShape(mInputShapes, mInputNames) << ", outputs: " << printShape(mOutputShapes, mInputNames) << ")";
156+
}
157+
}
158+
141159
void OrtModel::initSession()
142160
{
143161
if (mAllocateDeviceMemory) {

Common/SimConfig/src/SimConfig.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,11 @@ bool SimConfig::determineActiveModulesList(const std::string& version, std::vect
200200
return false;
201201
}
202202
modules = map[version];
203-
LOGP(info, "Running with official detector version '{}'", version);
203+
static std::string last_version{}; // prevent multiple printouts of same message
204+
if (last_version != version) {
205+
LOGP(info, "Running with official detector version '{}'", version);
206+
last_version = version;
207+
}
204208
}
205209
// check if specified modules are in list
206210
if (inputargs.size() != 1 || inputargs[0] != "all") {

DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/EncodedBlocks.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,9 @@ class EncodedBlocks
468468
/// total allocated size in bytes
469469
size_t size() const { return mRegistry.size; }
470470

471+
/// used part of total allocated size in bytes (output size)
472+
size_t outputsize() const { return mRegistry.offsFreeStart; }
473+
471474
/// size remaining for additional data
472475
size_t getFreeSize() const { return mRegistry.getFreeSize(); }
473476

@@ -899,7 +902,7 @@ void EncodedBlocks<H, N, W>::print(const std::string& prefix, int verbosity) con
899902
ndata += mBlocks[i].getNData();
900903
nlit += mBlocks[i].getNLiterals();
901904
}
902-
LOG(info) << prefix << N << " blocks, input size: " << inpSize << ", output size: " << size()
905+
LOG(info) << prefix << N << " blocks, input size: " << inpSize << ", output size: " << outputsize()
903906
<< " NDictWords: " << ndict << " NDataWords: " << ndata << " NLiteralWords: " << nlit;
904907
}
905908
}

DataFormats/Detectors/TPC/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ o2_add_library(
4040

4141
o2_target_root_dictionary(
4242
DataFormatsTPC
43-
EXTRA_PATCH src/VectorPadflagsCustomStreamer.cxx
4443
HEADERS include/DataFormatsTPC/ClusterGroupAttribute.h
4544
include/DataFormatsTPC/ClusterNative.h
4645
include/DataFormatsTPC/ClusterNativeHelper.h

DataFormats/Detectors/TPC/src/DataFormatsTPCLinkDef.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
#pragma link C++ class o2::tpc::ClusterHardwareContainerFixedSize < 8192> + ;
2323
#pragma link C++ class o2::tpc::ClusterNativeContainer + ;
2424
#pragma link C++ class o2::tpc::Digit + ;
25-
// pragma link C++ enum o2::tpc::PadFlags +; // enum itself
25+
#pragma link C++ enum o2::tpc::PadFlags + ; // enum itself
2626
#pragma link C++ class o2::tpc::ZeroSuppressedContainer8kb + ;
2727
#pragma link C++ class std::vector < o2::tpc::ClusterNative> + ;
2828
#pragma link C++ class std::vector < o2::tpc::ClusterNativeContainer> + ;
2929
#pragma link C++ class std::vector < o2::tpc::ClusterHardware> + ;
3030
#pragma link C++ class std::vector < o2::tpc::ClusterHardwareContainerFixedSize < 8192>> + ;
3131
#pragma link C++ class std::vector < o2::tpc::ClusterHardwareContainer8kb> + ;
3232
#pragma link C++ class std::vector < o2::tpc::Digit> + ;
33-
// pragma link C++ class std::vector < o2::tpc::PadFlags> + ;
33+
#pragma link C++ class std::vector < o2::tpc::PadFlags> + ;
3434
#pragma link C++ class std::vector < o2::tpc::ZeroSuppressedContainer8kb> + ;
3535
#pragma link C++ class o2::tpc::TrackTPC + ;
3636
#pragma link C++ class o2::tpc::LaserTrack + ;

DataFormats/Detectors/TPC/src/VectorPadflagsCustomStreamer.cxx

Lines changed: 0 additions & 56 deletions
This file was deleted.

DataFormats/Parameters/src/GRPTool.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ bool create_GRPs(Options const& opts)
312312
auto soreor = ccdbmgr.getRunDuration(opts.run);
313313
runStart = soreor.first;
314314
grp.setTimeStart(runStart);
315-
grp.setTimeEnd(runStart + 3600000);
315+
grp.setTimeEnd(soreor.second);
316316
grp.setNHBFPerTF(opts.orbitsPerTF);
317317
std::vector<std::string> modules{};
318318
if (!o2::conf::SimConfig::determineActiveModulesList(opts.detectorList, opts.readout, std::vector<std::string>(), modules)) {

DataFormats/Reconstruction/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# In applying this license CERN does not waive the privileges and immunities
99
# granted to it by virtue of its status as an Intergovernmental Organization
1010
# or submit itself to any jurisdiction.
11+
# add_compile_options(-O0 -g -fPIC)
1112

1213
o2_add_library(ReconstructionDataFormats
1314
SOURCES src/TrackParametrization.cxx

DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackParametrization.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ class TrackParametrization
229229
// parameters manipulation
230230
GPUd() bool correctForELoss(value_t xrho, bool anglecorr = false);
231231
GPUd() bool rotateParam(value_t alpha);
232+
GPUd() bool rotateParam(value_t& alpha, value_t& ca, value_t& sa);
232233
GPUd() bool propagateParamTo(value_t xk, value_t b);
233234
GPUd() bool propagateParamTo(value_t xk, const dim3_t& b);
234235
GPUd() void invertParam();

0 commit comments

Comments
 (0)