mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
[benchmark] fixed runtime benchmark bin macros bug (#1748)
* [Benchmark] Add pure runtime benchmark bin * [Benchmark] add cpu/gpu memory collect -> benchmark bin * [Backend] update trt max_batch_size policy * [backend] Update trt backend max_batch_size policy * [Benchmark] Add more model format support -> benchmark bin * [benchmark] fixed runtime benchmark bin marcos bug
This commit is contained in:
@@ -40,6 +40,7 @@ DEFINE_string(params_file, "", "Optional, set specific params file,"
|
||||
DEFINE_string(model_format, "PADDLE", "Optional, set specific model format,"
|
||||
"eg, PADDLE/ONNX/RKNN/TORCHSCRIPT/SOPHGO");
|
||||
|
||||
#if defined(ENABLE_BENCHMARK)
|
||||
static std::vector<int64_t> GetInt64Shape(const std::vector<int>& shape) {
|
||||
std::vector<int64_t> new_shape;
|
||||
new_shape.resize(shape.size());
|
||||
@@ -276,10 +277,11 @@ static void showInputInfos(int argc, char* argv[]) {
|
||||
std::cout << input_infos[i] << std::endl;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
#if defined(ENABLE_BENCHMARK)
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
if (FLAGS_diff) {
|
||||
CheckTensorDiff(argc, argv);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user