diff --git a/hpvm/scripts/hpvm_installer.py b/hpvm/scripts/hpvm_installer.py index c6e465438a84b8b33147dcbc616dcdcdafee6a9f..38d74f68fd43c64f4d71cc3a54a8b6be7ccc2a46 100755 --- a/hpvm/scripts/hpvm_installer.py +++ b/hpvm/scripts/hpvm_installer.py @@ -25,6 +25,11 @@ PROTOBUF_DIR = NVDLA_UMD_DIR / "external/protobuf-2.6" PROTOBUF_STATIC_LIB = PROTOBUF_DIR / "src/.libs/libprotobuf.a" COMPILER_APPS_DIR = NVDLA_UMD_DIR / "apps/compiler" COMPILER_CORE_DIR = NVDLA_UMD_DIR / "core/src/compiler" +NVDLA_LIB = NVDLA_UMD_DIR / "out/core/src/compiler/libnvdla_compiler/libnvdla_compiler.so" +PROTOBUF_LIB = PROTOBUF_DIR / "src/.libs/libprotobuf.so" +PROTOBUF_LIB_V1 = "libprotobuf.so.9" # Some versions of OS may need this +PROTOBUF_LIB_V2 = "libprotobuf.so.9.0.1" # Some versions of OS may need this +NVDLA_LIB_DIR = NVDLA_DIR / "lib" LINKS = [ "CMakeLists.txt", @@ -309,6 +314,14 @@ def build_nvdla_compiler(): chdir(NVDLA_UMD_DIR) check_call(["make", "TOP=" + str(NVDLA_UMD_DIR)]) + # Copy over the NVDLA and Protobuf libraries to + # a single directory + check_call(["mkdir", NVDLA_LIB_DIR]) + check_call(["cp", NVDLA_LIB, NVDLA_LIB_DIR]) + check_call(["cp", PROTOBUF_LIB, NVDLA_LIB_DIR]) + check_call(["cp", PROTOBUF_LIB, str(NVDLA_LIB_DIR) + "/" + PROTOBUF_LIB_V1]) + check_call(["cp", PROTOBUF_LIB, str(NVDLA_LIB_DIR) + "/" + PROTOBUF_LIB_V2]) + def build( build_dir: Path, nthreads: int,