From 4d37a5e7b3e5ce190cf32653361595a2697cc0dd Mon Sep 17 00:00:00 2001 From: Punit Agrawal Date: Tue, 6 Apr 2021 17:17:55 +0900 Subject: [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. Gbp-Pq: Name 0001-Drop-dependency-on-source-repository-hash.patch --- include/vitis/ai/target_factory.hpp | 1 - src/target_factory.cpp | 5 ----- test/test_lib_info.cpp | 1 - 3 files changed, 7 deletions(-) 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; } -- 2.30.2