Skip to content

Commit

Permalink
Merge branch 'branch-23.12' into huge_page
Browse files Browse the repository at this point in the history
  • Loading branch information
cjnolet authored Nov 16, 2023
2 parents fb7847c + 31fcbf1 commit a1f1e97
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 36 deletions.
12 changes: 0 additions & 12 deletions cpp/include/raft/neighbors/detail/cagra/cagra_serialize.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,6 @@ namespace raft::neighbors::cagra::detail {

constexpr int serialization_version = 3;

// NB: we wrap this check in a struct, so that the updated RealSize is easy to see in the error
// message.
template <size_t RealSize, size_t ExpectedSize>
struct check_index_layout {
static_assert(RealSize == ExpectedSize,
"The size of the index struct has changed since the last update; "
"paste in the new size and consider updating the serialization logic");
};

constexpr size_t expected_size = 200;
template struct check_index_layout<sizeof(index<double, std::uint64_t>), expected_size>;

/**
* Save the index to file.
*
Expand Down
13 changes: 1 addition & 12 deletions cpp/include/raft/neighbors/detail/ivf_flat_serialize.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,13 @@

namespace raft::neighbors::ivf_flat::detail {

// Serialization version 3
// Serialization version
// No backward compatibility yet; that is, can't add additional fields without breaking
// backward compatibility.
// TODO(hcho3) Implement next-gen serializer for IVF that allows for expansion in a backward
// compatible fashion.
constexpr int serialization_version = 4;

// NB: we wrap this check in a struct, so that the updated RealSize is easy to see in the error
// message.
template <size_t RealSize, size_t ExpectedSize>
struct check_index_layout {
static_assert(RealSize == ExpectedSize,
"The size of the index struct has changed since the last update; "
"paste in the new size and consider updating the serialization logic");
};

template struct check_index_layout<sizeof(index<double, std::uint64_t>), 328>;

/**
* Save the index to file.
*
Expand Down
12 changes: 0 additions & 12 deletions cpp/include/raft/neighbors/detail/ivf_pq_serialize.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,6 @@ namespace raft::neighbors::ivf_pq::detail {
// compatible fashion.
constexpr int kSerializationVersion = 3;

// NB: we wrap this check in a struct, so that the updated RealSize is easy to see in the error
// message.
template <size_t RealSize, size_t ExpectedSize>
struct check_index_layout {
static_assert(RealSize == ExpectedSize,
"The size of the index struct has changed since the last update; "
"paste in the new size and consider updating the serialization logic");
};

// TODO: Recompute this and come back to it.
template struct check_index_layout<sizeof(index<std::uint64_t>), 480>;

/**
* Write the index to an output stream
*
Expand Down

0 comments on commit a1f1e97

Please sign in to comment.