mirror of https://github.com/milvus-io/milvus.git
Upgrade to knowhere v1.1.5 to fully support MinGW build (#16498)
Signed-off-by: yudong.cai <yudong.cai@zilliz.com>pull/16491/head
parent
58ea38142f
commit
35e7ed45b3
|
@ -1,31 +0,0 @@
|
||||||
// Licensed to the LF AI & Data foundation under one
|
|
||||||
// or more contributor license agreements. See the NOTICE file
|
|
||||||
// distributed with this work for additional information
|
|
||||||
// regarding copyright ownership. The ASF licenses this file
|
|
||||||
// to you under the Apache License, Version 2.0 (the
|
|
||||||
// "License"); you may not use this file except in compliance
|
|
||||||
// with the License. You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
#include "common/BitsetView.h"
|
|
||||||
|
|
||||||
namespace milvus {
|
|
||||||
|
|
||||||
BitsetView
|
|
||||||
BitsetView::subview(size_t offset, size_t size) const {
|
|
||||||
if (empty()) {
|
|
||||||
return BitsetView();
|
|
||||||
}
|
|
||||||
assert(offset % 8 == 0);
|
|
||||||
assert((offset + size) <= this.size());
|
|
||||||
return BitsetView(data() + offset / 8, size);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace milvus
|
|
|
@ -18,22 +18,21 @@
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <boost_ext/dynamic_bitset_ext.hpp>
|
#include <boost_ext/dynamic_bitset_ext.hpp>
|
||||||
|
|
||||||
#include "common/Types.h"
|
#include "common/Types.h"
|
||||||
#include "knowhere/utils/BitsetView.h"
|
#include "knowhere/utils/BitsetView.h"
|
||||||
|
|
||||||
namespace milvus {
|
namespace milvus {
|
||||||
|
|
||||||
class BitsetView : public faiss::BitsetView {
|
class BitsetView : public faiss::BitsetView {
|
||||||
using BaseBitsetView = faiss::BitsetView;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BitsetView() = default;
|
BitsetView() = default;
|
||||||
~BitsetView() = default;
|
~BitsetView() = default;
|
||||||
|
|
||||||
BitsetView(const std::nullptr_t value) : BaseBitsetView(value) { // NOLINT
|
BitsetView(const std::nullptr_t value) : faiss::BitsetView(value) { // NOLINT
|
||||||
}
|
}
|
||||||
|
|
||||||
BitsetView(const uint8_t* data, size_t num_bits) : BaseBitsetView(data, num_bits) { // NOLINT
|
BitsetView(const uint8_t* data, size_t num_bits) : faiss::BitsetView(data, num_bits) { // NOLINT
|
||||||
}
|
}
|
||||||
|
|
||||||
BitsetView(const BitsetType& bitset) // NOLINT
|
BitsetView(const BitsetType& bitset) // NOLINT
|
||||||
|
@ -47,7 +46,14 @@ class BitsetView : public faiss::BitsetView {
|
||||||
}
|
}
|
||||||
|
|
||||||
BitsetView
|
BitsetView
|
||||||
subview(size_t pos, size_t count) const;
|
subview(size_t offset, size_t size) const {
|
||||||
|
if (empty()) {
|
||||||
|
return BitsetView();
|
||||||
|
}
|
||||||
|
assert((offset & 0x7) == 0);
|
||||||
|
assert((offset + size) <= this->size());
|
||||||
|
return BitsetView(data() + (offset >> 3), size);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace milvus
|
} // namespace milvus
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
set(COMMON_SRC
|
set(COMMON_SRC
|
||||||
Schema.cpp
|
Schema.cpp
|
||||||
Types.cpp
|
Types.cpp
|
||||||
BitsetView.cpp
|
|
||||||
SystemProperty.cpp
|
SystemProperty.cpp
|
||||||
vector_index_c.cpp
|
vector_index_c.cpp
|
||||||
)
|
)
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
# or implied. See the License for the specific language governing permissions and limitations under the License.
|
# or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
set( KNOWHERE_VERSION v1.1.4 )
|
set( KNOWHERE_VERSION v1.1.5 )
|
||||||
set( KNOWHERE_SOURCE_MD5 "605a11509d54e4af1f6c4f23de8beaa9" )
|
set( KNOWHERE_SOURCE_MD5 "5baa7ecaea0e9e5c9f3f440cf8757d3c")
|
||||||
|
|
||||||
if ( DEFINED ENV{MILVUS_KNOWHERE_URL} )
|
if ( DEFINED ENV{MILVUS_KNOWHERE_URL} )
|
||||||
set( KNOWHERE_SOURCE_URL "$ENV{MILVUS_KNOWHERE_URL}" )
|
set( KNOWHERE_SOURCE_URL "$ENV{MILVUS_KNOWHERE_URL}" )
|
||||||
|
@ -21,13 +21,6 @@ else ()
|
||||||
"https://github.com/milvus-io/knowhere/archive/refs/tags/${KNOWHERE_VERSION}.tar.gz" )
|
"https://github.com/milvus-io/knowhere/archive/refs/tags/${KNOWHERE_VERSION}.tar.gz" )
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (MSYS)
|
|
||||||
# TODO(matrixji) replace with official release after `support windows` merged/tagged
|
|
||||||
# windows adaptation + milvus-io/knowhere@v1.1.3
|
|
||||||
set (KNOWHERE_SOURCE_URL "https://github.com/matrixji/knowhere/archive/refs/tags/v1.1.3-win.tar.gz")
|
|
||||||
set (KNOWHERE_SOURCE_MD5 "58021c73c4dc9fce40f429c02968bf79")
|
|
||||||
endif (MSYS)
|
|
||||||
|
|
||||||
macro(build_knowhere)
|
macro(build_knowhere)
|
||||||
message(STATUS "Building knowhere-${KNOWHERE_VERSION} from source")
|
message(STATUS "Building knowhere-${KNOWHERE_VERSION} from source")
|
||||||
set (KNOWHERE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
set (KNOWHERE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||||
|
@ -40,7 +33,7 @@ macro(build_knowhere)
|
||||||
|
|
||||||
externalproject_add(knowhere_ep
|
externalproject_add(knowhere_ep
|
||||||
#GIT_REPOSITORY "https://github.com/milvus-io/knowhere.git"
|
#GIT_REPOSITORY "https://github.com/milvus-io/knowhere.git"
|
||||||
#GIT_TAG v1.0.1
|
#GIT_TAG main
|
||||||
URL ${KNOWHERE_SOURCE_URL}
|
URL ${KNOWHERE_SOURCE_URL}
|
||||||
URL_MD5 ${KNOWHERE_SOURCE_MD5}
|
URL_MD5 ${KNOWHERE_SOURCE_MD5}
|
||||||
CMAKE_ARGS ${KNOWHERE_CMAKE_ARGS}
|
CMAKE_ARGS ${KNOWHERE_CMAKE_ARGS}
|
||||||
|
|
Loading…
Reference in New Issue