Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24")
cmake_policy(SET CMP0135 NEW)
endif()

set(STACK_VERSION 1.23.0 CACHE STRING "Main project version")
set(STACK_VERSION 1.24.0 CACHE STRING "Main project version")
project(npu-linux-driver VERSION ${STACK_VERSION})

set(BUILD_NUMBER "dev-0" CACHE STRING "Build number composed of name and unique number used as driver version")
Expand Down
12 changes: 2 additions & 10 deletions cmake/compiler_flags.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# Copyright 2022-2024 Intel Corporation.
# Copyright (C) 2022-2025 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
# provided to you ("License"). Unless the License provides otherwise, you may
# not use, modify, copy, publish, distribute, disclose or transmit this
# software or the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in
# the License.
# SPDX-License-Identifier: MIT

add_compile_options(
# Compiler warnings
Expand Down
12 changes: 2 additions & 10 deletions cmake/detect_linux_system.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# Copyright 2022-2024 Intel Corporation.
# Copyright (C) 2022-2025 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
# provided to you ("License"). Unless the License provides otherwise, you may
# not use, modify, copy, publish, distribute, disclose or transmit this
# software or the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in
# the License.
# SPDX-License-Identifier: MIT

function(read_os_release ENTRY VAR_OUTPUT)
if (ANDROID)
Expand Down
12 changes: 2 additions & 10 deletions cmake/packaging/postinst
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
#!/bin/bash

# Copyright 2024 Intel Corporation.
# Copyright (C) 2024-2025 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
# provided to you ("License"). Unless the License provides otherwise, you may
# not use, modify, copy, publish, distribute, disclose or transmit this
# software or the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in
# the License.
# SPDX-License-Identifier: MIT

set -e -o pipefail

Expand Down
12 changes: 2 additions & 10 deletions cmake/sanitizer.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# Copyright 2022-2023 Intel Corporation.
# Copyright (C) 2022-2025 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
# provided to you ("License"). Unless the License provides otherwise, you may
# not use, modify, copy, publish, distribute, disclose or transmit this
# software or the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in
# the License.
# SPDX-License-Identifier: MIT

# Add options for building with sanitizers
if(NOT ENABLE_SANITIZER)
Expand Down
12 changes: 2 additions & 10 deletions compiler/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# Copyright 2022-2024 Intel Corporation.
# Copyright (C) 2022-2025 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
# provided to you ("License"). Unless the License provides otherwise, you may
# not use, modify, copy, publish, distribute, disclose or transmit this
# software or the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in
# the License.
# SPDX-License-Identifier: MIT

include(openvino.cmake)
include(npu_compiler.cmake)
28 changes: 10 additions & 18 deletions compiler/compiler_source.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# Copyright 2022-2025 Intel Corporation.
# Copyright (C) 2022-2025 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
# provided to you ("License"). Unless the License provides otherwise, you may
# not use, modify, copy, publish, distribute, disclose or transmit this
# software or the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in
# the License.
# SPDX-License-Identifier: MIT

if(TARGET npu_compiler_source)
return()
Expand All @@ -23,16 +15,16 @@ endif()
include(ExternalProject)

set(OPENVINO_REPOSITORY https://github.com/openvinotoolkit/openvino.git)
set(OPENVINO_REVISION c01cd93e24d1cd78bfbb401eed51c08fb93e0816)
set(OPENCV_REVISION 4d6d6fb18fb859f176e5ce2ad3295097a42cd8af)
set(GENAI_REVISION 01f0fe1eded5934871fef866ed217a60fa2c6049)
set(ONNXRUNTIME_TAG microsoft:9001123f6813409bce2d8ec24888ac73e348c26e)
set(ONNXRUNTIME_REVISION 9001123f6813409bce2d8ec24888ac73e348c26e)
set(OPENVINO_REVISION 44526285f241251e9543276572676365fbe542a4)
set(OPENCV_REVISION 252403bbf2fc560007c2c9057db5a9a151e99dd7)
set(GENAI_REVISION 3c0e2d3e7e13fa5e1dd5ea9ef1df59ce9fa852b5)
set(ONNXRUNTIME_TAG microsoft:7a919c693692d50f7c222660b76fb5b0c9926738)
set(ONNXRUNTIME_REVISION 7a919c693692d50f7c222660b76fb5b0c9926738)

set(NPU_COMPILER_TAG npu_ud_2025_32_rc1)
set(NPU_COMPILER_REVISION df25c7815507db20f903ce585f3976ff927890d6)
set(NPU_COMPILER_TAG npu_ud_2025_38_rc1)
set(NPU_COMPILER_REVISION 5aa47b4f67f9eec535316adf449a6aca58c635b2)
# Compiler might use different OpenVINO revision
set(NPU_COMPILER_OPENVINO_REVISION d97acfdce00ea5229e4c2d0ab03256ce0dff0a68)
set(NPU_COMPILER_OPENVINO_REVISION 7ced823330831da23d1985ee27e32b96ebfcf110)

set(OPENVINO_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/src/openvino")
file(MAKE_DIRECTORY ${OPENVINO_SOURCE_DIR})
Expand Down
11 changes: 2 additions & 9 deletions compiler/npu_compiler.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# Copyright 2022-2025 Intel Corporation.
# Copyright (C) 2022-2025 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
# provided to you ("License"). Unless the License provides otherwise, you may
# not use, modify, copy, publish, distribute, disclose or transmit this software
# or the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express or
# implied warranties, other than those that are expressly stated in the License.
# SPDX-License-Identifier: MIT

add_library(npu_compiler INTERFACE)

Expand Down
127 changes: 78 additions & 49 deletions compiler/npu_compiler_build.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# Copyright 2022-2025 Intel Corporation.
# Copyright (C) 2022-2025 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
# provided to you ("License"). Unless the License provides otherwise, you may
# not use, modify, copy, publish, distribute, disclose or transmit this
# software or the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in
# the License.
# SPDX-License-Identifier: MIT

include(compiler_source.cmake)

Expand All @@ -25,54 +17,91 @@ set(NPU_COMPILER_PACKAGE_DIR ${NPU_COMPILER_INSTALL_PREFIX}/cid)

include(ExternalProject)

list(APPEND NPU_COMPILER_CMAKE_ARGS "-D CMAKE_BUILD_TYPE=Release")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D BUILD_COMPILER_FOR_DRIVER=ON")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D BUILD_SHARED_LIBS=OFF")
# CLANG_FORMAT and NCC_STYLE is set to OFF to avoid LLVMDemangle doubled target issue
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_CLANG_FORMAT=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_CLANG_TIDY=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_NCC_STYLE=OFF")
# Copied from "how_to_build_driver_compiler" document
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_AUTO=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_AUTO_BATCH=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_BLOB_DUMP=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_FUNCTIONAL_TESTS=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_HETERO=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_INTEL_CPU=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_INTEL_GPU=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_JS=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_MULTI=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_INTEL_NPU=ON")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_INTEL_NPU_INTERNAL=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_INTEL_NPU_PROTOPIPE=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_OV_IR_FRONTEND=ON")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_OV_JAX_FRONTEND=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_OV_ONNX_FRONTEND=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_OV_PADDLE_FRONTEND=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_OV_PYTORCH_FRONTEND=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_OV_TF_FRONTEND=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_OV_TF_LITE_FRONTEND=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_PROXY=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_SAMPLES=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_TBBBIND_2_5=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_TEMPLATE=OFF")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ENABLE_TESTS=OFF")
# WA in case libgflags is installed in system
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D gflags_DIR=${CMAKE_CURRENT_SOURCE_DIR}/openvino_modules")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D OPENVINO_EXTRA_MODULES=${NPU_COMPILER_SOURCE_DIR}")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D OUTPUT_ROOT=${NPU_COMPILER_BINARY_DIR}")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D THREADING=${THREADING}")

if (ANDROID)
# First build native tools required for NPU compiler
set(NPU_COMPILER_NATIVE_TOOLS_BUILD npu_compiler_native_tools_build)
set(NPU_COMPILER_NATIVE_TOOLS_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/build_npu_compiler_native_tools)

ExternalProject_Add(
${NPU_COMPILER_NATIVE_TOOLS_BUILD}
DOWNLOAD_COMMAND ""
DEPENDS npu_compiler_source ${NPU_COMPILER_BUILD_DEPENDS}
SOURCE_DIR ${NPU_COMPILER_OPENVINO_SOURCE_DIR}
BINARY_DIR ${NPU_COMPILER_NATIVE_TOOLS_BINARY_DIR}
CMAKE_ARGS
${NPU_COMPILER_CMAKE_ARGS}
BUILD_COMMAND
${CMAKE_COMMAND}
--build ${NPU_COMPILER_NATIVE_TOOLS_BINARY_DIR}
--target npureg-tblgen mlir-headers mlir-generic-headers mlir-linalg-ods-yaml-gen flatc
--parallel ${PARALLEL_PROCESSES}
INSTALL_COMMAND
mkdir -p ${NPU_COMPILER_BINARY_DIR}/build-modules/npu_compiler/thirdparty/llvm-project/llvm/NATIVE &&
cp -r ${NPU_COMPILER_NATIVE_TOOLS_BINARY_DIR}/build-modules/npu_compiler/thirdparty/llvm-project/llvm/bin ${NPU_COMPILER_BINARY_DIR}/build-modules/npu_compiler/thirdparty/llvm-project/llvm/NATIVE/
BYPRODUCTS
${NPU_COMPILER_BINARY_DIR}/bin/intel64/Release/flatc
${NPU_COMPILER_BINARY_DIR}/bin/intel64/Release/npureg-tblgen
)

# Android specific settings
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ANDROID_ABI=${ANDROID_ABI}")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ANDROID_PLATFORM=${ANDROID_PLATFORM}")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D ANDROID_STL=${ANDROID_STL}")
list(APPEND NPU_COMPILER_CMAKE_ARGS "-D CMAKE_CXX_FLAGS_INIT='-frtti'")
endif()

list(APPEND NPU_COMPILER_CMAKE_ARGS "-D CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")

ExternalProject_Add(
npu_compiler_build
DOWNLOAD_COMMAND ""
DEPENDS npu_compiler_source ${NPU_COMPILER_BUILD_DEPENDS}
DEPENDS npu_compiler_source ${NPU_COMPILER_BUILD_DEPENDS} ${NPU_COMPILER_NATIVE_TOOLS_BUILD}
SOURCE_DIR ${NPU_COMPILER_OPENVINO_SOURCE_DIR}
BINARY_DIR ${NPU_COMPILER_BINARY_DIR}
CMAKE_ARGS
-D CMAKE_BUILD_TYPE=Release
-D CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
-D BUILD_COMPILER_FOR_DRIVER=ON
-D BUILD_SHARED_LIBS=OFF
# CLANG_FORMAT and NCC_STYLE is set to OFF to avoid LLVMDemangle doubled target issue
-D ENABLE_CLANG_FORMAT=OFF
-D ENABLE_CLANG_TIDY=OFF
-D ENABLE_NCC_STYLE=OFF
# Copied from "how_to_build_driver_compiler" document
-D ENABLE_AUTO=OFF
-D ENABLE_AUTO_BATCH=OFF
-D ENABLE_BLOB_DUMP=OFF
-D ENABLE_FUNCTIONAL_TESTS=OFF
-D ENABLE_HETERO=OFF
-D ENABLE_INTEL_CPU=OFF
-D ENABLE_INTEL_GPU=OFF
-D ENABLE_JS=OFF
-D ENABLE_MULTI=OFF
-D ENABLE_INTEL_NPU_PROTOPIPE=OFF
-D ENABLE_OV_IR_FRONTEND=ON
-D ENABLE_OV_JAX_FRONTEND=OFF
-D ENABLE_OV_ONNX_FRONTEND=OFF
-D ENABLE_OV_PADDLE_FRONTEND=OFF
-D ENABLE_OV_PYTORCH_FRONTEND=OFF
-D ENABLE_OV_TF_FRONTEND=OFF
-D ENABLE_OV_TF_LITE_FRONTEND=OFF
-D ENABLE_PROXY=OFF
-D ENABLE_SAMPLES=OFF
-D ENABLE_TBBBIND_2_5=OFF
-D ENABLE_TEMPLATE=OFF
-D ENABLE_TESTS=OFF
# WA in case libgflags is installed in system
-D gflags_DIR=${CMAKE_CURRENT_SOURCE_DIR}/openvino_modules
-D OPENVINO_EXTRA_MODULES=${NPU_COMPILER_SOURCE_DIR}
-D OUTPUT_ROOT=${NPU_COMPILER_BINARY_DIR}
-D THREADING=${THREADING}
${NPU_COMPILER_CMAKE_ARGS}
BUILD_COMMAND
${CMAKE_COMMAND}
--build ${NPU_COMPILER_BINARY_DIR}
--config Release
--target compilerTest profilingTest vpuxCompilerL0Test loaderTest
--parallel ${PARALLEL_PROCESSES}
INSTALL_COMMAND
Expand Down
2 changes: 0 additions & 2 deletions compiler/openvino.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#
# Copyright (C) 2024-2025 Intel Corporation
#
# SPDX-License-Identifier: MIT
#

if (ENABLE_OPENVINO_PACKAGE)
include(openvino_build.cmake)
Expand Down
12 changes: 2 additions & 10 deletions compiler/openvino_build.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# Copyright 2022-2025 Intel Corporation.
# Copyright (C) 2022-2025 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
# provided to you ("License"). Unless the License provides otherwise, you may
# not use, modify, copy, publish, distribute, disclose or transmit this
# software or the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in
# the License.
# SPDX-License-Identifier: MIT

if(NOT ENABLE_OPENVINO_PACKAGE)
return()
Expand Down
12 changes: 2 additions & 10 deletions compiler/openvino_modules/gflags-config.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# Copyright 2022-2023 Intel Corporation.
# Copyright (C) 2022-2025 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
# provided to you ("License"). Unless the License provides otherwise, you may
# not use, modify, copy, publish, distribute, disclose or transmit this
# software or the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in
# the License.
# SPDX-License-Identifier: MIT

message(WARNING "Ignoring system gflags")
Binary file modified firmware/bin/vpu_37xx_v1.bin
Binary file not shown.
Binary file modified firmware/bin/vpu_40xx_v1.bin
Binary file not shown.
12 changes: 9 additions & 3 deletions firmware/include/api/vpu_jsm_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
/*
* Minor version changes when API backward compatibility is preserved.
*/
#define VPU_JSM_API_VER_MINOR 32
#define VPU_JSM_API_VER_MINOR 33

/*
* API header changed (field names, documentation, formatting) but API itself has not been changed
*/
#define VPU_JSM_API_VER_PATCH 8
#define VPU_JSM_API_VER_PATCH 0

/*
* Index in the API version table
Expand Down Expand Up @@ -76,8 +76,11 @@
#define VPU_JSM_STATUS_PREEMPTED_MID_INFERENCE 0xDU
/* Job status returned when the job was preempted mid-command */
#define VPU_JSM_STATUS_PREEMPTED_MID_COMMAND 0xDU
/* Range of status codes that require engine reset */
#define VPU_JSM_STATUS_ENGINE_RESET_REQUIRED_MIN 0xEU
#define VPU_JSM_STATUS_MVNCI_CONTEXT_VIOLATION_HW 0xEU
#define VPU_JSM_STATUS_MVNCI_PREEMPTION_TIMED_OUT 0xFU
#define VPU_JSM_STATUS_ENGINE_RESET_REQUIRED_MAX 0x1FU

/*
* Host <-> VPU IPC channels.
Expand Down Expand Up @@ -406,7 +409,10 @@ struct vpu_hws_native_fence_log_header {
struct {
/** Index of the first free entry in buffer. */
uint32_t first_free_entry_idx;
/** Incremented each time NPU wraps around the buffer to write next entry. */
/**
* Incremented whenever the NPU wraps around the buffer and writes
* to the first entry again.
*/
uint32_t wraparound_count;
};
/** Field allowing atomic update of both fields above. */
Expand Down
4 changes: 2 additions & 2 deletions firmware/include/api/vpu_nce_hw_40xx.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: MIT */
/*
* Copyright (c) 2022-2023, Intel Corporation.
* Copyright (c) 2022-2025, Intel Corporation.
*/

#ifndef VPU_NCE_HW_40XX_H
Expand Down Expand Up @@ -434,7 +434,7 @@ typedef struct {
uint32_t ppe_clk_en : 1;
uint32_t odu_stat_en : 1;
uint32_t idu_stat_en : 1;
uint32_t reserved_1 : 1;
uint32_t noc_clk_en : 1;
uint32_t odu_stat_clr_mode : 1;
uint32_t idu_stat_clr_mode : 1;
uint32_t se_only_en : 1;
Expand Down
Loading