From 52698ebc16cf907f3fe7cdfde3e96ec0cf12d0b4 Mon Sep 17 00:00:00 2001 From: "yudong.cai" Date: Sat, 22 Feb 2020 20:58:43 +0800 Subject: [PATCH] #1320 remove debug logging from faiss Signed-off-by: yudong.cai --- CHANGELOG.md | 1 + .../index/thirdparty/faiss/gpu/impl/IVFFlat.cu | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ad096129..346af3ad5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/core/src/index/thirdparty/faiss/gpu/impl/IVFFlat.cu b/core/src/index/thirdparty/faiss/gpu/impl/IVFFlat.cu index 41a5c3c0e..ffd7f9523 100644 --- a/core/src/index/thirdparty/faiss/gpu/impl/IVFFlat.cu +++ b/core/src/index/thirdparty/faiss/gpu/impl/IVFFlat.cu @@ -24,7 +24,6 @@ #include #include #include -#include 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::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(time2 - time1)).count(); - double span2 = (std::chrono::duration(time3 - time2)).count(); - double span3 = (std::chrono::duration(time4 - time3)).count(); - double span4 = (std::chrono::duration(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 -- GitLab