From 55796406c5de89f60f6c103d60daf48c762d1920 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Mon, 26 Feb 2024 10:41:47 +0100 Subject: [PATCH] Add GPU analytics --- meilisearch/src/analytics/segment_analytics.rs | 2 ++ milli/src/vector/mod.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/meilisearch/src/analytics/segment_analytics.rs b/meilisearch/src/analytics/segment_analytics.rs index 7e9fff925..865b3df22 100644 --- a/meilisearch/src/analytics/segment_analytics.rs +++ b/meilisearch/src/analytics/segment_analytics.rs @@ -256,6 +256,7 @@ struct Infos { experimental_enable_logs_route: bool, experimental_reduce_indexing_memory_usage: bool, experimental_max_number_of_batched_tasks: usize, + gpu_enabled: bool, db_path: bool, import_dump: bool, dump_dir: bool, @@ -342,6 +343,7 @@ impl From for Infos { experimental_logs_mode, experimental_enable_logs_route, experimental_reduce_indexing_memory_usage, + gpu_enabled: meilisearch_types::milli::vector::is_cuda_enabled(), db_path: db_path != PathBuf::from("./data.ms"), import_dump: import_dump.is_some(), dump_dir: dump_dir != PathBuf::from("dumps/"), diff --git a/milli/src/vector/mod.rs b/milli/src/vector/mod.rs index 99b7bff7e..6aa324da9 100644 --- a/milli/src/vector/mod.rs +++ b/milli/src/vector/mod.rs @@ -261,3 +261,7 @@ impl DistributionShift { score } } + +pub const fn is_cuda_enabled() -> bool { + cfg!(feature = "cuda") +}