summaryrefslogtreecommitdiff
path: root/candle-core/src/utils.rs
diff options
context:
space:
mode:
authorLaurent Mazare <laurent.mazare@gmail.com>2023-07-11 19:32:10 +0100
committerGitHub <noreply@github.com>2023-07-11 19:32:10 +0100
commit37cad858698e519435c916421cc97b4f6b7fe53e (patch)
treed9a7ddb65a25e53ed684e91b33d4c27eea3dc0d5 /candle-core/src/utils.rs
parent760f1d70551a761a815e0a9576c8fecb6bde6020 (diff)
downloadcandle-37cad858698e519435c916421cc97b4f6b7fe53e.tar.gz
candle-37cad858698e519435c916421cc97b4f6b7fe53e.tar.bz2
candle-37cad858698e519435c916421cc97b4f6b7fe53e.zip
Resurrect the llama npy support. (#140)
Diffstat (limited to 'candle-core/src/utils.rs')
-rw-r--r--candle-core/src/utils.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/candle-core/src/utils.rs b/candle-core/src/utils.rs
index 4b1e941b..b5621e56 100644
--- a/candle-core/src/utils.rs
+++ b/candle-core/src/utils.rs
@@ -10,3 +10,10 @@ pub fn get_num_threads() -> usize {
Some(_) | None => num_cpus::get(),
}
}
+
+pub fn has_mkl() -> bool {
+ #[cfg(feature = "mkl")]
+ return true;
+ #[cfg(not(feature = "mkl"))]
+ return false;
+}