From: Nobuhiro Iwamatsu Date: Wed, 3 Aug 2022 05:00:47 +0000 (+0900) Subject: [PATCH] Drop dependency on source repository hash X-Git-Tag: archive/raspbian/2.5-5+rpi1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2325804427f8e3fc317191c50402f146295545bd;p=target-factory.git [PATCH] Drop dependency on source repository hash target_factory uses a hash of the top commit of the repository as library id. As this id depends on the repository / branch it is not stable; a version number should be used to represent library API version if required. As the library id is only used in the test, drop this function from the library interface. Signed-off-by: Nobuhiro Iwamatsu Gbp-Pq: Name 0001-Drop-dependency-on-source-repository-hash.patch --- diff --git a/include/vitis/ai/target_factory.hpp b/include/vitis/ai/target_factory.hpp index a6728b6..23a3bf3 100644 --- a/include/vitis/ai/target_factory.hpp +++ b/include/vitis/ai/target_factory.hpp @@ -49,7 +49,6 @@ class TARGET_FACTORY_DLLESPEC TargetFactory { virtual void dump(const Target& target, const std::string& file) const = 0; virtual bool is_registered_target(const std::string& name) const = 0; static const std::string get_lib_name(); - static const std::string get_lib_id(); public: virtual ~TargetFactory() = default; diff --git a/src/target_factory.cpp b/src/target_factory.cpp index eca9bfa..1268e0a 100644 --- a/src/target_factory.cpp +++ b/src/target_factory.cpp @@ -233,10 +233,5 @@ const std::string TargetFactory::get_lib_name() { return ret; } -const std::string TargetFactory::get_lib_id() { - const auto ret = std::string{PROJECT_GIT_COMMIT_ID}; - return ret; -} - } // namespace ai } // namespace vitis diff --git a/test/test_lib_info.cpp b/test/test_lib_info.cpp index 8b78591..2802fe2 100644 --- a/test/test_lib_info.cpp +++ b/test/test_lib_info.cpp @@ -24,7 +24,6 @@ int main(int, char* argv[]) { UNI_LOG_STD_LEVEL_INFO); UNI_LOG_INFO << "lib_name = " << TargetFactory::get_lib_name(); - UNI_LOG_INFO << "lib_id = " << TargetFactory::get_lib_id(); return 0; }