From 0a449c5a655c4c7b7cd3a425d663cc96e5f00b55 Mon Sep 17 00:00:00 2001 From: Tianxing Yang <5900105+ytxmobile98@users.noreply.github.com> Date: Thu, 14 Nov 2024 20:05:32 +0800 Subject: [PATCH] Building on Ubuntu 24.04 (#129) * build: adding Ubuntu 24.04 to CMakeLists.txt * build: set OpenVINO version * fix: **kwargs --- CMakeLists.txt | 8 +++----- intel_npu_acceleration_library/device.py | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9196b56..735844f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,8 +37,8 @@ function(get_linux_lsb_release_information) set(LSB_RELEASE_VERSION "${LSB_RELEASE_VERSION}" PARENT_SCOPE) endfunction() -set(OV_VERSION_SHORT "nightly") -set(OV_VERSION "2024.3.0.dev20240524_x86_64") +set(OV_VERSION_SHORT "2024.4") +set(OV_VERSION "2024.4.0.16579.c3152d32c9c_x86_64") set(OV_STORAGE_URL "https://storage.openvinotoolkit.org/repositories/openvino/packages") set(OV_NIGHTLY_COMMIT "2024.3.0-15502-66093834e38") @@ -55,7 +55,7 @@ elseif(UNIX) if(NOT OV_LIBRARY_URL) get_linux_lsb_release_information() if (LSB_RELEASE_ID STREQUAL "Ubuntu") - if (${LSB_RELEASE_VERSION} STREQUAL "18.04" OR ${LSB_RELEASE_VERSION} STREQUAL "20.04" OR ${LSB_RELEASE_VERSION} STREQUAL "22.04") + if (${LSB_RELEASE_VERSION} STREQUAL "18.04" OR ${LSB_RELEASE_VERSION} STREQUAL "20.04" OR ${LSB_RELEASE_VERSION} STREQUAL "22.04" OR ${LSB_RELEASE_VERSION} STREQUAL "24.04") string(REPLACE ".04" "" LSB_RELEASE_VERSION_SHORT ${LSB_RELEASE_VERSION}) if (${OV_VERSION_SHORT} STREQUAL "nightly") set(OV_PLATFORM "${OV_NIGHTLY_COMMIT}") @@ -115,5 +115,3 @@ target_link_libraries(intel_npu_acceleration_library PRIVATE openvino::runtime) if (UNIX) set_target_properties(intel_npu_acceleration_library PROPERTIES LINK_FLAGS "-Wl,-rpath,./") endif (UNIX) - - diff --git a/intel_npu_acceleration_library/device.py b/intel_npu_acceleration_library/device.py index 988c315..f4a934a 100644 --- a/intel_npu_acceleration_library/device.py +++ b/intel_npu_acceleration_library/device.py @@ -185,7 +185,7 @@ def _parse_to(super_fn: Any, *args: Any, **kwarg: Any): """ npu_device, args, kwargs = parse_to_arguments(*args, **kwarg) - device, dtype, non_blocking, convert_to_format = super_fn(*args, *kwargs) + device, dtype, non_blocking, convert_to_format = super_fn(*args, **kwargs) if npu_device: device = "npu" @@ -204,7 +204,7 @@ def new_to(self, *args: Any, **kwargs: Any): Returns: Tensor or Module: The tensor or module with the tensor(s) moved to the specified device(s). """ - npu_device, args, kwargs = parse_to_arguments(*args, *kwargs) + npu_device, args, kwargs = parse_to_arguments(*args, **kwargs) if npu_device: self = convert_to_npu_module(self).to("npu")