summaryrefslogtreecommitdiff
path: root/candle-core/src/utils.rs
diff options
context:
space:
mode:
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;
+}