Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whisper Redesigned Solution #23549

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f314287
Add support for creating optimized whisper ONNX models without beam s…
kunal-vaishnavi Apr 26, 2024
6a44f72
Fix incorrect dynamic axes labels
kunal-vaishnavi Apr 26, 2024
58ec5eb
Fix fusion breaks for OpenAI implementation of Whisper
kunal-vaishnavi May 3, 2024
4c228ea
Merge branch 'main' into kvaishnavi/whisper-separate-export
kunal-vaishnavi Jun 12, 2024
dd20876
Merge branch 'main' into kvaishnavi/whisper-separate-export
kunal-vaishnavi Jul 23, 2024
b13cb22
Comment out DMMHA case temporarily
kunal-vaishnavi Jul 23, 2024
31db1a0
Replace MHA with DMMHA
kunal-vaishnavi Jul 29, 2024
3b92432
Merge branch 'main' into kvaishnavi/whisper-separate-export
kunal-vaishnavi Aug 26, 2024
7bb79f3
Debugging beam search output
kunal-vaishnavi Sep 6, 2024
14b7e77
Initial commit for new export
kunal-vaishnavi Oct 22, 2024
fa345fe
Add parity check after export and optimization
kunal-vaishnavi Oct 22, 2024
e050dea
Fix multiple attention kernel invocations
kunal-vaishnavi Nov 2, 2024
bf87062
Make output Q*K values optional
kunal-vaishnavi Nov 4, 2024
17fa0ab
Fix batch size check for cache indirection
kunal-vaishnavi Nov 6, 2024
52aeb58
Save checkpoint for working solution
kunal-vaishnavi Nov 15, 2024
240fe3b
Clean up code
kunal-vaishnavi Nov 17, 2024
ae98085
Fix string dumping
kunal-vaishnavi Nov 20, 2024
3d2c8fe
Fix out_qk dtype issue for half input case.
mindest Nov 20, 2024
287151f
Remove type cast for output QK
kunal-vaishnavi Nov 21, 2024
0805d1d
Enable release mode build
kunal-vaishnavi Dec 4, 2024
b629903
Make QK output dtype independent of attention dtype
kunal-vaishnavi Dec 9, 2024
648b389
Add batched jump times export
kunal-vaishnavi Dec 9, 2024
a6c6ee8
Get batched jump times ONNX model with parity check
kunal-vaishnavi Dec 12, 2024
c0a6ce4
Save checkpoint for working solution
kunal-vaishnavi Dec 21, 2024
008eeb9
Merge branch 'main' into kvaishnavi/whisper-separate-export
kunal-vaishnavi Dec 22, 2024
158d0a8
Fix build after merge
kunal-vaishnavi Dec 22, 2024
02cb5be
Fix model with beam search op
kunal-vaishnavi Dec 23, 2024
2acd593
Get model impl and beam search op export combinations working
kunal-vaishnavi Dec 25, 2024
612eb0c
Enable separate export of encoder and decoder init
kunal-vaishnavi Dec 25, 2024
f2d78fd
Add tests for multiple export types to CIs
kunal-vaishnavi Dec 25, 2024
cb93517
Update folder and file names in Whisper README
kunal-vaishnavi Dec 25, 2024
6da11ec
Add FP32 CPU DMMHA support
kunal-vaishnavi Dec 28, 2024
9640736
Add unit tests
kunal-vaishnavi Jan 8, 2025
75a342a
Merge branch 'main' into kvaishnavi/whisper-separate-export
kunal-vaishnavi Jan 24, 2025
7fe6b05
Change debug message for PrepareQkv
kunal-vaishnavi Jan 25, 2025
8620168
Fix seqlens_k after merge
kunal-vaishnavi Jan 29, 2025
b0a732b
Merge branch 'main' into kvaishnavi/whisper-separate-export
kunal-vaishnavi Jan 29, 2025
23808f7
Add changes suggested by linter
kunal-vaishnavi Jan 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Prev Previous commit
Next Next commit
Merge branch 'main' into kvaishnavi/whisper-separate-export
kunal-vaishnavi committed Jan 24, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 75a342ad802ea1df1d66a6a975f527542f84242a
19 changes: 14 additions & 5 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
@@ -105,7 +105,7 @@ jobs:
--use_xnnpack \
--use_binskim_compliant_compile_flags \
--ios \
--apple_deploy_target=13.0 \
--apple_deploy_target=15.1 \
--apple_sysroot=iphonesimulator \
--osx_arch=${{ matrix.target_arch }}

@@ -117,17 +117,21 @@ jobs:
with:
python-version: ${{ env.python_version }}

- name: "Run Homebrew"
run: brew install autoconf automake autoconf-archive

- name: "Run vcpkg(x64-osx)"
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: "${{ runner.temp }}/vcpkg"
vcpkgGitCommitId: "1de2026f28ead93ff1773e6e680387643e914ea1" # 2024.07.12
runVcpkgInstall: true
vcpkgGitCommitId: "b322364f06308bdd24823f9d8f03fe0cc86fd46f" # 2024.12.16
runVcpkgInstall: true # vcpkg install --x-manifest-root cmake --x-install-root .build --overlay-triplets cmake/vcpkg-triplets/default
vcpkgJsonGlob: "cmake/vcpkg.json"
vcpkgConfigurationJsonGlob: "cmake/vcpkg-configuration.json"
env:
VCPKG_INSTALLED_DIR: "${{ github.workspace }}/.build"
VCPKG_DEFAULT_TRIPLET: "x64-osx"
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets/default"
# VCPKG_BINARY_SOURCES: "default" # https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching

- name: "Run compile_schema.py"
@@ -163,19 +167,22 @@ jobs:
--cmake_extra_defines "VCPKG_TARGET_TRIPLET=x64-osx" \
--cmake_extra_defines "VCPKG_INSTALLED_DIR:PATH=${{ github.workspace }}/.build" \
--cmake_extra_defines "VCPKG_INSTALL_OPTIONS=--x-feature=tests"
env:
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets/default"
shell: bash

- name: "Run vcpkg(arm64-osx)"
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: "${{ runner.temp }}/vcpkg"
vcpkgGitCommitId: "1de2026f28ead93ff1773e6e680387643e914ea1" # 2024.07.12
runVcpkgInstall: true
doNotUpdateVcpkg: true
runVcpkgInstall: true # vcpkg install --x-manifest-root cmake --x-install-root .build --overlay-triplets cmake/vcpkg-triplets/default
vcpkgJsonGlob: "cmake/vcpkg.json"
vcpkgConfigurationJsonGlob: "cmake/vcpkg-configuration.json"
env:
VCPKG_INSTALLED_DIR: "${{ github.workspace }}/.build"
VCPKG_DEFAULT_TRIPLET: "arm64-osx"
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets/default"
# VCPKG_BINARY_SOURCES: "default" # https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching

- name: "Run build.py(arm64-osx)"
@@ -193,6 +200,8 @@ jobs:
--cmake_extra_defines "VCPKG_TARGET_TRIPLET=arm64-osx" \
--cmake_extra_defines "VCPKG_INSTALLED_DIR:PATH=${{ github.workspace }}/.build" \
--cmake_extra_defines "VCPKG_INSTALL_OPTIONS=--x-feature=tests"
env:
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets/default"
shell: bash

Objective-C-StaticAnalysis:
11 changes: 9 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -56,12 +56,14 @@ jobs:
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: "C:/vcpkg" # use VCPKG_INSTALLATION_ROOT of the image
runVcpkgInstall: true
vcpkgGitCommitId: "b322364f06308bdd24823f9d8f03fe0cc86fd46f" # 2024.12.16
runVcpkgInstall: true # vcpkg install --x-manifest-root cmake --x-install-root .build --overlay-triplets cmake/vcpkg-triplets/default
vcpkgJsonGlob: "cmake/vcpkg.json"
vcpkgConfigurationJsonGlob: "cmake/vcpkg-configuration.json"
env:
VCPKG_INSTALLED_DIR: "${{ github.workspace }}/.build"
VCPKG_DEFAULT_TRIPLET: "x64-windows"
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets/default"
# VCPKG_BINARY_SOURCES: "default" # https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching

- name: "Run compile_schema.py"
@@ -99,19 +101,22 @@ jobs:
--cmake_extra_defines "VCPKG_TARGET_TRIPLET=x64-windows" `
--cmake_extra_defines "VCPKG_INSTALLED_DIR:PATH=${{ github.workspace }}/.build" `
--cmake_extra_defines "VCPKG_INSTALL_OPTIONS=--x-feature=tests"
env:
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets/default"
shell: pwsh

- name: "Run vcpkg(arm64-windows)"
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: "C:/vcpkg" # use VCPKG_INSTALLATION_ROOT of the image
doNotUpdateVcpkg: true
runVcpkgInstall: true
runVcpkgInstall: true # vcpkg install --x-manifest-root cmake --x-install-root .build --overlay-triplets cmake/vcpkg-triplets/default
vcpkgJsonGlob: "cmake/vcpkg.json"
vcpkgConfigurationJsonGlob: "cmake/vcpkg-configuration.json"
env:
VCPKG_INSTALLED_DIR: "${{ github.workspace }}/.build"
VCPKG_DEFAULT_TRIPLET: "arm64-windows"
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets/default"
# VCPKG_BINARY_SOURCES: "default" # https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching

- name: "Run build.py(arm64-windows)"
@@ -128,4 +133,6 @@ jobs:
--cmake_extra_defines "VCPKG_TARGET_TRIPLET=arm64-windows" `
--cmake_extra_defines "VCPKG_INSTALLED_DIR:PATH=${{ github.workspace }}/.build" `
--cmake_extra_defines "VCPKG_INSTALL_OPTIONS=--x-feature=tests"
env:
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets/default"
shell: pwsh
4 changes: 2 additions & 2 deletions .lintrunner.toml
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ is_formatter = true


[[linter]]
code = 'BLACK-ISORT'
code = 'RUFF-FORMAT'
include_patterns = [
'**/*.py',
]
@@ -76,7 +76,7 @@ command = [
'-m',
'lintrunner_adapters',
'run',
'black_isort_linter',
'ruff_format_linter',
'--',
'@{{PATHSFILE}}'
]
12 changes: 6 additions & 6 deletions cgmanifests/generated/cgmanifest.json
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "595228d99e3977ac27cb79d5963adda262af99ad",
"commitHash": "b8baa8446686496da4cc8fda09f2b6fe65c2a02c",
"repositoryUrl": "https://github.com/onnx/onnx.git"
},
"comments": "git submodule at cmake/external/onnx"
@@ -136,7 +136,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "309b75c9e56e0a674bf78d59872ce131f814dfb6",
"commitHash": "fe98e0b93565382648129271381c14d6205255e3",
"repositoryUrl": "https://github.com/google/XNNPACK.git"
},
"comments": "googlexnnpack"
@@ -226,8 +226,8 @@
"component": {
"type": "git",
"git": {
"commitHash": "4fe0e1e183925bf8cfa6aae24237e724a96479b8",
"repositoryUrl": "https://github.com/Maratyszcza/pthreadpool.git"
"commitHash": "4e80ca24521aa0fb3a746f9ea9c3eaa20e9afbb0",
"repositoryUrl": "https://github.com/google/pthreadpool.git"
},
"comments": "pthreadpool"
}
@@ -246,7 +246,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "ca678952a9a8eaa6de112d154e8e104b22f9ab3f",
"commitHash": "8a1772a0c5c447df2d18edf33ec4603a8c9c04a6",
"repositoryUrl": "https://github.com/pytorch/cpuinfo.git"
},
"comments": "pytorch_cpuinfo"
@@ -306,7 +306,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "94142d8391c9791ec71c38336436319a2d4ac7a0",
"commitHash": "f3f6caa6e8adb420e005ec41c6fefc8d75affb6e",
"repositoryUrl": "https://github.com/microsoft/onnxruntime-extensions.git"
},
"comments": "extensions"
80 changes: 76 additions & 4 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -93,6 +93,7 @@ option(onnxruntime_USE_OPENVINO "Build with OpenVINO support" OFF)
option(onnxruntime_USE_COREML "Build with CoreML support" OFF)
option(onnxruntime_USE_NNAPI_BUILTIN "Build with builtin NNAPI lib for Android NNAPI support" OFF)
option(onnxruntime_USE_QNN "Build with QNN support" OFF)
option(onnxruntime_BUILD_QNN_EP_STATIC_LIB "Build with QNN EP as a static library" OFF)
option(onnxruntime_USE_SNPE "Build with SNPE support" OFF)
option(onnxruntime_USE_RKNPU "Build with RKNPU support" OFF)
option(onnxruntime_USE_DNNL "Build with DNNL support" OFF)
@@ -371,6 +372,70 @@ if (onnxruntime_USE_ROCM)
set(onnxruntime_HIPIFY_PERL ${HIPIFY_PERL_PATH}/hipify-perl)
endif()

# replicate strategy used by pytorch to get ROCM_VERSION
# https://github.com/pytorch/pytorch/blob/1a10751731784942dcbb9c0524c1369a29d45244/cmake/public/LoadHIP.cmake#L45-L109
# with modification
set(ROCM_INCLUDE_DIRS "${onnxruntime_ROCM_HOME}/include")
set(PROJECT_RANDOM_BINARY_DIR "${CMAKE_BINARY_DIR}")
set(file "${CMAKE_BINARY_DIR}/detect_rocm_version.cc")

# Find ROCM version for checks
# ROCM 5.0 and later will have header api for version management
if(EXISTS ${ROCM_INCLUDE_DIRS}/rocm_version.h)
file(WRITE ${file} ""
"#include <rocm_version.h>\n"
)
elseif(EXISTS ${ROCM_INCLUDE_DIRS}/rocm-core/rocm_version.h)
file(WRITE ${file} ""
"#include <rocm-core/rocm_version.h>\n"
)
else()
message(FATAL_ERROR "********************* rocm_version.h couldnt be found ******************\n")
endif()

file(APPEND ${file} ""
"#include <cstdio>\n"

"#ifndef ROCM_VERSION_PATCH\n"
"#define ROCM_VERSION_PATCH 0\n"
"#endif\n"
"#define STRINGIFYHELPER(x) #x\n"
"#define STRINGIFY(x) STRINGIFYHELPER(x)\n"
"int main() {\n"
" printf(\"%d.%d.%s\", ROCM_VERSION_MAJOR, ROCM_VERSION_MINOR, STRINGIFY(ROCM_VERSION_PATCH));\n"
" return 0;\n"
"}\n"
)

try_run(run_result compile_result ${PROJECT_RANDOM_BINARY_DIR} ${file}
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${ROCM_INCLUDE_DIRS}"
RUN_OUTPUT_VARIABLE rocm_version_from_header
COMPILE_OUTPUT_VARIABLE output_var
)
# We expect the compile to be successful if the include directory exists.
if(NOT compile_result)
message(FATAL_ERROR "ROCM: Couldn't determine version from header: " ${output_var})
endif()
message(STATUS "ROCM: Header version is: " ${rocm_version_from_header})
set(ROCM_VERSION_DEV_RAW ${rocm_version_from_header})

string(REGEX MATCH "^([0-9]+)\.([0-9]+)\.([0-9]+).*$" ROCM_VERSION_DEV_MATCH ${ROCM_VERSION_DEV_RAW})

if (ROCM_VERSION_DEV_MATCH)
set(ROCM_VERSION_DEV_MAJOR ${CMAKE_MATCH_1})
set(ROCM_VERSION_DEV_MINOR ${CMAKE_MATCH_2})
set(ROCM_VERSION_DEV_PATCH ${CMAKE_MATCH_3})
set(ROCM_VERSION_DEV "${ROCM_VERSION_DEV_MAJOR}.${ROCM_VERSION_DEV_MINOR}.${ROCM_VERSION_DEV_PATCH}")
math(EXPR ROCM_VERSION_DEV_INT "(${ROCM_VERSION_DEV_MAJOR}*10000) + (${ROCM_VERSION_DEV_MINOR}*100) + ${ROCM_VERSION_DEV_PATCH}")
else()
message(FATAL_ERROR "Cannot determine ROCm version string")
endif()
message("\n***** ROCm version from rocm_version.h ****\n")
message("ROCM_VERSION_DEV: ${ROCM_VERSION_DEV}")
message("ROCM_VERSION_DEV_MAJOR: ${ROCM_VERSION_DEV_MAJOR}")
message("ROCM_VERSION_DEV_MINOR: ${ROCM_VERSION_DEV_MINOR}")
message("ROCM_VERSION_DEV_PATCH: ${ROCM_VERSION_DEV_PATCH}")
message("ROCM_VERSION_DEV_INT: ${ROCM_VERSION_DEV_INT}")
message("\n***** HIP LANGUAGE CONFIG INFO ****\n")
message("CMAKE_HIP_COMPILER: ${CMAKE_HIP_COMPILER}")
message("CMAKE_HIP_ARCHITECTURES: ${CMAKE_HIP_ARCHITECTURES}")
@@ -534,6 +599,11 @@ if (onnxruntime_EXTENDED_MINIMAL_BUILD AND NOT onnxruntime_MINIMAL_BUILD)
set(onnxruntime_MINIMAL_BUILD ON)
endif()

set(REPO_ROOT ${PROJECT_SOURCE_DIR}/..)
set(ONNXRUNTIME_ROOT ${PROJECT_SOURCE_DIR}/../onnxruntime)
set(ORTTRAINING_ROOT ${PROJECT_SOURCE_DIR}/../orttraining)
set(ORTTRAINING_SOURCE_DIR ${ORTTRAINING_ROOT}/orttraining)

include(adjust_global_compile_flags.cmake)

if (APPLE)
@@ -565,10 +635,6 @@ if (NOT MSVC AND NOT (CMAKE_SYSTEM_NAME STREQUAL "iOS"))
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
endif()

set(REPO_ROOT ${PROJECT_SOURCE_DIR}/..)
set(ONNXRUNTIME_ROOT ${PROJECT_SOURCE_DIR}/../onnxruntime)
set(ORTTRAINING_ROOT ${PROJECT_SOURCE_DIR}/../orttraining)
set(ORTTRAINING_SOURCE_DIR ${ORTTRAINING_ROOT}/orttraining)

file (STRINGS "${REPO_ROOT}/VERSION_NUMBER" ORT_VERSION)

@@ -679,6 +745,7 @@ else()
check_cxx_compiler_flag(-Wdeprecated-builtins HAS_DEPRECATED_BUILTINS)
check_cxx_compiler_flag(-Wdeprecated-copy HAS_DEPRECATED_COPY)
check_cxx_compiler_flag(-Wdeprecated-declarations HAS_DEPRECATED_DECLARATIONS)
check_cxx_compiler_flag(-Wdeprecated-literal-operator HAS_DEPRECATED_LITERAL_OPERATOR)
check_cxx_compiler_flag(-Wdeprecated-this-capture HAS_DEPRECATED_THIS_CAPTURE)
check_cxx_compiler_flag(-Wenum-constexpr-conversion HAS_ENUM_CONSTEXPR_CONVERSION)
check_cxx_compiler_flag(-Wformat-truncation HAS_FORMAT_TRUNCATION)
@@ -735,6 +802,9 @@ else()
if (HAS_DEPRECATED_BUILTINS)
list(APPEND ORT_WARNING_FLAGS -Wno-deprecated-builtins)
endif()
if (HAS_DEPRECATED_LITERAL_OPERATOR)
list(APPEND ORT_WARNING_FLAGS -Wno-deprecated-literal-operator)
endif()
#see:https://reviews.llvm.org/D131307
#It was intended that the 'enum-constexpr-conversion' type warnings can not be silenced by -w
if(HAS_ENUM_CONSTEXPR_CONVERSION AND NOT Protobuf_FOUND)
@@ -1138,6 +1208,8 @@ function(onnxruntime_set_compile_flags target_name)
# because we may mix gcc and hipclang
set(ORT_HIP_WARNING_FLAGS ${ORT_WARNING_FLAGS})
list(REMOVE_ITEM ORT_HIP_WARNING_FLAGS -Wno-nonnull-compare)
# Unsupported by Clang 18 yet.
list(REMOVE_ITEM ORT_HIP_WARNING_FLAGS -Wno-dangling-reference)

# float16.h:90:12: error: ‘tmp’ is used uninitialized
list(APPEND ORT_HIP_WARNING_FLAGS -Wno-uninitialized)
1 change: 1 addition & 0 deletions cmake/CMakePresets.json
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@
"VCPKG_INSTALLED_DIR": "${sourceParentDir}/.build"
},
"environment": {
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/vcpkg-triplets",
"VCPKG_FEATURE_FLGAS": "manifests,versions"
}
},
17 changes: 8 additions & 9 deletions cmake/adjust_global_compile_flags.cmake
Original file line number Diff line number Diff line change
@@ -12,15 +12,6 @@ if (ANDROID)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,max-page-size=16384")
endif()

# Suggested by https://gitlab.kitware.com/cmake/cmake/-/issues/20132
# MacCatalyst is not well supported in CMake
# The error that can emerge without this flag can look like:
# "clang : error : overriding '-mmacosx-version-min=11.0' option with '-target x86_64-apple-ios14.0-macabi' [-Werror,-Woverriding-t-option]"
if (PLATFORM_NAME STREQUAL "macabi")
add_compile_options(-Wno-overriding-t-option)
add_link_options(-Wno-overriding-t-option)
endif()

# Enable space optimization for gcc/clang
# Cannot use "-ffunction-sections -fdata-sections" if we enable bitcode (iOS)
if (NOT MSVC AND NOT onnxruntime_ENABLE_BITCODE)
@@ -338,6 +329,10 @@ else()
# suppress warnings from flatbuffers
string(APPEND CMAKE_CXX_FLAGS " -Wno-restrict ")
string(APPEND CMAKE_C_FLAGS " -Wno-restrict ")
if(onnxruntime_USE_XNNPACK)
# https://github.com/google/XNNPACK/issues/7650
string(APPEND CMAKE_C_FLAGS " -Wno-incompatible-pointer-types ")
endif()
endif()
# Check support for AVX and f16c.
include(CheckCXXCompilerFlag)
@@ -374,3 +369,7 @@ if (WIN32)
elseif(LINUX)
add_compile_definitions("_GNU_SOURCE")
endif()

if (onnxruntime_USE_EXTENSIONS)
include_directories(${REPO_ROOT}/include/onnxruntime/core/session)
endif()
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.