File tree Expand file tree Collapse file tree 2 files changed +1
-24
lines changed Expand file tree Collapse file tree 2 files changed +1
-24
lines changed Original file line number Diff line number Diff line change @@ -32,5 +32,5 @@ To build and run the app
32
32
33
33
```
34
34
cd TRTorch
35
- bs run //examples/sample_rt_app:samplertapp $PWD/examples/sample_rt_app/norm.jit
35
+ bazel run //examples/sample_rt_app:samplertapp $PWD/examples/sample_rt_app/norm.jit
36
36
```
Original file line number Diff line number Diff line change 5
5
#include < vector>
6
6
#include " torch/script.h"
7
7
8
- // Load the TRT engine from engine_path
9
- std::vector<char > loadEngine (std::string engine_path){
10
- std::ifstream engineFile (engine_path, std::ios::binary);
11
- if (!engineFile)
12
- {
13
- std::cerr << " Error opening TensorRT Engine file at : " << engine_path << std::endl;
14
- }
15
-
16
- engineFile.seekg (0 , engineFile.end );
17
- long int fsize = engineFile.tellg ();
18
- engineFile.seekg (0 , engineFile.beg );
19
-
20
- std::vector<char > engineData (fsize);
21
- engineFile.read (engineData.data (), fsize);
22
- if (!engineFile)
23
- {
24
- std::cerr << " Error loading engine from: " << engine_path << std::endl;
25
- }
26
-
27
- return engineData;
28
- }
29
-
30
8
int main (int argc, const char * argv[]) {
31
9
if (argc < 2 ) {
32
10
std::cerr
@@ -35,7 +13,6 @@ int main(int argc, const char* argv[]) {
35
13
}
36
14
37
15
std::string trt_ts_module_path = argv[1 ];
38
- // auto engineData = loadEngine(engine_path);
39
16
40
17
torch::jit::Module trt_ts_mod;
41
18
try {
You can’t perform that action at this time.
0 commit comments