Revert "Add OpenVINO support"

This reverts commit 5c140c14
This commit is contained in:
Niko 2023-10-06 21:09:23 -06:00
parent e6cbc75430
commit d6da605de1
No known key found for this signature in database
GPG key ID: 3861E636EA1E0E2B
7 changed files with 3 additions and 130 deletions

View file

@ -33,7 +33,6 @@ include = [
coreml = []
cuda = []
opencl = []
openvino = []
[dependencies]

View file

@ -7,43 +7,6 @@ use std::env;
use std::path::PathBuf;
fn main() {
// Fail-fast test for OpenVINO
#[cfg(feature = "openvino")]
{
if let Ok(openvino_dir) = env::var("OpenVINO_DIR") {
// see if we can find OpenVINOConfig.cmake
let openvino_config_path = PathBuf::from(&openvino_dir).join("OpenVINOConfig.cmake");
if !openvino_config_path.exists() {
panic!(
"Couldn't find OpenVINOConfig.cmake in OpenVINO_DIR. Please set it to the path where `OpenVINOConfig.cmake` can be found.\n\
On Arch Linux, if you installed the AUR package, this path is `/opt/intel/openvino/runtime/cmake/`.\n\
Note the `/cmake/` at the end of the path."
);
}
} else {
panic!(
"Couldn't find the OpenVINO_DIR environment variable. Please set it to the path where `OpenVINOConfig.cmake` can be found.\n\
On Arch Linux, if you installed the AUR package, this path is `/opt/intel/openvino/runtime/cmake/`."
);
}
if let Ok(openvino_so_dir) = env::var("OpenVINO_SO_DIR") {
// check if `libopenvino.so` exists in the directory
let openvino_so_path = PathBuf::from(&openvino_so_dir).join("libopenvino.so");
if !openvino_so_path.exists() {
panic!(
"Couldn't find libopenvino.so in OpenVINO_SO_DIR. Please set it to the path where `libopenvino.so` can be found.\n\
On Arch Linux, if you installed the AUR package, this path is `/opt/intel/openvino/runtime/lib/intel64/`."
);
}
} else {
panic!(
"Couldn't find the OpenVINO_SO_DIR environment variable. Please set it to the path where `libopenvino.so` can be found.\n\
On Arch Linux, if you installed the AUR package, this path is `/opt/intel/openvino/runtime/lib/intel64/`."
)
}
}
let target = env::var("TARGET").unwrap();
// Link C++ standard library
if let Some(cpp_stdlib) = get_cpp_link_stdlib(&target) {
@ -84,11 +47,6 @@ fn main() {
}
}
}
#[cfg(feature = "openvino")]
{
println!("cargo:rustc-link-lib=openvino");
println!("cargo:rustc-link-search={}", env::var("OpenVINO_SO_DIR").unwrap());
}
println!("cargo:rerun-if-changed=wrapper.h");
if env::var("WHISPER_DONT_GENERATE_BINDINGS").is_ok() {
@ -154,9 +112,6 @@ fn main() {
#[cfg(feature = "opencl")]
cmd.arg("-DWHISPER_CLBLAST=ON");
#[cfg(feature = "openvino")]
cmd.arg("-DWHISPER_OPENVINO=1");
cmd.arg("-DCMAKE_POSITION_INDEPENDENT_CODE=ON");
let code = cmd

@ -1 +1 @@
Subproject commit 8e46ba80d3c1dcf532a0029f9bcdf99ce9ce7d40
Subproject commit 54735be80f85fec2b08b09b44641b2698dbdef79