Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
yinying-lisa-li committed Jun 26, 2024
1 parent b8164fe commit 4c57a61
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions benchmark/python/utils/benchmark_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,14 @@ def run_benchmark(
output.append(
torch.sparse_csr_tensor(*sp_out, size=dense_out.shape)
)
# Check MPACT and torch eager both return sparse csr output.
# Check MPACT and torch eager both return sparse csr output
# only when torch sparse eager has been run.
if output_type:
assert output_type == torch.sparse_csr
else:
output.append(torch.from_numpy(sp_out))
# Check MPACT and torch eager both return dense output.
# Check MPACT and torch eager both return dense output
# only when torch sparse eager has been run.
if output_type:
assert output_type == torch.strided
invoker, f = mpact_jit_compile(torch_net, *sparse_inputs)
Expand Down

0 comments on commit 4c57a61

Please sign in to comment.