diff --git a/diskann-benchmark/README.md b/diskann-benchmark/README.md index 6e072b757..ccb735322 100644 --- a/diskann-benchmark/README.md +++ b/diskann-benchmark/README.md @@ -93,17 +93,17 @@ cargo run --release --package diskann-benchmark -- inputs which will list something like ``` Available input kinds are listed below: - async-index-build - async-index-build-pq + graph-index-build + graph-index-build-pq ``` To obtain the JSON schema for an input, add its name to the query like ```sh -cargo run --release --package diskann-benchmark -- inputs async-index-build +cargo run --release --package diskann-benchmark -- inputs graph-index-build ``` which will generate something like ```json { - "type": "async_index_build", + "type": "graph-index-build", "content": { "data_type": "float32", "data": "path/to/data", @@ -186,9 +186,9 @@ cargo run --release --package diskann-benchmark -- benchmarks Example output is shown below: ``` Registered Benchmarks: - async-full-precision-f32: tag: "async-index-build", float32 - async-full-precision-f16: tag: "async-index-build", float16 - async-pq-f32: tag: "async-index-build-pq", float32 + graph-index-full-precision-f32: tag: "graph-index-build", float32 + graph-index-full-precision-f16: tag: "graph-index-build", float16 + graph-index-pq-f32: tag: "graph-index-build-pq", float32 ``` The keyword after "tag" corresponds to the type of input that the benchmark accepts. @@ -196,7 +196,7 @@ The keyword after "tag" corresponds to the type of input that the benchmark acce Benchmarks are run with ```sh -cargo run --release --package diskann-benchmark -- run --input-file ./diskann-benchmark/example/async.json --output-file output.json +cargo run --release --package diskann-benchmark -- run --input-file ./diskann-benchmark/example/graph-index.json --output-file output.json ``` A benchmark run happens in several phases. @@ -237,10 +237,10 @@ First, set up the runbook and ground truth for the desired workload. Refer to th Benchmarks are run with ```sh -cargo run --release --package diskann-benchmark -- run --input-file ./diskann-benchmark/example/async-dynamic.json --output-file dynamic-output.json +cargo run --release --package diskann-benchmark -- run --input-file ./diskann-benchmark/example/graph-index-dynamic.json --output-file dynamic-output.json ``` -Note in the example json that the benchmark is registered under `async-dynamic-index-run`, -instead of `async-index-build` etc.. +Note in the example json that the benchmark is registered under `graph-index-dynamic-run`, +instead of `graph-index-build` etc.. A streaming run happens in several phases. First, the input file is parsed and data is checked for its validity. The check consists of @@ -284,7 +284,7 @@ input, a `DispatchRule` from the `dispatcher` crate (via registered `diskann_benchmark_runner::Inputs`. The rule can be as simple as checking a down cast or as complicated such as lifting run-time -information to the type/compile time realm, as is done for the async index tests for the data +information to the type/compile time realm, as is done for the graph index tests for the data type. Once this is complete, the benchmark will be reachable by its input and can live peacefully diff --git a/diskann-benchmark/example/async-dynamic.json b/diskann-benchmark/example/graph-index-dynamic.json similarity index 97% rename from diskann-benchmark/example/async-dynamic.json rename to diskann-benchmark/example/graph-index-dynamic.json index bedf862c9..2d785f4ba 100644 --- a/diskann-benchmark/example/async-dynamic.json +++ b/diskann-benchmark/example/graph-index-dynamic.json @@ -5,7 +5,7 @@ ], "jobs": [ { - "type": "async-dynamic-index-run", + "type": "graph-index-dynamic-run", "content": { "build": { "data_type": "float32", diff --git a/diskann-benchmark/example/async-filter-ground-truth-small.json b/diskann-benchmark/example/graph-index-filter-ground-truth-small.json similarity index 97% rename from diskann-benchmark/example/async-filter-ground-truth-small.json rename to diskann-benchmark/example/graph-index-filter-ground-truth-small.json index c5ba23ee5..19a3b5829 100644 --- a/diskann-benchmark/example/async-filter-ground-truth-small.json +++ b/diskann-benchmark/example/graph-index-filter-ground-truth-small.json @@ -4,7 +4,7 @@ ], "jobs": [ { - "type": "async-index-build", + "type": "graph-index-build", "content": { "source": { "index-source": "Build", diff --git a/diskann-benchmark/example/async-filter-ground-truth.json b/diskann-benchmark/example/graph-index-filter-ground-truth.json similarity index 97% rename from diskann-benchmark/example/async-filter-ground-truth.json rename to diskann-benchmark/example/graph-index-filter-ground-truth.json index c8cd25d4e..46e80aaf6 100644 --- a/diskann-benchmark/example/async-filter-ground-truth.json +++ b/diskann-benchmark/example/graph-index-filter-ground-truth.json @@ -4,7 +4,7 @@ ], "jobs": [ { - "type": "async-index-build", + "type": "graph-index-build", "content": { "source": { "index-source": "Build", diff --git a/diskann-benchmark/example/async-filter.json b/diskann-benchmark/example/graph-index-filter.json similarity index 97% rename from diskann-benchmark/example/async-filter.json rename to diskann-benchmark/example/graph-index-filter.json index f0e9bf5c6..b13ab58b7 100644 --- a/diskann-benchmark/example/async-filter.json +++ b/diskann-benchmark/example/graph-index-filter.json @@ -4,7 +4,7 @@ ], "jobs": [ { - "type": "async-index-build", + "type": "graph-index-build", "content": { "source": { "index-source": "Build", diff --git a/diskann-benchmark/example/async-multihop-filter-ground-truth-small.json b/diskann-benchmark/example/graph-index-multihop-filter-ground-truth-small.json similarity index 97% rename from diskann-benchmark/example/async-multihop-filter-ground-truth-small.json rename to diskann-benchmark/example/graph-index-multihop-filter-ground-truth-small.json index eed4fce0b..03c6888b8 100644 --- a/diskann-benchmark/example/async-multihop-filter-ground-truth-small.json +++ b/diskann-benchmark/example/graph-index-multihop-filter-ground-truth-small.json @@ -4,7 +4,7 @@ ], "jobs": [ { - "type": "async-index-build", + "type": "graph-index-build", "content": { "source": { "index-source": "Build", diff --git a/diskann-benchmark/example/async-no-filter-ground-truth.json b/diskann-benchmark/example/graph-index-no-filter-ground-truth.json similarity index 96% rename from diskann-benchmark/example/async-no-filter-ground-truth.json rename to diskann-benchmark/example/graph-index-no-filter-ground-truth.json index 82683c83c..48a5b84e2 100644 --- a/diskann-benchmark/example/async-no-filter-ground-truth.json +++ b/diskann-benchmark/example/graph-index-no-filter-ground-truth.json @@ -4,7 +4,7 @@ ], "jobs": [ { - "type": "async-index-build", + "type": "graph-index-build", "content": { "data_type": "uint8", "data": "base.100k.u8bin", diff --git a/diskann-benchmark/example/async-range.json b/diskann-benchmark/example/graph-index-range.json similarity index 96% rename from diskann-benchmark/example/async-range.json rename to diskann-benchmark/example/graph-index-range.json index cda204bb8..a5c763be0 100644 --- a/diskann-benchmark/example/async-range.json +++ b/diskann-benchmark/example/graph-index-range.json @@ -4,7 +4,7 @@ ], "jobs": [ { - "type": "async-index-build", + "type": "graph-index-build", "content": { "source": { "index-source": "Build", diff --git a/diskann-benchmark/example/async.json b/diskann-benchmark/example/graph-index.json similarity index 96% rename from diskann-benchmark/example/async.json rename to diskann-benchmark/example/graph-index.json index c0fa4c261..a19ffaf10 100644 --- a/diskann-benchmark/example/async.json +++ b/diskann-benchmark/example/graph-index.json @@ -4,7 +4,7 @@ ], "jobs": [ { - "type": "async-index-build", + "type": "graph-index-build", "content": { "source": { "index-source": "Build", @@ -43,7 +43,7 @@ } }, { - "type": "async-index-build", + "type": "graph-index-build", "content": { "source": { "index-source": "Load", @@ -74,7 +74,7 @@ } }, { - "type": "async-index-build", + "type": "graph-index-build", "content": { "source": { "index-source": "Build", @@ -118,7 +118,7 @@ } }, { - "type": "async-index-build", + "type": "graph-index-build", "content": { "source": { "index-source": "Build", @@ -160,7 +160,7 @@ } }, { - "type": "async-index-build", + "type": "graph-index-build", "content": { "source": { "index-source": "Build", @@ -204,7 +204,7 @@ } }, { - "type": "async-index-build", + "type": "graph-index-build", "content": { "source": { "index-source": "Build", diff --git a/diskann-benchmark/example/product.json b/diskann-benchmark/example/product.json index eb8e45239..ad6430dd2 100644 --- a/diskann-benchmark/example/product.json +++ b/diskann-benchmark/example/product.json @@ -4,7 +4,7 @@ ], "jobs": [ { - "type": "async-index-build-pq", + "type": "graph-index-build-pq", "content": { "index_operation": { "source":{ diff --git a/diskann-benchmark/example/scalar.json b/diskann-benchmark/example/scalar.json index b8414155d..2490376e2 100644 --- a/diskann-benchmark/example/scalar.json +++ b/diskann-benchmark/example/scalar.json @@ -4,7 +4,7 @@ ], "jobs": [ { - "type": "async-index-build-sq", + "type": "graph-index-build-sq", "content": { "index_operation": { "source": { @@ -48,7 +48,7 @@ } }, { - "type": "async-index-build-sq", + "type": "graph-index-build-sq", "content": { "index_operation": { "source": { @@ -92,7 +92,7 @@ } }, { - "type": "async-index-build-sq", + "type": "graph-index-build-sq", "content": { "index_operation": { "source": { @@ -136,7 +136,7 @@ } }, { - "type": "async-index-build-sq", + "type": "graph-index-build-sq", "content": { "index_operation": { "source": { diff --git a/diskann-benchmark/example/spherical-filter.json b/diskann-benchmark/example/spherical-filter.json index 5e4cb9512..8407bd39a 100644 --- a/diskann-benchmark/example/spherical-filter.json +++ b/diskann-benchmark/example/spherical-filter.json @@ -4,7 +4,7 @@ ], "jobs": [ { - "type": "async-index-build-spherical-quantization", + "type": "graph-index-build-spherical-quantization", "content": { "build": { "data_type": "float32", @@ -64,7 +64,7 @@ } }, { - "type": "async-index-build-spherical-quantization", + "type": "graph-index-build-spherical-quantization", "content": { "build": { "data_type": "float32", @@ -124,7 +124,7 @@ } }, { - "type": "async-index-build-spherical-quantization", + "type": "graph-index-build-spherical-quantization", "content": { "build": { "data_type": "float32", @@ -186,7 +186,7 @@ } }, { - "type": "async-index-build-spherical-quantization", + "type": "graph-index-build-spherical-quantization", "content": { "build": { "data_type": "float32", @@ -246,7 +246,7 @@ } }, { - "type": "async-index-build-spherical-quantization", + "type": "graph-index-build-spherical-quantization", "content": { "build": { "data_type": "float32", diff --git a/diskann-benchmark/example/spherical.json b/diskann-benchmark/example/spherical.json index e1487333e..695b1d041 100644 --- a/diskann-benchmark/example/spherical.json +++ b/diskann-benchmark/example/spherical.json @@ -4,7 +4,7 @@ ], "jobs": [ { - "type": "async-index-build-spherical-quantization", + "type": "graph-index-build-spherical-quantization", "content": { "build": { "data_type": "float32", @@ -61,7 +61,7 @@ } }, { - "type": "async-index-build-spherical-quantization", + "type": "graph-index-build-spherical-quantization", "content": { "build": { "data_type": "float32", @@ -118,7 +118,7 @@ } }, { - "type": "async-index-build-spherical-quantization", + "type": "graph-index-build-spherical-quantization", "content": { "build": { "data_type": "float32", @@ -177,7 +177,7 @@ } }, { - "type": "async-index-build-spherical-quantization", + "type": "graph-index-build-spherical-quantization", "content": { "build": { "data_type": "float32", @@ -234,7 +234,7 @@ } }, { - "type": "async-index-build-spherical-quantization", + "type": "graph-index-build-spherical-quantization", "content": { "build": { "data_type": "float32", diff --git a/diskann-benchmark/perf_test_inputs/async_scalar_oai_large.json b/diskann-benchmark/perf_test_inputs/graph_index_scalar_oai_large.json similarity index 96% rename from diskann-benchmark/perf_test_inputs/async_scalar_oai_large.json rename to diskann-benchmark/perf_test_inputs/graph_index_scalar_oai_large.json index efe0002c9..09752477a 100644 --- a/diskann-benchmark/perf_test_inputs/async_scalar_oai_large.json +++ b/diskann-benchmark/perf_test_inputs/graph_index_scalar_oai_large.json @@ -4,7 +4,7 @@ ], "jobs": [ { - "type": "async-index-build-sq", + "type": "graph-index-build-sq", "content": { "build": { "data_type": "float16", @@ -40,7 +40,7 @@ } }, { - "type": "async-index-build-sq", + "type": "graph-index-build-sq", "content": { "build": { "data_type": "float16", @@ -76,7 +76,7 @@ } }, { - "type": "async-index-build-sq", + "type": "graph-index-build-sq", "content": { "build": { "data_type": "float16", diff --git a/diskann-benchmark/src/backend/index/benchmarks.rs b/diskann-benchmark/src/backend/index/benchmarks.rs index ad7fd697a..e6d6274e6 100644 --- a/diskann-benchmark/src/backend/index/benchmarks.rs +++ b/diskann-benchmark/src/backend/index/benchmarks.rs @@ -42,7 +42,7 @@ use crate::{ result::{AggregatedSearchResults, BuildResult}, streaming::{self, managed, stats::StreamStats, FullPrecisionStream, Managed}, }, - inputs::async_::{DynamicIndexRun, IndexBuild, IndexOperation, IndexSource, SearchPhase}, + inputs::graph_index::{DynamicIndexRun, IndexBuild, IndexOperation, IndexSource, SearchPhase}, utils::{ self, datafiles::{self}, @@ -56,26 +56,32 @@ use crate::{ pub(super) fn register_benchmarks(benchmarks: &mut diskann_benchmark_runner::registry::Benchmarks) { // Full Precision - benchmarks.register("async-full-precision-f32", FullPrecision::::new()); - benchmarks.register("async-full-precision-f16", FullPrecision::::new()); - benchmarks.register("async-full-precision-u8", FullPrecision::::new()); - benchmarks.register("async-full-precision-i8", FullPrecision::::new()); + benchmarks.register( + "graph-index-full-precision-f32", + FullPrecision::::new(), + ); + benchmarks.register( + "graph-index-full-precision-f16", + FullPrecision::::new(), + ); + benchmarks.register("graph-index-full-precision-u8", FullPrecision::::new()); + benchmarks.register("graph-index-full-precision-i8", FullPrecision::::new()); // Dynamic Full Precision benchmarks.register( - "async-dynamic-full-precision-f32", + "graph-index-dynamic-full-precision-f32", DynamicFullPrecision::::new(), ); benchmarks.register( - "async-dynamic-full-precision-f16", + "graph-index-dynamic-full-precision-f16", DynamicFullPrecision::::new(), ); benchmarks.register( - "async-dynamic-full-precision-u8", + "graph-index-dynamic-full-precision-u8", DynamicFullPrecision::::new(), ); benchmarks.register( - "async-dynamic-full-precision-i8", + "graph-index-dynamic-full-precision-i8", DynamicFullPrecision::::new(), ); @@ -192,7 +198,7 @@ where } } -// Async Dynamic Run +// Graph Index Dynamic Run pub(super) struct DynamicFullPrecision { _type: std::marker::PhantomData, } diff --git a/diskann-benchmark/src/backend/index/build.rs b/diskann-benchmark/src/backend/index/build.rs index 137628db7..c528abdcf 100644 --- a/diskann-benchmark/src/backend/index/build.rs +++ b/diskann-benchmark/src/backend/index/build.rs @@ -28,7 +28,7 @@ use diskann_utils::{ use indicatif::{ProgressBar, ProgressStyle}; use serde::Serialize; -use crate::inputs::async_::IndexBuild; +use crate::inputs::graph_index::IndexBuild; /////////////////////////////// // Start Point Configuration // diff --git a/diskann-benchmark/src/backend/index/product.rs b/diskann-benchmark/src/backend/index/product.rs index a7514c041..4a9ca1f5f 100644 --- a/diskann-benchmark/src/backend/index/product.rs +++ b/diskann-benchmark/src/backend/index/product.rs @@ -6,20 +6,23 @@ use diskann_benchmark_runner::registry::Benchmarks; // Create a stub-module if the "spherical-quantization" feature is disabled. -crate::utils::stub_impl!("product-quantization", inputs::async_::IndexPQOperation); +crate::utils::stub_impl!( + "product-quantization", + inputs::graph_index::IndexPQOperation +); pub(super) fn register_benchmarks(benchmarks: &mut Benchmarks) { #[cfg(feature = "product-quantization")] { use half::f16; - benchmarks.register("async-pq-f32", imp::ProductQuantized::::new()); - benchmarks.register("async-pq-f16", imp::ProductQuantized::::new()); + benchmarks.register("graph-index-pq-f32", imp::ProductQuantized::::new()); + benchmarks.register("graph-index-pq-f16", imp::ProductQuantized::::new()); } // Stub implementation #[cfg(not(feature = "product-quantization"))] - imp::register("async-pq", benchmarks); + imp::register("graph-index-pq", benchmarks); } #[cfg(feature = "product-quantization")] @@ -46,7 +49,7 @@ mod imp { build::{self, load_index, save_index, single_or_multi_insert, BuildStats}, result::QuantBuildResult, }, - inputs::async_::{IndexPQOperation, IndexSource}, + inputs::graph_index::{IndexPQOperation, IndexSource}, utils::{self, datafiles}, }; diff --git a/diskann-benchmark/src/backend/index/scalar.rs b/diskann-benchmark/src/backend/index/scalar.rs index 85c230605..7f11ec3ad 100644 --- a/diskann-benchmark/src/backend/index/scalar.rs +++ b/diskann-benchmark/src/backend/index/scalar.rs @@ -6,7 +6,7 @@ use diskann_benchmark_runner::registry::Benchmarks; // Create a stub-module if the "scalar-quantization" feature is disabled. -crate::utils::stub_impl!("scalar-quantization", inputs::async_::IndexSQOperation); +crate::utils::stub_impl!("scalar-quantization", inputs::graph_index::IndexSQOperation); pub(super) fn register_benchmarks(benchmarks: &mut Benchmarks) { #[cfg(feature = "scalar-quantization")] @@ -14,22 +14,49 @@ pub(super) fn register_benchmarks(benchmarks: &mut Benchmarks) { use half::f16; // f32 - benchmarks.register("async-sq-8-bit-f32", imp::ScalarQuantized::<8, f32>::new()); - benchmarks.register("async-sq-4-bit-f32", imp::ScalarQuantized::<4, f32>::new()); - benchmarks.register("async-sq-2-bit-f32", imp::ScalarQuantized::<2, f32>::new()); - benchmarks.register("async-sq-1-bit-f32", imp::ScalarQuantized::<1, f32>::new()); + benchmarks.register( + "graph-index-sq-8-bit-f32", + imp::ScalarQuantized::<8, f32>::new(), + ); + benchmarks.register( + "graph-index-sq-4-bit-f32", + imp::ScalarQuantized::<4, f32>::new(), + ); + benchmarks.register( + "graph-index-sq-2-bit-f32", + imp::ScalarQuantized::<2, f32>::new(), + ); + benchmarks.register( + "graph-index-sq-1-bit-f32", + imp::ScalarQuantized::<1, f32>::new(), + ); // f16 - benchmarks.register("async-sq-8-bit-f16", imp::ScalarQuantized::<8, f16>::new()); - benchmarks.register("async-sq-4-bit-f16", imp::ScalarQuantized::<4, f16>::new()); - benchmarks.register("async-sq-2-bit-f16", imp::ScalarQuantized::<2, f16>::new()); - benchmarks.register("async-sq-1-bit-f16", imp::ScalarQuantized::<1, f16>::new()); + benchmarks.register( + "graph-index-sq-8-bit-f16", + imp::ScalarQuantized::<8, f16>::new(), + ); + benchmarks.register( + "graph-index-sq-4-bit-f16", + imp::ScalarQuantized::<4, f16>::new(), + ); + benchmarks.register( + "graph-index-sq-2-bit-f16", + imp::ScalarQuantized::<2, f16>::new(), + ); + benchmarks.register( + "graph-index-sq-1-bit-f16", + imp::ScalarQuantized::<1, f16>::new(), + ); // i8 - benchmarks.register("async-sq-1-bit-i8", imp::ScalarQuantized::<1, i8>::new()); + benchmarks.register( + "graph-index-sq-1-bit-i8", + imp::ScalarQuantized::<1, i8>::new(), + ); } // Stub implementation #[cfg(not(feature = "scalar-quantization"))] - imp::register("async-pq", benchmarks); + imp::register("graph-index-sq", benchmarks); } #[cfg(feature = "scalar-quantization")] @@ -59,7 +86,7 @@ mod imp { build::{self, load_index, only_single_insert, save_index, BuildStats}, result::QuantBuildResult, }, - inputs::async_::{IndexSQOperation, IndexSource}, + inputs::graph_index::{IndexSQOperation, IndexSource}, utils::{self, datafiles}, }; diff --git a/diskann-benchmark/src/backend/index/search/knn.rs b/diskann-benchmark/src/backend/index/search/knn.rs index 915b8eca6..b50e69010 100644 --- a/diskann-benchmark/src/backend/index/search/knn.rs +++ b/diskann-benchmark/src/backend/index/search/knn.rs @@ -7,7 +7,7 @@ use std::{num::NonZeroUsize, sync::Arc}; use diskann_benchmark_core::{self as benchmark_core, search as core_search}; -use crate::{backend::index::result::SearchResults, inputs::async_::GraphSearch}; +use crate::{backend::index::result::SearchResults, inputs::graph_index::GraphSearch}; #[derive(Debug, Clone, Copy)] pub(crate) struct SearchSteps<'a> { diff --git a/diskann-benchmark/src/backend/index/search/range.rs b/diskann-benchmark/src/backend/index/search/range.rs index 8acd97b52..7b6ebf7ef 100644 --- a/diskann-benchmark/src/backend/index/search/range.rs +++ b/diskann-benchmark/src/backend/index/search/range.rs @@ -7,7 +7,7 @@ use std::{num::NonZeroUsize, sync::Arc}; use diskann_benchmark_core::{self as benchmark_core, search as core_search}; -use crate::{backend::index::result::RangeSearchResults, inputs::async_::GraphRangeSearch}; +use crate::{backend::index::result::RangeSearchResults, inputs::graph_index::GraphRangeSearch}; #[derive(Debug, Clone, Copy)] pub(crate) struct RangeSearchSteps<'a> { diff --git a/diskann-benchmark/src/backend/index/spherical.rs b/diskann-benchmark/src/backend/index/spherical.rs index 507337da7..6049a676c 100644 --- a/diskann-benchmark/src/backend/index/spherical.rs +++ b/diskann-benchmark/src/backend/index/spherical.rs @@ -8,11 +8,11 @@ use diskann_benchmark_runner::registry::Benchmarks; // Create a stub-module if the "spherical-quantization" feature is disabled. crate::utils::stub_impl!( "spherical-quantization", - inputs::async_::SphericalQuantBuild + inputs::graph_index::SphericalQuantBuild ); pub(super) fn register_benchmarks(benchmarks: &mut Benchmarks) { - const NAME: &str = "async-spherical-quantization"; + const NAME: &str = "graph-index-spherical-quantization"; #[cfg(feature = "spherical-quantization")] { @@ -57,8 +57,8 @@ mod imp { search, }, inputs::{ - async_::{SearchPhase, SphericalQuantBuild}, exhaustive, + graph_index::{SearchPhase, SphericalQuantBuild}, }, utils::{ self, datafiles, diff --git a/diskann-benchmark/src/backend/index/streaming/full_precision.rs b/diskann-benchmark/src/backend/index/streaming/full_precision.rs index 2ef68d06d..3ce4de1eb 100644 --- a/diskann-benchmark/src/backend/index/streaming/full_precision.rs +++ b/diskann-benchmark/src/backend/index/streaming/full_precision.rs @@ -31,7 +31,7 @@ use crate::{ build::{BuildKind, BuildStats}, search::knn, }, - inputs::async_::TopkSearchPhase, + inputs::graph_index::TopkSearchPhase, }; type FullPrecisionIndex = Arc< diff --git a/diskann-benchmark/src/inputs/async_.rs b/diskann-benchmark/src/inputs/graph_index.rs similarity index 97% rename from diskann-benchmark/src/inputs/async_.rs rename to diskann-benchmark/src/inputs/graph_index.rs index c76fdb594..2e0b2c748 100644 --- a/diskann-benchmark/src/inputs/async_.rs +++ b/diskann-benchmark/src/inputs/graph_index.rs @@ -316,7 +316,7 @@ impl Example for MultiInsert { } } -// This constant is used to ensure that summaries of async-index related jobs properly have +// This constant is used to ensure that summaries of graph-index related jobs properly have // their field descriptions aligned. const PRINT_WIDTH: usize = 18; @@ -359,7 +359,7 @@ pub(crate) struct IndexLoad { impl IndexLoad { pub(crate) const fn tag() -> &'static str { - "async-index-load" + "graph-index-load" } pub(crate) fn to_config(&self) -> Result { @@ -421,7 +421,7 @@ impl CheckDeserialization for IndexLoad { impl std::fmt::Display for IndexLoad { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - writeln!(f, "Async Full-Precision Index Load\n")?; + writeln!(f, "Graph Index Full-Precision Load\n")?; write_field!(f, "tag", Self::tag())?; @@ -482,7 +482,7 @@ pub(crate) struct IndexBuild { impl IndexBuild { pub(crate) const fn tag() -> &'static str { - "async-index-builder" + "graph-index-builder" } fn exact_max_degree(&self) -> usize { @@ -614,7 +614,7 @@ impl Example for IndexBuild { impl std::fmt::Display for IndexBuild { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - writeln!(f, "Async Full-Precision Index Build\n")?; + writeln!(f, "Graph Index Full-Precision Build\n")?; write_field!(f, "tag", Self::tag())?; @@ -655,7 +655,7 @@ pub(crate) struct IndexOperation { impl IndexOperation { pub(crate) const fn tag() -> &'static str { - "async-index-build" + "graph-index-build" } } @@ -680,7 +680,7 @@ impl Example for IndexOperation { impl std::fmt::Display for IndexOperation { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - writeln!(f, "Async Full-Precision Index Build\n")?; + writeln!(f, "Graph Index Full-Precision Build\n")?; write_field!(f, "tag", Self::tag())?; @@ -688,9 +688,9 @@ impl std::fmt::Display for IndexOperation { } } -//////////////////// -// Async Build PQ // -//////////////////// +////////////////////////////// +// Graph Index Build PQ // +////////////////////////////// #[derive(Debug, Serialize, Deserialize)] pub(crate) struct IndexPQOperation { @@ -703,7 +703,7 @@ pub(crate) struct IndexPQOperation { impl IndexPQOperation { pub(crate) const fn tag() -> &'static str { - "async-index-build-pq" + "graph-index-build-pq" } #[cfg(feature = "product-quantization")] @@ -761,7 +761,7 @@ impl Example for IndexPQOperation { impl std::fmt::Display for IndexPQOperation { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - writeln!(f, "Async PQ Index Build")?; + writeln!(f, "Graph Index PQ Build")?; write_field!(f, "tag", Self::tag())?; write_field!(f, "PQ Chunks", self.num_pq_chunks)?; const MAX_FP_VECS: &str = "Max FP Vecs"; @@ -778,9 +778,9 @@ impl std::fmt::Display for IndexPQOperation { } } -//////////////////// -// Async Build SQ // -//////////////////// +////////////////////////////// +// Graph Index Build SQ // +////////////////////////////// #[derive(Debug, Serialize, Deserialize)] pub(crate) struct IndexSQOperation { @@ -792,7 +792,7 @@ pub(crate) struct IndexSQOperation { impl IndexSQOperation { pub(crate) const fn tag() -> &'static str { - "async-index-build-sq" + "graph-index-build-sq" } #[cfg(feature = "scalar-quantization")] @@ -854,7 +854,7 @@ impl Example for IndexSQOperation { impl std::fmt::Display for IndexSQOperation { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - writeln!(f, "Async SQ Index Build")?; + writeln!(f, "Graph Index SQ Build")?; write_field!(f, "tag", Self::tag())?; write_field!(f, "SQ bits", self.num_bits)?; write_field!(f, "StdDev", self.standard_deviations)?; @@ -868,9 +868,9 @@ impl std::fmt::Display for IndexSQOperation { } } -/////////////////////////// -// Async Build Spherical // -/////////////////////////// +///////////////////////////////////// +// Graph Index Build Spherical // +///////////////////////////////////// #[derive(Debug, Serialize, Deserialize)] pub(crate) struct SphericalQuantBuild { @@ -885,7 +885,7 @@ pub(crate) struct SphericalQuantBuild { impl SphericalQuantBuild { pub(crate) const fn tag() -> &'static str { - "async-index-build-spherical-quantization" + "graph-index-build-spherical-quantization" } #[cfg(feature = "spherical-quantization")] @@ -962,7 +962,7 @@ impl Example for SphericalQuantBuild { impl std::fmt::Display for SphericalQuantBuild { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - writeln!(f, "Async Spherically Quantized Index Build")?; + writeln!(f, "Graph Index Spherical Quantization Build")?; if cfg!(not(feature = "spherical-quantization")) { writeln!(f, "Requires the `spherical-quantization` feature")?; } @@ -1147,9 +1147,9 @@ impl std::fmt::Display for DynamicRunbookParams { } } -/////////////////// -// Async Dynamic // -/////////////////// +/////////////////////////// +// Graph Index Dynamic // +/////////////////////////// #[derive(Debug, Serialize, Deserialize)] pub(crate) struct DynamicIndexRun { @@ -1160,7 +1160,7 @@ pub(crate) struct DynamicIndexRun { impl DynamicIndexRun { pub(crate) const fn tag() -> &'static str { - "async-dynamic-index-run" + "graph-index-dynamic-run" } pub(crate) fn try_as_config(&self, insert_l: usize) -> anyhow::Result { @@ -1201,7 +1201,7 @@ impl Example for DynamicIndexRun { impl std::fmt::Display for DynamicIndexRun { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - writeln!(f, "Async Dynamic Index Run")?; + writeln!(f, "Graph Index Dynamic Run")?; write_field!(f, "tag", Self::tag())?; writeln!(f, "Runbook Parameters:")?; write!(f, "{}", self.runbook_params)?; diff --git a/diskann-benchmark/src/inputs/mod.rs b/diskann-benchmark/src/inputs/mod.rs index f5f6c015a..856412e2a 100644 --- a/diskann-benchmark/src/inputs/mod.rs +++ b/diskann-benchmark/src/inputs/mod.rs @@ -3,16 +3,16 @@ * Licensed under the MIT license. */ -pub(crate) mod async_; pub(crate) mod disk; pub(crate) mod exhaustive; pub(crate) mod filters; +pub(crate) mod graph_index; pub(crate) mod save_and_load; pub(crate) fn register_inputs( registry: &mut diskann_benchmark_runner::registry::Inputs, ) -> anyhow::Result<()> { - async_::register_inputs(registry)?; + graph_index::register_inputs(registry)?; exhaustive::register_inputs(registry)?; disk::register_inputs(registry)?; filters::register_inputs(registry)?; diff --git a/diskann-benchmark/src/main.rs b/diskann-benchmark/src/main.rs index 723a8b14f..424e63bb7 100644 --- a/diskann-benchmark/src/main.rs +++ b/diskann-benchmark/src/main.rs @@ -258,17 +258,17 @@ mod tests { } } - // Async Build Integration Test. + // Graph Index Build Integration Test. #[test] - fn async_integration() { + fn graph_index_integration() { // First, parse and modify the input file to establish paths relative to the // directory building the dispatcher. - let mut raw = value_from_file(&example_directory().join("async.json")); + let mut raw = value_from_file(&example_directory().join("graph-index.json")); prefix_search_directories(&mut raw, &root_directory()); let tempdir = tempfile::tempdir().unwrap(); - let input_path = tempdir.path().join("async.json"); + let input_path = tempdir.path().join("graph-index.json"); save_to_file(&input_path, &raw); let output_path = tempdir.path().join("output.json"); @@ -558,15 +558,15 @@ mod tests { } #[test] - fn async_filter_integration() { + fn graph_index_filter_integration() { // First, parse and modify the input file to establish paths relative to the // directory building the dispatcher. - let mut raw = value_from_file(&example_directory().join("async-filter.json")); + let mut raw = value_from_file(&example_directory().join("graph-index-filter.json")); prefix_search_directories(&mut raw, &root_directory()); let tempdir = tempfile::tempdir().unwrap(); - let input_path = tempdir.path().join("async-filter.json"); + let input_path = tempdir.path().join("graph-index-filter.json"); save_to_file(&input_path, &raw); let output_path = tempdir.path().join("output.json"); @@ -596,7 +596,7 @@ mod tests { } #[test] - fn async_filter_integration_with_gt_compute() { + fn graph_index_filter_integration_with_gt_compute() { let storage_provider = FileStorageProvider; let disk_index_search_path = root_directory().join("test_data/disk_index_search"); @@ -644,13 +644,16 @@ mod tests { } }; - let mut raw = - value_from_file(&example_directory().join("async-filter-ground-truth-small.json")); + let mut raw = value_from_file( + &example_directory().join("graph-index-filter-ground-truth-small.json"), + ); prefix_search_directories(&mut raw, &root_directory()); let tempdir = tempfile::tempdir().unwrap(); - let input_path = tempdir.path().join("async-filter-ground-truth-small.json"); + let input_path = tempdir + .path() + .join("graph-index-filter-ground-truth-small.json"); save_to_file(&input_path, &raw); let output_path = tempdir.path().join("output.json");