pytorch / benchmark

TorchBench is a collection of open source benchmarks used to evaluate PyTorch performance.
BSD 3-Clause "New" or "Revised" License
854 stars 275 forks source link

Add jagged_sum operator for padded nested tensors to TritonBench #2305

Closed jananisriram closed 3 months ago

jananisriram commented 3 months ago

Summary: Add a jagged_sum reduction operator for padded nested tensors, based on the PyTorch sum operator, to TritonBench. This diff uses the PyTorch function torch.ops.aten._jagged_to_padded_dense_forward, hosted at this GitHub pull request, to pad each 2-dimensional tensor in a nested tensor of shape (B, *, M), then reduce across the N-th dimension (dim == 1) to a (B, M) output tensor.

Measure accuracy of padded implementation against unpadded baseline implementation via accuracy TritonBench metric.

Reviewed By: davidberard98

Differential Revision: D58423489

facebook-github-bot commented 3 months ago

This pull request was exported from Phabricator. Differential Revision: D58423489

facebook-github-bot commented 3 months ago

This pull request was exported from Phabricator. Differential Revision: D58423489

facebook-github-bot commented 3 months ago

This pull request was exported from Phabricator. Differential Revision: D58423489

facebook-github-bot commented 3 months ago

This pull request was exported from Phabricator. Differential Revision: D58423489

facebook-github-bot commented 3 months ago

This pull request was exported from Phabricator. Differential Revision: D58423489

facebook-github-bot commented 3 months ago

This pull request has been merged in pytorch/benchmark@40b376dc2f6badbeec92ba912435141a197fa2a8.