未验证 提交 d6650333 编写于 作者: J Jin Hai 提交者: GitHub

#1320 remove debug logging from faiss (#1321)

Signed-off-by: Nyudong.cai <yudong.cai@zilliz.com>
......@@ -54,6 +54,7 @@ Please mark all change in change log and use the issue from GitHub
- \#1078 - Move 'insert_buffer_size' to Cache Config section
- \#1105 - Error message is not clear when creating IVFSQ8H index without gpu resources
- \#741, #856, #879, #973, #1100, #1163, #1175, #1206, #1219, #1225, #1233, #1258, #1265, #1274, #1292, #1305 - Various fixes and improvements for Milvus documentation.
- \#1320 - Remove debug logging from faiss
## Task
......
......@@ -24,7 +24,6 @@
#include <thrust/host_vector.h>
#include <unordered_map>
#include <numeric>
#include <chrono>
namespace faiss { namespace gpu {
......@@ -71,14 +70,11 @@ IVFFlat::copyCodeVectorsFromCpu(const float* vecs,
// list; the length is in sizeof(char)
FAISS_ASSERT(deviceData_->size() + lengthInBytes <= std::numeric_limits<int64_t>::max());
std::chrono::high_resolution_clock::time_point time1 = std::chrono::high_resolution_clock::now();
deviceData_->append((unsigned char*) vecs,
lengthInBytes,
stream,
true /* exact reserved size */);
std::chrono::high_resolution_clock::time_point time2 = std::chrono::high_resolution_clock::now();
copyIndicesFromCpu_(indices, list_length);
std::chrono::high_resolution_clock::time_point time3 = std::chrono::high_resolution_clock::now();
maxListLength_ = 0;
size_t listId = 0;
......@@ -97,7 +93,6 @@ IVFFlat::copyCodeVectorsFromCpu(const float* vecs,
pos += size;
++ listId;
}
std::chrono::high_resolution_clock::time_point time4 = std::chrono::high_resolution_clock::now();
deviceListDataPointers_ = hostPointers;
......@@ -106,16 +101,6 @@ IVFFlat::copyCodeVectorsFromCpu(const float* vecs,
if (stream != 0) {
streamWait({stream}, {0});
}
std::chrono::high_resolution_clock::time_point time5 = std::chrono::high_resolution_clock::now();
double span1 = (std::chrono::duration<double, std::micro>(time2 - time1)).count();
double span2 = (std::chrono::duration<double, std::micro>(time3 - time2)).count();
double span3 = (std::chrono::duration<double, std::micro>(time4 - time3)).count();
double span4 = (std::chrono::duration<double, std::micro>(time5 - time4)).count();
std::cout << "Span1: " << span1 * 0.001 << "ms" << std::endl;
std::cout << "Span2: " << span2 * 0.001 << "ms" << std::endl;
std::cout << "Span3: " << span3 * 0.001 << "ms" << std::endl;
std::cout << "Span4: " << span4 * 0.001 << "ms" << std::endl;
}
void
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册