Skip to content

Commit 1019fd3

Browse files
committed
Squashed commit of the following:
commit 854de56 Author: Kevin Pedro <[email protected]> Date: Wed Apr 22 22:01:56 2020 -0500 remove unwanted files, restore wanted files commit dabe883 Author: Jeffrey Krupa <[email protected]> Date: Wed Apr 22 22:50:27 2020 -0400 hlt without custom config commit 65a42a2 Author: Jeffrey Krupa <[email protected]> Date: Wed Apr 8 21:08:16 2020 -0400 test commit 2d6898c Author: Jeffrey Krupa <[email protected]> Date: Wed Apr 8 21:08:16 2020 -0400 user instructions commit 69c9626 Merge: 67d4ff0 be6622b Author: Jeffrey Krupa <[email protected]> Date: Wed Apr 22 21:18:35 2020 -0400 Merge branch 'master' of ssh://github.com/jeffkrupa/SonicCMS commit 67d4ff0 Author: Jeffrey Krupa <[email protected]> Date: Wed Apr 22 21:18:27 2020 -0400 SONIC for FACILE, online and offline setup commit be6622b Author: Jeff Krupa <[email protected]> Date: Wed Apr 8 21:09:51 2020 -0400 Update README.md commit aabff61 Author: Jeffrey Krupa <[email protected]> Date: Wed Apr 8 21:08:16 2020 -0400 user instructions commit ccff314 Author: Jeffrey Krupa <[email protected]> Date: Wed Apr 8 21:02:15 2020 -0400 Updates for facile analysis commit 652aebd Author: Jeffrey Krupa <[email protected]> Date: Fri Mar 6 15:05:19 2020 -0500 update commit 5c3bed2 Author: Jeffrey Krupa <[email protected]> Date: Fri Mar 6 14:56:03 2020 -0500 update commit d2b0330 Author: Jeffrey Krupa <[email protected]> Date: Fri Mar 6 14:37:28 2020 -0500 update commit 9c6ae96 Author: Jeffrey Krupa <[email protected]> Date: Fri Mar 6 14:29:22 2020 -0500 update commit 6fca946 Author: Jeffrey Krupa <[email protected]> Date: Fri Mar 6 14:23:54 2020 -0500 update commit c86e57f Author: Jeffrey Krupa <[email protected]> Date: Fri Mar 6 13:48:15 2020 -0500 update commit cc85edb Author: Jeffrey Krupa <[email protected]> Date: Fri Mar 6 13:45:49 2020 -0500 update commit c0d57d6 Author: Jeffrey Krupa <[email protected]> Date: Fri Mar 6 13:15:45 2020 -0500 update commit b47b956 Author: Jeffrey Krupa <[email protected]> Date: Fri Mar 6 12:39:09 2020 -0500 update commit 9a36e96 Author: Jeffrey Krupa <[email protected]> Date: Fri Mar 6 12:27:23 2020 -0500 update commit 29f347f Author: Jeffrey Krupa <[email protected]> Date: Thu Mar 5 13:44:25 2020 -0500 update commit aa4a0e5 Author: Jeffrey Krupa <[email protected]> Date: Thu Mar 5 13:33:43 2020 -0500 update commit 7d139f5 Author: Jeffrey Krupa <[email protected]> Date: Thu Mar 5 13:32:04 2020 -0500 update commit a03b928 Author: Jeffrey Krupa <[email protected]> Date: Thu Mar 5 13:07:23 2020 -0500 update commit 21682ce Author: Jeffrey Krupa <[email protected]> Date: Wed Mar 4 20:46:00 2020 -0500 update commit edee50f Author: Jeffrey Krupa <[email protected]> Date: Wed Mar 4 20:29:58 2020 -0500 update commit b8ee69d Author: Jeffrey Krupa <[email protected]> Date: Wed Mar 4 20:25:10 2020 -0500 update commit 982ea8f Author: Jeffrey Krupa <[email protected]> Date: Wed Mar 4 20:09:32 2020 -0500 update commit 23bfac9 Author: Jeffrey Krupa <[email protected]> Date: Wed Mar 4 19:48:49 2020 -0500 update commit 0f8fff7 Author: Jeffrey Krupa <[email protected]> Date: Wed Mar 4 16:20:21 2020 -0500 update commit 3584e1f Author: Jeffrey Krupa <[email protected]> Date: Wed Mar 4 16:00:52 2020 -0500 update commit db46e90 Author: Jeffrey Krupa <[email protected]> Date: Wed Mar 4 15:39:03 2020 -0500 update commit 4100ddc Author: Jeffrey Krupa <[email protected]> Date: Wed Mar 4 15:28:43 2020 -0500 update commit b265d8a Author: Jeffrey Krupa <[email protected]> Date: Wed Mar 4 15:14:05 2020 -0500 update commit f7ba892 Author: Jeffrey Krupa <[email protected]> Date: Wed Mar 4 15:12:27 2020 -0500 update commit ccd3e9c Author: Jeffrey Krupa <[email protected]> Date: Wed Mar 4 14:10:02 2020 -0500 update commit 3a1379f Author: Jeffrey Krupa <[email protected]> Date: Wed Mar 4 14:08:25 2020 -0500 update commit 8126ce2 Author: Jeffrey Krupa <[email protected]> Date: Wed Mar 4 13:42:08 2020 -0500 update commit 561a5c0 Author: Jeffrey Krupa <[email protected]> Date: Wed Mar 4 13:27:52 2020 -0500 update commit 51018ab Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 20:09:04 2020 -0500 update commit de936bd Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 20:01:15 2020 -0500 update commit 30539ce Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 19:24:35 2020 -0500 update commit dabbc86 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 18:44:03 2020 -0500 update commit 1f75dfc Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 12:26:24 2020 -0500 update commit 68fb209 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 12:15:14 2020 -0500 update commit 27d75e1 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 12:14:33 2020 -0500 update commit 7e01666 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 12:12:39 2020 -0500 update commit 2bfe0c3 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 12:11:42 2020 -0500 update commit 62dea12 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 12:10:18 2020 -0500 update commit 93bf12d Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 12:09:37 2020 -0500 update commit 77b065a Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 12:08:16 2020 -0500 update commit 0528afe Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 12:07:08 2020 -0500 update commit eaefa61 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 12:06:49 2020 -0500 update commit f6b89b1 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 12:05:54 2020 -0500 update commit 87dd555 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 12:02:55 2020 -0500 update commit 868546e Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 12:00:05 2020 -0500 update commit ab1fe03 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 11:58:23 2020 -0500 update commit 07d5fe0 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 11:57:39 2020 -0500 update commit 18be81f Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 11:57:10 2020 -0500 update commit b84b007 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 11:56:39 2020 -0500 update commit 9c01ff7 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 11:55:17 2020 -0500 update commit 7b0a342 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 11:49:52 2020 -0500 update commit 242af8a Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 11:49:16 2020 -0500 update commit df9e28c Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 11:46:31 2020 -0500 update commit e26bedc Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 11:43:23 2020 -0500 update commit 8527705 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 11:12:18 2020 -0500 update commit aed86d3 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 11:07:59 2020 -0500 update commit a24ccf3 Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 11:07:02 2020 -0500 update commit 29cf2ca Author: Jeffrey Krupa <[email protected]> Date: Tue Mar 3 11:05:23 2020 -0500 update commit a2b928b Author: Jeffrey Krupa <[email protected]> Date: Mon Mar 2 18:20:12 2020 -0500 update commit c572d90 Author: Jeffrey Krupa <[email protected]> Date: Mon Mar 2 18:12:50 2020 -0500 update commit 46d1d14 Author: Jeffrey Krupa <[email protected]> Date: Mon Mar 2 18:10:38 2020 -0500 update commit c4b7268 Author: Jeffrey Krupa <[email protected]> Date: Sat Feb 29 16:48:45 2020 -0500 update commit 74c6380 Author: Jeffrey Krupa <[email protected]> Date: Sat Feb 29 16:44:55 2020 -0500 update commit 23033da Author: Jeffrey Krupa <[email protected]> Date: Sat Feb 29 16:35:44 2020 -0500 update commit acde420 Author: Jeffrey Krupa <[email protected]> Date: Sat Feb 29 11:12:50 2020 -0500 update commit 80e7727 Author: Jeffrey Krupa <[email protected]> Date: Fri Feb 28 22:12:00 2020 -0500 update commit a6fea56 Author: Jeffrey Krupa <[email protected]> Date: Fri Feb 28 22:00:51 2020 -0500 update commit f47afd4 Author: Jeffrey Krupa <[email protected]> Date: Fri Feb 28 21:31:18 2020 -0500 update commit c195137 Author: Jeffrey Krupa <[email protected]> Date: Fri Feb 28 21:14:35 2020 -0500 update commit 2578903 Author: Jeffrey Krupa <[email protected]> Date: Fri Feb 28 20:40:28 2020 -0500 update commit 917dfe8 Author: Jeffrey Krupa <[email protected]> Date: Fri Feb 28 20:40:00 2020 -0500 update commit c689f9f Author: Jeffrey Krupa <[email protected]> Date: Fri Feb 28 19:36:47 2020 -0500 update commit e1b69ab Author: Jeffrey Krupa <[email protected]> Date: Fri Feb 28 19:24:07 2020 -0500 update commit 92b2e66 Author: Jeffrey Krupa <[email protected]> Date: Fri Feb 28 19:06:59 2020 -0500 update commit 741bb42 Author: Jeffrey Krupa <[email protected]> Date: Fri Feb 28 18:53:29 2020 -0500 update commit 487d95b Author: Jeffrey Krupa <[email protected]> Date: Fri Feb 28 14:26:51 2020 -0500 update commit 0ef9d00 Author: Jeffrey Krupa <[email protected]> Date: Fri Feb 28 14:23:15 2020 -0500 update commit 89a720d Author: Jeffrey Krupa <[email protected]> Date: Fri Feb 28 12:23:04 2020 -0500 update commit 89a938c Author: Jeffrey Krupa <[email protected]> Date: Fri Feb 28 10:59:03 2020 -0500 update commit aec13a4 Author: Jeffrey Krupa <[email protected]> Date: Thu Feb 27 21:16:11 2020 -0500 update commit 62a9e2b Author: Jeffrey Krupa <[email protected]> Date: Thu Feb 27 19:01:21 2020 -0500 update commit 7bb5a5a Author: Jeffrey Krupa <[email protected]> Date: Thu Feb 27 03:52:31 2020 +0000 spawn commit 1c75bb3 Author: Jeffrey Krupa <[email protected]> Date: Thu Feb 27 03:51:23 2020 +0000 Cloud commit 23cbff5 Author: Jeffrey Krupa <[email protected]> Date: Thu Feb 20 17:17:38 2020 -0500 LPC commit f36f5cb Author: Jeffrey Krupa <[email protected]> Date: Fri Feb 7 12:40:55 2020 -0500 HLT config commit f8a9e9b Author: Jeffrey Krupa <[email protected]> Date: Thu Jan 30 15:53:31 2020 -0500 oops commit de749ff Merge: 1f05f80 c972383 Author: Jeffrey Krupa <[email protected]> Date: Thu Jan 30 15:31:55 2020 -0500 Merge branch 'master' of ssh://github.com/jeffkrupa/SonicCMS commit 1f05f80 Author: Jeffrey Krupa <[email protected]> Date: Thu Jan 30 15:31:48 2020 -0500 replace HBHEPhase1Reconstructor with facile-as-a-service in sonic commit c972383 Author: JackDinsmore <[email protected]> Date: Fri Jan 24 13:01:30 2020 -0500 Remove brainwave commit 9cb419f Author: JackDinsmore <[email protected]> Date: Fri Jan 24 12:59:51 2020 -0500 output time commit 5421b14 Author: JackDinsmore <[email protected]> Date: Fri Jan 24 12:43:17 2020 -0500 histograms commit b8a6132 Merge: 02fecb0 0bdfb23 Author: Jeffrey Krupa <[email protected]> Date: Wed Jan 22 16:47:08 2020 -0500 spawn change commit 02fecb0 Author: Jeffrey Krupa <[email protected]> Date: Wed Jan 22 16:25:22 2020 -0500 Hopefully not too many conflicts... commit 0bdfb23 Author: JackDinsmore <[email protected]> Date: Wed Jan 22 16:12:48 2020 -0500 Even better multiple clients commit e9b560a Author: JackDinsmore <[email protected]> Date: Wed Jan 22 16:11:10 2020 -0500 Even better multiple clients commit 5a2d456 Author: JackDinsmore <[email protected]> Date: Wed Jan 22 14:29:24 2020 -0500 Timing data for each event commit fe72bc4 Author: JackDinsmore <[email protected]> Date: Wed Jan 22 14:11:05 2020 -0500 Better multiple clients commit 76fff3f Merge: 1d8f022 1d8480f Author: JackDinsmore <[email protected]> Date: Wed Jan 22 11:16:22 2020 -0500 Merge branch 'master' of https://github.com/jeffkrupa/SonicCMS Jack is merging because he forgot to pull the repository before he made a bunch of changes. commit 1d8f022 Author: JackDinsmore <[email protected]> Date: Wed Jan 22 11:00:22 2020 -0500 Multiple clients commit 434f3ee Author: JackDinsmore <[email protected]> Date: Tue Jan 21 16:47:00 2020 -0500 Multiple clients commit 1d8480f Author: Jeff Krupa <[email protected]> Date: Tue Jan 21 15:43:54 2020 -0500 Update README.md commit d34c7d7 Author: Jeff Krupa <[email protected]> Date: Tue Jan 21 15:39:32 2020 -0500 Update README.md commit f2f8178 Author: JackDinsmore <[email protected]> Date: Fri Jan 17 16:24:33 2020 -0500 Timing commit 91356a5 Author: Jeffrey Krupa <[email protected]> Date: Fri Jan 17 14:06:28 2020 -0600 small changes commit 592a99a Author: Jeffrey Krupa <[email protected]> Date: Thu Jan 16 13:16:55 2020 -0600 realistic run3 hcal scenario commit f63913d Author: Jeffrey Krupa <[email protected]> Date: Thu Jan 16 09:48:34 2020 -0600 client output fix commit bce2c22 Author: Jeffrey Krupa <[email protected]> Date: Tue Jan 14 12:25:58 2020 -0600 hcal i/o commit 3f26263 Author: Jeffrey Krupa <[email protected]> Date: Tue Jan 14 10:43:24 2020 -0600 hcal collection changes
1 parent 8333598 commit 1019fd3

File tree

9 files changed

+699
-14
lines changed

9 files changed

+699
-14
lines changed

Core/interface/SonicClientBase.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ class SonicClientBase {
2828
}
2929

3030
void finish(std::exception_ptr eptr = std::exception_ptr{}) {
31+
/*unsigned int clientTime = 0;
3132
if(setTime_){
3233
auto t1 = std::chrono::high_resolution_clock::now();
33-
edm::LogInfo(debugName_) << "Client time: " << std::chrono::duration_cast<std::chrono::microseconds>(t1 - t0_).count();
34-
}
34+
clientTime = (unsigned int)std::chrono::duration_cast<std::chrono::microseconds>(t1 - t0_).count();
35+
}*/
3536
holder_.doneWaiting(eptr);
3637
}
3738

Core/interface/SonicEDProducer.h

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
#include "FWCore/Framework/interface/EventSetup.h"
88
#include "FWCore/Concurrency/interface/WaitingTaskWithArenaHolder.h"
99
#include "FWCore/MessageLogger/interface/MessageLogger.h"
10-
10+
#include <sstream>
1111
#include <string>
1212
#include <chrono>
13+
#include <fstream>
1314

1415
//this is a stream producer because client operations are not multithread-safe in general
1516
//it is designed such that the user never has to interact with the client or the acquire() callback directly
@@ -20,17 +21,40 @@ class SonicEDProducer : public edm::stream::EDProducer<edm::ExternalWork, Capabi
2021
typedef typename Client::Input Input;
2122
typedef typename Client::Output Output;
2223
//constructor
23-
SonicEDProducer(edm::ParameterSet const& cfg) : client_(cfg.getParameter<edm::ParameterSet>("Client")) {}
24+
SonicEDProducer(edm::ParameterSet const& cfg) : client_(cfg.getParameter<edm::ParameterSet>("Client")) {
25+
sumLoadTime = 0;
26+
numLoadTime = 0;
27+
}
28+
2429
//destructor
25-
virtual ~SonicEDProducer() {}
30+
~SonicEDProducer() {
31+
/*
32+
std::stringstream msg;
33+
msg << "Produced by SonicEDProducer" << std::endl;
34+
if (numLoadTime == 0) {
35+
msg << "numLoadTime was 0." << std::endl;
36+
}
37+
else {
38+
msg << "Load time: " << float(sumLoadTime) / numLoadTime << std::endl;
39+
}
40+
41+
writeData(&msg);
42+
43+
std::ofstream file("./data/producer-data.dat");
44+
file << msg.str();
45+
file.close();*/
46+
}
2647

2748
//derived classes use a dedicated acquire() interface that incorporates client_.input()
2849
//(no need to interact with callback holder)
2950
void acquire(edm::Event const& iEvent, edm::EventSetup const& iSetup, edm::WaitingTaskWithArenaHolder holder) override final {
3051
auto t0 = std::chrono::high_resolution_clock::now();
3152
acquire(iEvent, iSetup, client_.input());
3253
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();
54+
if(!debugName_.empty()) {
55+
sumLoadTime += (unsigned int)std::chrono::duration_cast<std::chrono::microseconds>(t1 - t0).count();
56+
numLoadTime++;
57+
}
3458
client_.predict(holder);
3559
}
3660
virtual void acquire(edm::Event const& iEvent, edm::EventSetup const& iSetup, Input& iInput) = 0;
@@ -50,6 +74,11 @@ class SonicEDProducer : public edm::stream::EDProducer<edm::ExternalWork, Capabi
5074
//members
5175
Client client_;
5276
std::string debugName_;
77+
78+
private:
79+
virtual void writeData(std::stringstream* msg) {}
80+
unsigned int sumLoadTime;
81+
unsigned int numLoadTime;
5382
};
5483

5584
#endif

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ For this branch, please use the following script to set up the work area:
66
```
77
wget https://raw.githubusercontent.com/hls-fpga-machine-learning/SonicCMS/master/setup.sh
88
chmod +x setup.sh
9-
./setup.sh
9+
./setup.sh -f jeffkrupa -j 4 -p TensorRT
1010
cd CMSSW_10_6_6/src
1111
cmsenv
1212
```

TensorRT/BuildFile.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
<use name="CalibCalorimetry/HcalAlgos"/>
2+
<use name="CalibFormats/HcalObjects"/>
3+
<use name="Geometry/Records"/>
4+
<use name="Geometry/CaloGeometry"/>
15
<use name="DataFormats/JetReco"/>
6+
<use name="DataFormats/HcalDigi"/>
7+
<use name="DataFormats/FEDRawData"/>
28
<use name="DataFormats/Candidate"/>
39
<use name="FWCore/Framework"/>
410
<use name="FWCore/PluginManager"/>

TensorRT/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
Remote mode:
22
```
33
cd python
4-
cmsRun jetImageTest_mc_cfg.py address=ailab01.fnal.gov port=8001 maxEvents=25
4+
cmsRun HcalTest_mc_cfg.py maxEvents=25 port=<port> address=<server address> batchsize=16000 modelname=facile maxEvents=10
55
```
6-
(or the same for `HcalTest_mc_cfg.py`)
76

87
All the different client options can be tested with an additional argument:
98
`mode=Async` (default), `mode=Sync`, `mode=PseudoAsync`.
109

1110
Other available servers:
1211
* `prp-gpu-1.t2.ucsd.edu`
12+
13+
## Timing
14+
Some timing data will be recorded in `SonicCMS/TensorRT/python/data`. The most interesting timing data is stored in `client-data.dat`. Some parts of `TRTClient.cc` have commented-out lines of code which could collect timing data, but since we have not yet needed that data, it is not saved to the file. This could be easily remedied.
15+
16+

0 commit comments

Comments
 (0)