Merge remote-tracking branch 'origin/master' into feature/fix-metal

This commit is contained in:
hlhr202 2024-05-29 10:25:41 +08:00
commit 3f27c17fdf
9 changed files with 1882 additions and 256 deletions

View file

@ -127,7 +127,7 @@ fn main() {
}
if cfg!(feature = "cuda") {
config.define("WHISPER_CUBLAS", "ON");
config.define("WHISPER_CUDA", "ON");
}
if cfg!(feature = "openblas") {
@ -152,6 +152,13 @@ fn main() {
config.define("CMAKE_BUILD_TYPE", "RelWithDebInfo");
}
// Allow passing any WHISPER cmake flag
for (key, value) in env::vars() {
if key.starts_with("WHISPER_") && key != "WHISPER_DONT_GENERATE_BINDINGS" {
config.define(&key, &value);
}
}
let destination = config.build();
if target.contains("window") && !target.contains("gnu") {