Skip to content

Commit

Permalink
Redefine FBGEMM targets with gpu_cpp_library [27/N] (#3221)
Browse files Browse the repository at this point in the history
Summary:

X-link: facebookresearch/FBGEMM#319

- Re-organize target definitions in bench/ subdirectory

Differential Revision: D63873905
  • Loading branch information
q10 authored and facebook-github-bot committed Oct 4, 2024
1 parent a0966e8 commit 7aacd7f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions fbgemm_gpu/bench/batched_unary_embeddings_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def forward(
@click.option("--num-tasks", default=3)
@click.option("--repeats", default=100)
# pyre-fixme[2]: Parameter must be annotated.
def main(batch_size, num_tables, num_tasks, repeats) -> None:
def cli(batch_size, num_tables, num_tasks, repeats) -> None:
device = torch.device("cuda", 0)
torch.cuda.set_device(device)
hash_sizes = list(np.random.choice(range(50, 250), size=(num_tables)))
Expand Down Expand Up @@ -169,4 +169,4 @@ def main(batch_size, num_tables, num_tasks, repeats) -> None:


if __name__ == "__main__":
main()
cli()
4 changes: 2 additions & 2 deletions fbgemm_gpu/bench/histogram_binning_calibration_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def benchmark_hbc_function(
@click.command()
@click.option("--iters", default=100)
@click.option("--warmup-runs", default=2)
def main(
def cli(
iters: int,
warmup_runs: int,
) -> None:
Expand Down Expand Up @@ -276,4 +276,4 @@ def fbgemm_generic_hbc_by_feature_gpu(


if __name__ == "__main__":
main()
cli()
4 changes: 2 additions & 2 deletions fbgemm_gpu/bench/merge_embeddings_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ def pool_func_with_quantization(
@click.option("--num_of_embeddings", default=100000, type=int)
@click.option("--pooling_factor", default=25, type=int)
@click.option("--sweep", is_flag=True, default=False)
def main(
def cli(
all_to_one_only: bool,
sum_reduce_to_one_only: bool,
num_ads: int,
Expand Down Expand Up @@ -573,4 +573,4 @@ def handler(signum, frame):


if __name__ == "__main__":
main()
cli()

0 comments on commit 7aacd7f

Please sign in to comment.