Add ability to skip oneapi generate

This follows the same pattern for cuda and rocm to allow
disabling the build even when we detect the dependent libraries
This commit is contained in:
Daniel Hiltgen
2024-06-07 08:32:49 -07:00
parent ce0dc33cb8
commit ab8c929e20
2 changed files with 2 additions and 2 deletions

View File

@@ -290,7 +290,7 @@ function build_cuda() {
}
function build_oneapi() {
if ((-not "${env:OLLAMA_SKIP_CUDA_GENERATE}") -and ("${env:ONEAPI_ROOT}")) {
if ((-not "${env:OLLAMA_SKIP_ONEAPI_GENERATE}") -and ("${env:ONEAPI_ROOT}")) {
# Get oneAPI version
$script:ONEAPI_VERSION = icpx --version
$script:ONEAPI_VERSION = [regex]::Match($script:ONEAPI_VERSION, '(?<=oneAPI DPC\+\+/C\+\+ Compiler )(?<version>\d+\.\d+\.\d+)').Value