Skip to content

Commit

Permalink
Add option to set cache precision in TBE benchmark
Browse files Browse the repository at this point in the history
Summary: - Add option to set cache precision in TBE benchmark

Reviewed By: sryap

Differential Revision: D69134252
  • Loading branch information
q10 authored and facebook-github-bot committed Feb 4, 2025
1 parent 79fcd5b commit 0ab8300
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fbgemm_gpu/bench/split_table_batched_embeddings_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def cli() -> None:
@click.option("--batch-size", default=512)
@click.option("--embedding-dim", default=128)
@click.option("--weights-precision", type=SparseType, default=SparseType.FP32)
@click.option("--cache-precision", type=SparseType, default=None)
@click.option("--stoc", is_flag=True, default=False)
@click.option("--iters", default=100)
@click.option("--warmup-runs", default=0)
Expand Down Expand Up @@ -174,6 +175,7 @@ def device( # noqa C901
batch_size: int,
embedding_dim: int,
weights_precision: SparseType,
cache_precision: Optional[SparseType],
stoc: bool,
iters: int,
warmup_runs: int,
Expand Down Expand Up @@ -317,7 +319,9 @@ def device( # noqa C901
)
for d in Ds
],
cache_precision=weights_precision,
cache_precision=(
weights_precision if cache_precision is None else cache_precision
),
cache_algorithm=CacheAlgorithm.LRU,
cache_load_factor=cache_load_factor,
**common_split_args,
Expand Down

0 comments on commit 0ab8300

Please sign in to comment.