Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions diskann-benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -186,17 +186,17 @@ 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.

### Running Benchmarks

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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
],
"jobs": [
{
"type": "async-dynamic-index-run",
"type": "graph-index-dynamic-run",
"content": {
"build": {
"data_type": "float32",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"jobs": [
{
"type": "async-index-build",
"type": "graph-index-build",
"content": {
"source": {
"index-source": "Build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"jobs": [
{
"type": "async-index-build",
"type": "graph-index-build",
"content": {
"source": {
"index-source": "Build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"jobs": [
{
"type": "async-index-build",
"type": "graph-index-build",
"content": {
"source": {
"index-source": "Build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"jobs": [
{
"type": "async-index-build",
"type": "graph-index-build",
"content": {
"source": {
"index-source": "Build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"jobs": [
{
"type": "async-index-build",
"type": "graph-index-build",
"content": {
"data_type": "uint8",
"data": "base.100k.u8bin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"jobs": [
{
"type": "async-index-build",
"type": "graph-index-build",
"content": {
"source": {
"index-source": "Build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"jobs": [
{
"type": "async-index-build",
"type": "graph-index-build",
"content": {
"source": {
"index-source": "Build",
Expand Down Expand Up @@ -43,7 +43,7 @@
}
},
{
"type": "async-index-build",
"type": "graph-index-build",
"content": {
"source": {
"index-source": "Load",
Expand Down Expand Up @@ -74,7 +74,7 @@
}
},
{
"type": "async-index-build",
"type": "graph-index-build",
"content": {
"source": {
"index-source": "Build",
Expand Down Expand Up @@ -118,7 +118,7 @@
}
},
{
"type": "async-index-build",
"type": "graph-index-build",
"content": {
"source": {
"index-source": "Build",
Expand Down Expand Up @@ -160,7 +160,7 @@
}
},
{
"type": "async-index-build",
"type": "graph-index-build",
"content": {
"source": {
"index-source": "Build",
Expand Down Expand Up @@ -204,7 +204,7 @@
}
},
{
"type": "async-index-build",
"type": "graph-index-build",
"content": {
"source": {
"index-source": "Build",
Expand Down
2 changes: 1 addition & 1 deletion diskann-benchmark/example/product.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"jobs": [
{
"type": "async-index-build-pq",
"type": "graph-index-build-pq",
"content": {
"index_operation": {
"source":{
Expand Down
8 changes: 4 additions & 4 deletions diskann-benchmark/example/scalar.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"jobs": [
{
"type": "async-index-build-sq",
"type": "graph-index-build-sq",
"content": {
"index_operation": {
"source": {
Expand Down Expand Up @@ -48,7 +48,7 @@
}
},
{
"type": "async-index-build-sq",
"type": "graph-index-build-sq",
"content": {
"index_operation": {
"source": {
Expand Down Expand Up @@ -92,7 +92,7 @@
}
},
{
"type": "async-index-build-sq",
"type": "graph-index-build-sq",
"content": {
"index_operation": {
"source": {
Expand Down Expand Up @@ -136,7 +136,7 @@
}
},
{
"type": "async-index-build-sq",
"type": "graph-index-build-sq",
"content": {
"index_operation": {
"source": {
Expand Down
10 changes: 5 additions & 5 deletions diskann-benchmark/example/spherical-filter.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"jobs": [
{
"type": "async-index-build-spherical-quantization",
"type": "graph-index-build-spherical-quantization",
"content": {
"build": {
"data_type": "float32",
Expand Down Expand Up @@ -64,7 +64,7 @@
}
},
{
"type": "async-index-build-spherical-quantization",
"type": "graph-index-build-spherical-quantization",
"content": {
"build": {
"data_type": "float32",
Expand Down Expand Up @@ -124,7 +124,7 @@
}
},
{
"type": "async-index-build-spherical-quantization",
"type": "graph-index-build-spherical-quantization",
"content": {
"build": {
"data_type": "float32",
Expand Down Expand Up @@ -186,7 +186,7 @@
}
},
{
"type": "async-index-build-spherical-quantization",
"type": "graph-index-build-spherical-quantization",
"content": {
"build": {
"data_type": "float32",
Expand Down Expand Up @@ -246,7 +246,7 @@
}
},
{
"type": "async-index-build-spherical-quantization",
"type": "graph-index-build-spherical-quantization",
"content": {
"build": {
"data_type": "float32",
Expand Down
10 changes: 5 additions & 5 deletions diskann-benchmark/example/spherical.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"jobs": [
{
"type": "async-index-build-spherical-quantization",
"type": "graph-index-build-spherical-quantization",
"content": {
"build": {
"data_type": "float32",
Expand Down Expand Up @@ -61,7 +61,7 @@
}
},
{
"type": "async-index-build-spherical-quantization",
"type": "graph-index-build-spherical-quantization",
"content": {
"build": {
"data_type": "float32",
Expand Down Expand Up @@ -118,7 +118,7 @@
}
},
{
"type": "async-index-build-spherical-quantization",
"type": "graph-index-build-spherical-quantization",
"content": {
"build": {
"data_type": "float32",
Expand Down Expand Up @@ -177,7 +177,7 @@
}
},
{
"type": "async-index-build-spherical-quantization",
"type": "graph-index-build-spherical-quantization",
"content": {
"build": {
"data_type": "float32",
Expand Down Expand Up @@ -234,7 +234,7 @@
}
},
{
"type": "async-index-build-spherical-quantization",
"type": "graph-index-build-spherical-quantization",
"content": {
"build": {
"data_type": "float32",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"jobs": [
{
"type": "async-index-build-sq",
"type": "graph-index-build-sq",
"content": {
"build": {
"data_type": "float16",
Expand Down Expand Up @@ -40,7 +40,7 @@
}
},
{
"type": "async-index-build-sq",
"type": "graph-index-build-sq",
"content": {
"build": {
"data_type": "float16",
Expand Down Expand Up @@ -76,7 +76,7 @@
}
},
{
"type": "async-index-build-sq",
"type": "graph-index-build-sq",
"content": {
"build": {
"data_type": "float16",
Expand Down
Loading
Loading