Skip to content

Commit

Permalink
style(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Sep 13, 2023
1 parent 789ba72 commit 0fa9061
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#include "tvm_utility/pipeline.hpp"

#ifndef YOLO_V2_TINY_INFERENCE_ENGINE_TVM_CONFIG_HPP_ // NOLINT
#define YOLO_V2_TINY_INFERENCE_ENGINE_TVM_CONFIG_HPP_
#ifndef COMMON__TVM_UTILITY__DATA__USER__YOLO_V2_TINY__INFERENCE_ENGINE_TVM_CONFIG_HPP_ // NOLINT
#define COMMON__TVM_UTILITY__DATA__USER__YOLO_V2_TINY__INFERENCE_ENGINE_TVM_CONFIG_HPP_

namespace model_zoo
{
Expand All @@ -28,35 +28,28 @@ namespace yolo_v2_tiny
namespace tensorflow_fp32_coco
{

static const tvm_utility::pipeline::InferenceEngineTVMConfig config {
{
3,
0,
0
}, // modelzoo_version
static const tvm_utility::pipeline::InferenceEngineTVMConfig config{
{3, 0, 0}, // modelzoo_version

"yolo_v2_tiny", // network_name
"llvm", // network_backend
"llvm", // network_backend

"deploy_lib.so", //network_module_path
"deploy_graph.json", // network_graph_path
"deploy_lib.so", // network_module_path
"deploy_graph.json", // network_graph_path
"deploy_param.params", // network_params_path

kDLCPU, // tvm_device_type
0, // tvm_device_id
0, // tvm_device_id

{
{"input", kDLFloat, 32, 1, {-1, 416, 416, 3}}
}, // network_inputs
{{"input", kDLFloat, 32, 1, {-1, 416, 416, 3}}}, // network_inputs

{
{"output", kDLFloat, 32, 1, {1, 13, 13, 425}}
} // network_outputs
{{"output", kDLFloat, 32, 1, {1, 13, 13, 425}}} // network_outputs
};

} // namespace tensorflow_fp32_coco
} // namespace yolo_v2_tiny
} // namespace camera_obstacle_detection
} // namespace perception
} // namespace model_zoo
#endif // YOLO_V2_TINY_INFERENCE_ENGINE_TVM_CONFIG_HPP_ // NOLINT
#endif // COMMON__TVM_UTILITY__DATA__USER__YOLO_V2_TINY__INFERENCE_ENGINE_TVM_CONFIG_HPP_ //
// NOLINT
11 changes: 4 additions & 7 deletions common/tvm_utility/include/tvm_utility/pipeline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,13 @@ class InferenceEngineTVM : public InferenceEngine
{
public:
explicit InferenceEngineTVM(
const InferenceEngineTVMConfig & config,
const std::string & pkg_name,
const InferenceEngineTVMConfig & config, const std::string & pkg_name,
const std::string & autoware_data_path)
: config_(config)
{
// Get full network path
std::string network_prefix = autoware_data_path + pkg_name +
"/models/" + config.network_name + "/";
std::string network_prefix =
autoware_data_path + pkg_name + "/models/" + config.network_name + "/";
std::string network_module_path = network_prefix + config.network_module_path;
std::string network_graph_path = network_prefix + config.network_graph_path;
std::string network_params_path = network_prefix + config.network_params_path;
Expand Down Expand Up @@ -295,9 +294,7 @@ class InferenceEngineTVM : public InferenceEngine
}
}

explicit InferenceEngineTVM(
const InferenceEngineTVMConfig & config,
const std::string & pkg_name)
explicit InferenceEngineTVM(const InferenceEngineTVMConfig & config, const std::string & pkg_name)
: config_(config)
{
// Get full network path
Expand Down

0 comments on commit 0fa9061

Please sign in to comment.