diff --git a/core/src/server/Config.cpp b/core/src/server/Config.cpp index f241e661c8..f130e73a85 100644 --- a/core/src/server/Config.cpp +++ b/core/src/server/Config.cpp @@ -307,6 +307,7 @@ Config::ResetDefaultConfig() { return s; } +#ifdef MILVUS_GPU_VERSION s = SetCacheConfigGpuCacheCapacity(CONFIG_CACHE_GPU_CACHE_CAPACITY_DEFAULT); if (!s.ok()) { return s; @@ -316,6 +317,7 @@ Config::ResetDefaultConfig() { if (!s.ok()) { return s; } +#endif s = SetCacheConfigCacheInsertData(CONFIG_CACHE_CACHE_INSERT_DATA_DEFAULT); if (!s.ok()) { diff --git a/core/unittest/server/test_config.cpp b/core/unittest/server/test_config.cpp index 5e6f61e543..6a62ddd97c 100644 --- a/core/unittest/server/test_config.cpp +++ b/core/unittest/server/test_config.cpp @@ -216,6 +216,7 @@ TEST_F(ConfigTest, SERVER_CONFIG_VALID_TEST) { s = config.GetCacheConfigCpuCacheThreshold(float_val); ASSERT_TRUE(float_val == cache_cpu_cache_threshold); +#ifdef MILVUS_GPU_VERSION int64_t cache_gpu_cache_capacity = 1; s = config.SetCacheConfigGpuCacheCapacity(std::to_string(cache_gpu_cache_capacity)); ASSERT_TRUE(s.ok()); @@ -228,6 +229,7 @@ TEST_F(ConfigTest, SERVER_CONFIG_VALID_TEST) { ASSERT_TRUE(s.ok()); s = config.GetCacheConfigGpuCacheThreshold(float_val); ASSERT_TRUE(float_val == cache_gpu_cache_threshold); +#endif bool cache_insert_data = true; s = config.SetCacheConfigCacheInsertData(std::to_string(cache_insert_data));