Drop dependency on source repository hash
authorPunit Agrawal <punit1.agrawal@toshiba.co.jp>
Tue, 6 Apr 2021 08:17:55 +0000 (17:17 +0900)
committerNobuhiro Iwamatsu <iwamatsu@debian.org>
Wed, 22 Dec 2021 08:29:11 +0000 (08:29 +0000)
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
src/target_factory.cpp
test/test_lib_info.cpp

index 60ad4e67d03ae22b9528d997b48f3123298d9a83..24918ac00f26c73e71dddaa0d433f2d88801d0ea 100644 (file)
@@ -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;
index 5f3312321e112cdcf021ce1d8f36cb1ae0574913..621008c439fbb4a44f2a33904c5ecb3174edaefa 100644 (file)
@@ -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
index 8b78591b34642fad2fd52e93226dfa195cea9cd3..2802fe24658203e1bea8dea93a0a00e970dd83e6 100644 (file)
@@ -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;
 }