-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable AVX, FMA and F16C features. This appears to be when these processor features were introduced: - AVX - Intel Sandy Bridge (Q1 2011) - Intel Celeron and Pentium Tiger Lake (Q3 2020) - AVX2 - Intel Haswell (2013) - AMD (not supported as of April 2022?) - FMA3 - Intel Broadwell (2014) - AMD Piledriver (2014) - F16C - Intel Ivy Bridge (2013) - AMD Bulldozer (Q4 2011)
- Loading branch information
1 parent
2e41b0b
commit 8fa4abe
Showing
6 changed files
with
109 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# whispercpp-noavx | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO ggerganov/whisper.cpp | ||
REF "v${VERSION}" | ||
SHA512 17e0485fb93fdea1a89f584a64db35f05371e0b8710a539f0dffca30bd3a2fff44c72ea754556566ca3cc55415b1e8f2bb868665437f5c93b9ce666b4fe53fb3 | ||
HEAD_REF master | ||
) | ||
|
||
if(APPLE) | ||
vcpkg_cmake_configure( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
OPTIONS | ||
-DWHISPER_METAL_EMBED_LIBRARY=ON | ||
-DWHISPER_METAL_NDEBUG=ON | ||
) | ||
else() | ||
vcpkg_cmake_configure( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
OPTIONS | ||
-DWHISPER_NO_AVX=ON | ||
-DWHISPER_NO_AVX2=ON | ||
-DWHISPER_NO_FMA=ON | ||
-DWHISPER_NO_F16C=ON | ||
) | ||
endif() | ||
|
||
vcpkg_install_cmake() | ||
vcpkg_copy_pdbs() | ||
|
||
# Store all .libs in the root lib directory. For Windows SHARED builds, these will be import libraries (not static libs). | ||
file(GLOB_RECURSE LIB_FILES "${CURRENT_PACKAGES_DIR}/lib/static/*.lib") | ||
foreach(LIB_FILE ${LIB_FILES}) | ||
get_filename_component(LIB_NAME ${LIB_FILE} NAME) | ||
file(RENAME ${LIB_FILE} "${CURRENT_PACKAGES_DIR}/lib/${LIB_NAME}") | ||
endforeach() | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/static") | ||
|
||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "whispercpp-noavx", | ||
"version": "1.6.2", | ||
"port-version": 1, | ||
"description": "A high-performance inference of OpenAI's Whisper automatic speech recognition (ASR) model.", | ||
"homepage": "https://github.com/ggerganov/whisper.cpp", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
param ( | ||
[Parameter(Mandatory=$true)][string]$BuildArtifactsPath, | ||
[Parameter(Mandatory=$false)][string]$PackageAndFeatures, | ||
[Parameter(Mandatory=$false)][string]$LinkType, | ||
[Parameter(Mandatory=$false)][string]$BuildType, | ||
[Parameter(Mandatory=$false)][string]$ModulesRoot | ||
) | ||
|
||
$moduleName = "Build" | ||
if(-not (Get-Module -Name $moduleName)) { | ||
Import-Module "$ModulesRoot/$moduleName" -Force -DisableNameChecking | ||
} | ||
|
||
if ((Get-IsOnMacOS)) { | ||
Remove-DylibSymlinks -BuildArtifactsPath $BuildArtifactsPath | ||
} | ||
elseif((Get-IsOnWindowsOS)) { | ||
Update-VersionInfoForDlls -buildArtifactsPath $buildArtifactsPath -versionInfoJsonPath "$PSScriptRoot/version-info.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"files": [ | ||
{ | ||
"filename": "bin/whisper.dll", | ||
"fileDescription": "High-performance inference of OpenAI's Whisper automatic speech recognition (ASR) model. This dll is built without AVX support.", | ||
"fileVersion": "1.6.2", | ||
"productName": "WhisperCpp", | ||
"productVersion": "1.6.2", | ||
"copyright": "Copyright (c) 2023-2024 The ggml authors" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters