From: Punit Agrawal Date: Tue, 6 Apr 2021 08:17:55 +0000 (+0900) Subject: Drop dependency on source repository hash X-Git-Tag: archive/raspbian/2.5-5+rpi1~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4a97d1dc665175eef3409edfb1bd9b4df3cc3749;p=target-factory.git 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. 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 60ad4e6..24918ac 100644 --- a/include/vitis/ai/target_factory.hpp +++ b/include/vitis/ai/target_factory.hpp @@ -40,7 +40,6 @@ class TargetFactory { virtual void dump(const Target& target, const std::string& file) 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 5f33123..621008c 100644 --- a/src/target_factory.cpp +++ b/src/target_factory.cpp @@ -227,10 +227,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; }