From b12f861b5113a9038cad5e24abda16ea15856fcf Mon Sep 17 00:00:00 2001 From: wxyu Date: Mon, 2 Dec 2019 11:17:24 +0800 Subject: [PATCH] Add a new rpc command to get milvus build version whether cpu or gpu close#644 --- CHANGELOG.md | 1 + core/src/server/grpc_impl/request/CmdRequest.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19a9c4519d..d78fe75cba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ Please mark all change in change log and use the ticket from JIRA. - \#502 - C++ SDK support IVFPQ and SPTAG - \#560 - Add version in server config file - \#605 - Print more messages when server start +- \#644 - Add a new rpc command to get milvus build version whether cpu or gpu ## Improvement - \#255 - Add ivfsq8 test report detailed version diff --git a/core/src/server/grpc_impl/request/CmdRequest.cpp b/core/src/server/grpc_impl/request/CmdRequest.cpp index b215f94d31..3afbe6d6e2 100644 --- a/core/src/server/grpc_impl/request/CmdRequest.cpp +++ b/core/src/server/grpc_impl/request/CmdRequest.cpp @@ -39,6 +39,12 @@ CmdRequest::OnExecute() { result_ = MILVUS_VERSION; } else if (cmd_ == "tasktable") { result_ = scheduler::ResMgrInst::GetInstance()->DumpTaskTables(); + } else if (cmd_ == "mode") { +#ifdef MILVUS_GPU_VERSION + result_ = "GPU"; +#else + result_ = "CPU"; +#endif } else { result_ = "OK"; }