Skip to content

Commit 45ae7ee

Browse files
committed
Squashed commit of the following:
commit 8980da9 Author: Keb-L <[email protected]> Date: Wed Apr 22 17:04:29 2020 -0700 Update JetImageProducer.cc commit 86fa9e5 Author: Keb-L <[email protected]> Date: Wed Apr 22 17:03:56 2020 -0700 Update DeepCaloProducer.cc commit 4890e55 Author: Keb-L <[email protected]> Date: Wed Apr 22 17:00:45 2020 -0700 Update download.sh Added deepcalo example file commit 96f91af Author: Keb-L <[email protected]> Date: Wed Apr 22 16:55:40 2020 -0700 Added BW stuff back commit fa360e6 Author: Keb-L <[email protected]> Date: Wed Apr 22 16:51:30 2020 -0700 Delete image0_1000.bin commit 7ccd0ce Author: Keb-L <[email protected]> Date: Wed Apr 22 16:33:44 2020 -0700 Update TRTClient.cc commit 1b26bda Author: Keb-L <[email protected]> Date: Wed Apr 22 16:33:19 2020 -0700 Update TRTClient.cc commit 1fe541e Author: Keb-L <[email protected]> Date: Wed Apr 22 16:32:16 2020 -0700 Update SonicClientBase.h commit 1d51e85 Author: Kelvin Lin <[email protected]> Date: Mon Mar 30 01:22:32 2020 +0000 Bypass bad result commit 1af1bdb Author: Kelvin Lin <[email protected]> Date: Sat Mar 28 23:18:32 2020 +0000 Unable to reproduce error commit de1d451 Author: Kelvin Lin <[email protected]> Date: Sat Mar 28 22:08:26 2020 +0000 top-tagging debug checkpoint commit 9334831 Author: Kelvin Lin <[email protected]> Date: Sat Mar 28 20:36:13 2020 +0000 debugging commit 78cdb82 Author: Keb-L <[email protected]> Date: Sat Mar 28 11:00:03 2020 -0700 Reverted some changes commit 425a091 Author: Kelvin <[email protected]> Date: Sat Mar 28 12:49:25 2020 -0500 Removed output statements commit fc24266 Merge: b50fb4e 73c6b59 Author: Kelvin Lin <[email protected]> Date: Sat Mar 28 10:28:42 2020 -0700 Merge branch 'master' of https://github.com/Keb-L/SonicCMS commit b50fb4e Author: Kelvin Lin <[email protected]> Date: Sat Mar 28 10:28:26 2020 -0700 Updated Jet Tagger commit 73c6b59 Author: Keb-L <[email protected]> Date: Wed Mar 25 14:54:59 2020 -0700 Update DeepCaloTest_mc_cfg.py commit 84a617c Merge: d8fbdb5 3ff89cf Author: Kelvin Lin <[email protected]> Date: Wed Mar 25 14:54:04 2020 -0700 Pull from upstream commit d8fbdb5 Merge: 58a2aab a35d9fb Author: Kelvin Lin <[email protected]> Date: Wed Mar 25 10:05:00 2020 -0700 Merge branch 'master' of https://github.com/Keb-L/SonicCMS commit 58a2aab Author: Kelvin Lin <[email protected]> Date: Wed Mar 25 10:04:51 2020 -0700 comment out server-side timing commit a35d9fb Author: Kelvin <[email protected]> Date: Mon Mar 23 19:21:00 2020 -0500 Modified path commit 4d6536f Author: Keb-L <[email protected]> Date: Mon Mar 23 17:17:53 2020 -0700 typo commit 5e3f3b6 Author: Keb-L <[email protected]> Date: Mon Mar 23 09:36:18 2020 -0700 removed more messages commit 22d9a7f Author: Kelvin <[email protected]> Date: Mon Mar 23 11:32:41 2020 -0500 Comment out log lines commit 5098523 Author: Keb-L <[email protected]> Date: Tue Mar 10 14:27:39 2020 -0700 TRTClient compiles commit a0b7a32 Author: Keb-L <[email protected]> Date: Tue Mar 10 11:13:57 2020 -0700 template error fix commit 76e0faa Author: Keb-L <[email protected]> Date: Tue Mar 10 11:03:26 2020 -0700 Added grpc timing commit b671e8d Author: Keb-L <[email protected]> Date: Tue Mar 10 09:49:29 2020 -0700 Added Server Context commit ba0d281 Author: Kelvin Lin <[email protected]> Date: Mon Mar 9 15:27:46 2020 -0700 TRT Client Batch Size Fix commit 3ff89cf Author: Kevin Pedro <[email protected]> Date: Fri Mar 6 14:57:08 2020 -0600 add test for true async commit 2ea093e Author: Kelvin Lin <[email protected]> Date: Wed Mar 4 17:19:50 2020 -0800 typo commit 605b52b Author: Kelvin Lin <[email protected]> Date: Wed Mar 4 17:11:38 2020 -0800 Cleaned output commit ea1f241 Author: Kevin Pedro <[email protected]> Date: Wed Mar 4 14:41:22 2020 -0600 fix option commit a363daa Author: Kevin Pedro <[email protected]> Date: Tue Mar 3 16:29:50 2020 -0600 add unit test for core commit efa90ff Author: Kevin Pedro <[email protected]> Date: Sat Feb 22 09:48:44 2020 -0600 source cmsset in setup commit 8b1399d Author: Kevin Pedro <[email protected]> Date: Fri Feb 21 10:49:54 2020 -0600 add filldescriptions for clients and producers commit f0f4ed4 Author: Keb-L <[email protected]> Date: Thu Feb 20 15:40:20 2020 -0800 added file parser commit e7df42c Author: Keb-L <[email protected]> Date: Thu Feb 20 15:31:57 2020 -0800 remove unneeded packages for this fork commit 2a7ba8f Author: Keb-L <[email protected]> Date: Thu Feb 20 15:27:09 2020 -0800 Added DeepCalo support commit f4fb293 Author: Kevin Pedro <[email protected]> Date: Tue Dec 17 11:26:17 2019 -0600 update default branch name commit f5f237b Author: Kevin Pedro <[email protected]> Date: Tue Dec 17 11:21:24 2019 -0600 correct readme
1 parent 3ff89cf commit 45ae7ee

File tree

10 files changed

+573
-49
lines changed

10 files changed

+573
-49
lines changed

Core/interface/SonicEDProducer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ class SonicEDProducer : public edm::stream::EDProducer<edm::ExternalWork, Capabi
2727
//derived classes use a dedicated acquire() interface that incorporates client_.input()
2828
//(no need to interact with callback holder)
2929
void acquire(edm::Event const& iEvent, edm::EventSetup const& iSetup, edm::WaitingTaskWithArenaHolder holder) override final {
30-
auto t0 = std::chrono::high_resolution_clock::now();
30+
//auto t0 = std::chrono::high_resolution_clock::now();
3131
acquire(iEvent, iSetup, client_.input());
32-
auto t1 = std::chrono::high_resolution_clock::now();
33-
if(!debugName_.empty()) edm::LogInfo(debugName_) << "Load time: " << std::chrono::duration_cast<std::chrono::microseconds>(t1 - t0).count();
32+
//auto t1 = std::chrono::high_resolution_clock::now();
33+
//if(!debugName_.empty()) edm::LogInfo(debugName_) << "Load time: " << std::chrono::duration_cast<std::chrono::microseconds>(t1 - t0).count();
3434
client_.predict(holder);
3535
}
3636
virtual void acquire(edm::Event const& iEvent, edm::EventSetup const& iSetup, Input& iInput) = 0;

TensorRT/interface/TRTClient.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@
1313
#include "request_grpc.h"
1414

1515
namespace nic = nvidia::inferenceserver::client;
16+
namespace ni = nvidia::inferenceserver;
17+
18+
using ModelInfo = std::pair<std::string, int64_t>;
19+
20+
struct ServerSideStats {
21+
uint64_t request_count;
22+
uint64_t cumm_time_ns;
23+
uint64_t queue_time_ns;
24+
uint64_t compute_time_ns;
25+
26+
std::map<ModelInfo, ServerSideStats> composing_models_stat;
27+
};
1628

1729
template <typename Client>
1830
class TRTClient : public Client {
@@ -47,6 +59,22 @@ class TRTClient : public Client {
4759
//helper for common ops
4860
void setup();
4961

62+
void ReportServerSideState(const ServerSideStats& stats);
63+
void SummarizeServerStats(
64+
const ModelInfo model_info,
65+
const std::map<std::string, ni::ModelStatus>& start_status,
66+
const std::map<std::string, ni::ModelStatus>& end_status,
67+
ServerSideStats* server_stats);
68+
void SummarizeServerModelStats(
69+
const std::string& model_name, const int64_t model_version,
70+
const ni::ModelStatus& start_status, const ni::ModelStatus& end_status,
71+
ServerSideStats* server_stats);
72+
73+
void GetServerSideStatus(std::map<std::string, ni::ModelStatus>* model_status);
74+
void GetServerSideStatus(
75+
ni::ServerStatus& server_status, const ModelInfo model_info,
76+
std::map<std::string, ni::ModelStatus>* model_status);
77+
5078
//members
5179
std::string url_;
5280
unsigned timeout_;
@@ -55,8 +83,12 @@ class TRTClient : public Client {
5583
unsigned ninput_;
5684
unsigned noutput_;
5785
std::unique_ptr<nic::InferContext> context_;
86+
std::unique_ptr<nic::ServerStatusContext> server_ctx_;
5887
std::shared_ptr<nic::InferContext::Input> nicinput_;
88+
89+
std::map<std::string, ni::ModelStatus> start_status, end_status;
5990
};
91+
6092
typedef TRTClient<SonicClientSync<std::vector<float>>> TRTClientSync;
6193
typedef TRTClient<SonicClientPseudoAsync<std::vector<float>>> TRTClientPseudoAsync;
6294
typedef TRTClient<SonicClientAsync<std::vector<float>>> TRTClientAsync;
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
#include <vector>
2+
#include <map>
3+
#include <sstream>
4+
#include <string>
5+
#include <iostream>
6+
#include <fstream>
7+
8+
#include <stdio.h>
9+
10+
#include "SonicCMS/Core/interface/SonicEDProducer.h"
11+
#include "SonicCMS/TensorRT/interface/TRTClient.h"
12+
#include "FWCore/Framework/interface/Event.h"
13+
#include "FWCore/ParameterSet/interface/ParameterSet.h"
14+
#include "FWCore/Framework/interface/EventSetup.h"
15+
#include "FWCore/Framework/interface/Frameworkfwd.h"
16+
#include "FWCore/Framework/interface/MakerMacros.h"
17+
#include "FWCore/MessageLogger/interface/MessageLogger.h"
18+
19+
template <typename Client>
20+
class DeepCaloProducer : public SonicEDProducer<Client>
21+
{
22+
public:
23+
//needed because base class has dependent scope
24+
using typename SonicEDProducer<Client>::Input;
25+
using typename SonicEDProducer<Client>::Output;
26+
explicit DeepCaloProducer(edm::ParameterSet const& cfg) :
27+
SonicEDProducer<Client>(cfg),
28+
topN_(cfg.getParameter<unsigned>("topN")),
29+
binDataPath_(cfg.getParameter<std::string>("binDataPath"))
30+
{
31+
//for debugging
32+
this->setDebugName("DeepCaloProducer");
33+
34+
// printf("Loading data...\n");
35+
36+
// Load the bin data
37+
std::streampos fileSize;
38+
std::ifstream file(binDataPath_, std::ios::binary);
39+
40+
if(file.is_open()){
41+
file.unsetf(std::ios::skipws);
42+
43+
// Get the size of the file
44+
file.seekg(0, std::ios::end);
45+
fileSize = file.tellg();
46+
file.seekg(0, std::ios::beg);
47+
48+
// std::cout << fileSize << " bytes in the file." << std::endl;
49+
imageData_.reserve(fileSize/sizeof(float));
50+
51+
for (size_t i = 0; i < imageData_.capacity(); i++)
52+
{
53+
float f;
54+
file.read(reinterpret_cast<char*>(&f), sizeof(float));
55+
imageData_.push_back(f);
56+
}
57+
58+
// file.read(reinterpret_cast<char*>(imageData_.data()), fileSize / sizeof(float));
59+
// // file.read(reinterpret_cast<char*>(test.data()), 32/4);
60+
// // std::vector<unsigned char> buffer(std::istreambuf_iterator<char>(file), {});
61+
62+
// // std::cout << "Segfault check" << std::endl;
63+
file.close();
64+
} else std::cout << "Could not read the file!" << std::endl;
65+
66+
// std::cout << imageData_.size() << " floats loaded!" << std::endl;
67+
68+
imageID_ = 0;
69+
imageN_ = imageData_.size() / (56*11*4);
70+
}
71+
void acquire(edm::Event const& iEvent, edm::EventSetup const& iSetup, Input& iInput) override {
72+
auto ninput = client_.ninput();
73+
auto batchSize = client_.batchSize();
74+
iInput = Input(ninput*batchSize, 0.f);
75+
//make some random channels
76+
// for(unsigned ib = 0; ib < batchSize; ib++) {
77+
// for(unsigned i0 = 0; i0 < ninput; i0++) {
78+
// for(unsigned i1 = 0; i1 < ninput; i1++) iInput[ib*ninput+i1] = float(rand() % 10000)*1e-8;
79+
// }
80+
// }
81+
82+
83+
if (imageID_ + batchSize >= imageN_)
84+
imageID_ = 0;
85+
86+
unsigned int start = imageID_*56*11*4;
87+
unsigned int end = start + batchSize*56*11*4;
88+
89+
iInput = std::vector<float>(imageData_.begin() + start, imageData_.begin() + end);
90+
91+
imageID_ += batchSize;
92+
}
93+
void produce(edm::Event& iEvent, edm::EventSetup const& iSetup, Output const& iOutput) override {
94+
findTopN(iOutput);
95+
}
96+
~DeepCaloProducer() override {}
97+
98+
private:
99+
using SonicEDProducer<Client>::client_;
100+
//Just putting something in for the hell of it
101+
void findTopN(const Output& scores) const {
102+
auto dim = client_.noutput();
103+
for(unsigned i0 = 0; i0 < client_.batchSize(); i0++) {
104+
//match score to type by index, then put in largest-first map
105+
std::map<float,std::string,std::greater<float>> score_map;
106+
for(unsigned i = 0; i < (unsigned)dim; ++i){
107+
std::stringstream pSS; pSS << "Dummy Channel " << i;
108+
score_map.emplace(scores[i0*dim+i],pSS.str());
109+
}
110+
//get top n
111+
std::stringstream msg;
112+
msg << "Scores:\n";
113+
unsigned counter = 0;
114+
for(const auto& item: score_map){
115+
msg << item.second << " : " << item.first << "\n";
116+
++counter;
117+
if(counter>=topN_) break;
118+
}
119+
edm::LogInfo("DeepCaloProducer") << msg.str();
120+
}
121+
}
122+
123+
unsigned topN_;
124+
unsigned int imageID_;
125+
unsigned int imageN_;
126+
std::string binDataPath_;
127+
std::vector<float> imageData_;
128+
};
129+
130+
typedef DeepCaloProducer<TRTClientSync> DeepCaloProducerSync;
131+
typedef DeepCaloProducer<TRTClientAsync> DeepCaloProducerAsync;
132+
typedef DeepCaloProducer<TRTClientPseudoAsync> DeepCaloProducerPseudoAsync;
133+
134+
DEFINE_FWK_MODULE(DeepCaloProducerSync);
135+
DEFINE_FWK_MODULE(DeepCaloProducerAsync);
136+
DEFINE_FWK_MODULE(DeepCaloProducerPseudoAsync);

TensorRT/plugins/JetImageProducer.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,15 @@ class JetImageProducer : public SonicEDProducer<Client>
4949
}
5050
void acquire(edm::Event const& iEvent, edm::EventSetup const& iSetup, Input& iInput) override {
5151
//input data from event
52+
5253
edm::Handle<edm::View<pat::Jet>> h_jets;
5354
iEvent.getByToken(JetTok_, h_jets);
5455
const auto& jets = *h_jets.product();
5556

5657
// create a jet image for the leading jet in the event
5758
// 224 x 224 image which is centered at the jet axis and +/- 1 unit in eta and phi
58-
std::vector<float> img(client_.ninput(),0.f);
59+
std::vector<float> img(client_.ninput()*client_.batchSize(),0.f);
60+
5961
const unsigned npix = 224;
6062
float pixel_width = 2./float(npix);
6163

@@ -91,7 +93,7 @@ class JetImageProducer : public SonicEDProducer<Client>
9193
if (jet_ctr > 0) break; // just do one jet for now
9294
//////////////////////////////
9395
}
94-
96+
9597
iInput = Input(client_.ninput()*client_.batchSize(),0.f);
9698
for(unsigned i0 = 0; i0 < client_.batchSize(); i0++ ) {
9799
for(unsigned i1 = 0; i1 < client_.ninput(); i1++) {
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
from FWCore.ParameterSet.VarParsing import VarParsing
2+
import FWCore.ParameterSet.Config as cms
3+
import os, sys, json
4+
5+
options = VarParsing("analysis")
6+
options.register("address", "ailab01.fnal.gov", VarParsing.multiplicity.singleton, VarParsing.varType.string)
7+
#options.register("address", "prp-gpu-1.t2.ucsd.edu", VarParsing.multiplicity.singleton, VarParsing.varType.string)
8+
#options.register("address", "18.4.112.82", VarParsing.multiplicity.singleton, VarParsing.varType.string)
9+
options.register("port", 8001, VarParsing.multiplicity.singleton, VarParsing.varType.int)
10+
options.register("timeout", 30, VarParsing.multiplicity.singleton, VarParsing.varType.int)
11+
options.register("params", "", VarParsing.multiplicity.singleton, VarParsing.varType.string)
12+
options.register("threads", 1, VarParsing.multiplicity.singleton, VarParsing.varType.int)
13+
options.register("streams", 0, VarParsing.multiplicity.singleton, VarParsing.varType.int)
14+
options.register("batchsize", 1, VarParsing.multiplicity.singleton, VarParsing.varType.int)
15+
options.register("modelname","deepcalo_e", VarParsing.multiplicity.singleton, VarParsing.varType.string)
16+
options.register("mode", "Async", VarParsing.multiplicity.singleton, VarParsing.varType.string)
17+
options.parseArguments()
18+
19+
if len(options.params)>0:
20+
with open(options.params,'r') as pfile:
21+
pdict = json.load(pfile)
22+
options.address = pdict["address"]
23+
options.port = int(pdict["port"])
24+
print("server = "+options.address+":"+str(options.port))
25+
26+
# check mode
27+
allowed_modes = {
28+
"Async": "DeepCaloProducerAsync",
29+
"Sync": "DeepCaloProducerSync",
30+
"PseudoAsync": "DeepCaloProducerPseudoAsync",
31+
}
32+
if options.mode not in allowed_modes:
33+
raise ValueError("Unknown mode: "+options.mode)
34+
35+
process = cms.Process('imageTest')
36+
37+
#--------------------------------------------------------------------------------
38+
# Import of standard configurations
39+
#================================================================================
40+
process.load('FWCore/MessageService/MessageLogger_cfi')
41+
process.load('Configuration/StandardSequences/GeometryDB_cff')
42+
process.load('Configuration/StandardSequences/MagneticField_38T_cff')
43+
44+
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
45+
process.GlobalTag.globaltag = cms.string('100X_upgrade2018_realistic_v10')
46+
47+
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents) )
48+
process.source = cms.Source("PoolSource",
49+
#fileNames = cms.untracked.vstring('file:../../Core/data/store_mc_RunIISpring18MiniAOD_BulkGravTohhTohbbhbb_narrow_M-2000_13TeV-madgraph_MINIAODSIM_100X_upgrade2018_realistic_v10-v1_30000_24A0230C-B530-E811-ADE3-14187741120B.root')
50+
fileNames = cms.untracked.vstring(['file:../../Core/data/skim.root']*100),
51+
duplicateCheckMode = cms.untracked.string('noDuplicateCheck')
52+
)
53+
54+
55+
if len(options.inputFiles)>0: process.source.fileNames = options.inputFiles
56+
57+
################### EDProducer ##############################
58+
process.DeepCaloProducer = cms.EDProducer(allowed_modes[options.mode],
59+
topN = cms.uint32(5),
60+
#binDataPath = cms.string("../../Core/data/image0_1000.bin"),
61+
binDataPath = cms.string("../../Core/data/deepcalo_all.bin"),
62+
Client = cms.PSet(
63+
ninput = cms.uint32(56*11*4),
64+
noutput = cms.uint32(1),
65+
batchSize = cms.uint32(options.batchsize),
66+
address = cms.string(options.address),
67+
port = cms.uint32(options.port),
68+
timeout = cms.uint32(options.timeout),
69+
modelName = cms.string(options.modelname),
70+
)
71+
)
72+
73+
# Let it run
74+
process.p = cms.Path(
75+
process.DeepCaloProducer
76+
)
77+
78+
process.MessageLogger.cerr.FwkReport.reportEvery = 500
79+
keep_msgs = ['TRTClient','DeepCaloProducer']
80+
for msg in keep_msgs:
81+
process.MessageLogger.categories.append(msg)
82+
setattr(process.MessageLogger.cerr,msg,
83+
cms.untracked.PSet(
84+
optionalPSet = cms.untracked.bool(True),
85+
limit = cms.untracked.int32(10000000),
86+
)
87+
)
88+
89+
if options.threads>0:
90+
if not hasattr(process,"options"):
91+
process.options = cms.untracked.PSet()
92+
process.options.numberOfThreads = cms.untracked.uint32(options.threads)
93+
process.options.numberOfStreams = cms.untracked.uint32(options.streams if options.streams>0 else 0)
94+
95+
process.Timing = cms.Service("Timing",
96+
summaryOnly = cms.untracked.bool(True),
97+
useJobReport = cms.untracked.bool(True)
98+
)

TensorRT/python/HcalTest_mc_cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents) )
4848
process.source = cms.Source("PoolSource",
49-
fileNames = cms.untracked.vstring('file:../../Core/data/store_mc_RunIISpring18MiniAOD_BulkGravTohhTohbbhbb_narrow_M-2000_13TeV-madgraph_MINIAODSIM_100X_upgrade2018_realistic_v10-v1_30000_24A0230C-B530-E811-ADE3-14187741120B.root')
49+
fileNames = cms.untracked.vstring('/store/user/pedrok/sonic/store_mc_RunIISpring18MiniAOD_BulkGravTohhTohbbhbb_narrow_M-2000_13TeV-madgraph_MINIAODSIM_100X_upgrade2018_realistic_v10-v1_30000_24A0230C-B530-E811-ADE3-14187741120B.root')
5050
)
5151

5252
if len(options.inputFiles)>0: process.source.fileNames = options.inputFiles

TensorRT/python/jetImageTest_mc_cfg.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
options.register("threads", 1, VarParsing.multiplicity.singleton, VarParsing.varType.int)
1212
options.register("streams", 0, VarParsing.multiplicity.singleton, VarParsing.varType.int)
1313
options.register("batchsize", 10, VarParsing.multiplicity.singleton, VarParsing.varType.int)
14-
#options.register("modelname","resnet50_netdef", VarParsing.multiplicity.singleton, VarParsing.varType.string)
15-
options.register("modelname","resnet50_ensemble", VarParsing.multiplicity.singleton, VarParsing.varType.string)
14+
options.register("modelname","resnet50_netdef", VarParsing.multiplicity.singleton, VarParsing.varType.string)
15+
#options.register("modelname","resnet50_ensemble", VarParsing.multiplicity.singleton, VarParsing.varType.string)
1616
options.register("mode","Async", VarParsing.multiplicity.singleton, VarParsing.varType.string)
1717
options.parseArguments()
1818

@@ -46,7 +46,8 @@
4646

4747
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents) )
4848
process.source = cms.Source("PoolSource",
49-
fileNames = cms.untracked.vstring('file:../../Core/data/store_mc_RunIISpring18MiniAOD_BulkGravTohhTohbbhbb_narrow_M-2000_13TeV-madgraph_MINIAODSIM_100X_upgrade2018_realistic_v10-v1_30000_24A0230C-B530-E811-ADE3-14187741120B.root')
49+
fileNames = cms.untracked.vstring(['file:store_mc_RunIISpring18MiniAOD_BulkGravTohhTohbbhbb_narrow_M-2000_13TeV-madgraph_MINIAODSIM_100X_upgrade2018_realistic_v10-v1_30000_24A0230C-B530-E811-ADE3-14187741120B.root']*50),
50+
duplicateCheckMode = cms.untracked.string('noDuplicateCheck')
5051
)
5152

5253
if len(options.inputFiles)>0: process.source.fileNames = options.inputFiles
@@ -57,8 +58,8 @@
5758
topN = cms.uint32(5),
5859
imageList = cms.string("../../Core/data/imagenet_classes.txt"),
5960
Client = cms.PSet(
60-
ninput = cms.uint32(15),
61-
noutput = cms.uint32(1),
61+
ninput = cms.uint32(224*224*3),
62+
noutput = cms.uint32(1000),
6263
batchSize = cms.uint32(options.batchsize),
6364
address = cms.string(options.address),
6465
port = cms.uint32(options.port),
@@ -72,7 +73,7 @@
7273
process.jetImageProducer
7374
)
7475

75-
process.MessageLogger.cerr.FwkReport.reportEvery = 1
76+
process.MessageLogger.cerr.FwkReport.reportEvery = 500
7677
keep_msgs = ['JetImageProducer','TRTClient']
7778
for msg in keep_msgs:
7879
process.MessageLogger.categories.append(msg)
@@ -88,3 +89,8 @@
8889
process.options = cms.untracked.PSet()
8990
process.options.numberOfThreads = cms.untracked.uint32(options.threads)
9091
process.options.numberOfStreams = cms.untracked.uint32(options.streams if options.streams>0 else 0)
92+
93+
process.Timing = cms.Service("Timing",
94+
summaryOnly = cms.untracked.bool(True),
95+
useJobReport = cms.untracked.bool(True)
96+
)

0 commit comments

Comments
 (0)