Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.

Commit cad2fe7

Browse files
committed
fix bugs
Signed-off-by: Hui Zhang <zhtclz@foxmail.com>
1 parent 3e475f9 commit cad2fe7

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

gcompiler/cmake/external/pybind11.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FetchContent_GetProperties(pybind11)
66
if(NOT pybind11_POPULATED)
77
FetchContent_Declare(
88
pybind11
9-
#GIT_REPOSITORY https://github.com/pybind/pybind11.git
9+
GIT_REPOSITORY https://github.com/pybind/pybind11.git
1010
GIT_TAG master
1111
DOWNLOAD_DIR ${PYBIND11_DIR}
1212
SOURCE_DIR ${PYBIND11_DIR}

gcompiler/example/c++/basic/perf.cc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,11 @@ Status InitializeSession(int num_threads, const string& graph,
160160
LOG(INFO) << "Got config, " << config.device_count_size() << " devices";
161161
session->reset(tensorflow::NewSession(options));
162162
graph_def->reset(new GraphDef());
163-
LOG(INFO) << "new session ok!";
164-
// tensorflow::GraphDef tensorflow_graph;
165-
//Status s = ReadBinaryProto(Env::Default(), graph, graph_def->get());
166-
//if (!s.ok()) {
167-
// s = ReadTextProto(Env::Default(), graph, graph_def->get());
168-
//}
169-
Status s = ReadTextOrBinaryProto(Env::Default(), graph, graph_def->get());
163+
//tensorflow::GraphDef tensorflow_graph;
164+
Status s = ReadBinaryProto(Env::Default(), graph, graph_def->get());
165+
if (!s.ok()) {
166+
s = ReadTextProto(Env::Default(), graph, graph_def->get());
167+
}
170168

171169
if (!s.ok()) {
172170
LOG(ERROR) << "Could not create TensorFlow Graph: " << s;

gcompiler/example/c++/benchmark.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ namespace tensorflow {
1515
void perf_of_inference() {
1616
Perf::Config cfg;
1717
//cfg.graph = "/tmp-data/test/self/delta_infer/delta_infer/example/python/result.pb";
18-
cfg.graph = "/nfs/project/gaoyonghu/tf-inference-lib/unit_test/crash/models/frozen_graph_crash.pb";
18+
cfg.graph = "/tmp-data/zhanghui/delta/gcompiler/frozen_graph_30sec_e2e.pb";
1919

2020
//cfg.input_layer = "Placeholder:0,Placeholder_1:0";
2121
cfg.input_layer = "inputs:0";
2222

2323
//cfg.input_layer_shape = "1,100,768:1,100,100";
24-
cfg.input_layer_shape = "32,1000,40,1";
24+
cfg.input_layer_shape = "32,3000,40,3";
2525
//cfg.input_layer_type = "float,int32";
2626
cfg.input_layer_type = "float";
2727
//cfg.input_layer_values = "1,1";

0 commit comments

Comments
 (0)