Skip to content

Conversation

@SS-JIA
Copy link
Contributor

@SS-JIA SS-JIA commented Mar 20, 2025

Stack from ghstack (oldest at bottom):

Context

The bencmarks generated by the generated operator benchmarks currently have a high amount of copy overhead:

  1. Copy from CPU to staging
  2. Copy from staging to GPU Buffer/Image

And this is done for both inputs and outputs.

Since benchmarks are not correctness tests, copying data in/out is not really necessary especially if the compute shader does not have behaviour dependent on the contents of the input/output tensor.

Make it so that by default, the benchmark will only execute the op without adding copy overhead. However, test cases can optionally specify that the copy overhead should be included in the benchmark.

Differential Revision: D71570143

## Context

The bencmarks generated by the generated operator benchmarks currently have a high amount of copy overhead:

1. Copy from CPU to staging
2. Copy from staging to GPU Buffer/Image

And this is done for both inputs and outputs.

Since benchmarks are not correctness tests, copying data in/out is not really necessary especially if the compute shader does not have behaviour dependent on the contents of the input/output tensor.

Make it so that by default, the benchmark will only execute the op without adding copy overhead. However, test cases can optionally specify that the copy overhead should be included in the benchmark.

Differential Revision: [D71570143](https://our.internmc.facebook.com/intern/diff/D71570143/)

[ghstack-poisoned]
SS-JIA added a commit that referenced this pull request Mar 20, 2025
## Context

The bencmarks generated by the generated operator benchmarks currently have a high amount of copy overhead:

1. Copy from CPU to staging
2. Copy from staging to GPU Buffer/Image

And this is done for both inputs and outputs.

Since benchmarks are not correctness tests, copying data in/out is not really necessary especially if the compute shader does not have behaviour dependent on the contents of the input/output tensor.

Make it so that by default, the benchmark will only execute the op without adding copy overhead. However, test cases can optionally specify that the copy overhead should be included in the benchmark.

Differential Revision: [D71570143](https://our.internmc.facebook.com/intern/diff/D71570143/)

ghstack-source-id: 273059929
Pull Request resolved: #9468
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 20, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/9468

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 1 Pending

As of commit f4c4585 with merge base 7159650 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 20, 2025
@facebook-github-bot
Copy link
Contributor

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

@github-actions
Copy link

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

…arking"

## Context

The bencmarks generated by the generated operator benchmarks currently have a high amount of copy overhead:

1. Copy from CPU to staging
2. Copy from staging to GPU Buffer/Image

And this is done for both inputs and outputs.

Since benchmarks are not correctness tests, copying data in/out is not really necessary especially if the compute shader does not have behaviour dependent on the contents of the input/output tensor.

Make it so that by default, the benchmark will only execute the op without adding copy overhead. However, test cases can optionally specify that the copy overhead should be included in the benchmark.

Differential Revision: [D71570143](https://our.internmc.facebook.com/intern/diff/D71570143/)

[ghstack-poisoned]
SS-JIA added a commit that referenced this pull request Mar 26, 2025
Pull Request resolved: #9468

## Context

The bencmarks generated by the generated operator benchmarks currently have a high amount of copy overhead:

1. Copy from CPU to staging
2. Copy from staging to GPU Buffer/Image

And this is done for both inputs and outputs.

Since benchmarks are not correctness tests, copying data in/out is not really necessary especially if the compute shader does not have behaviour dependent on the contents of the input/output tensor.

Make it so that by default, the benchmark will only execute the op without adding copy overhead. However, test cases can optionally specify that the copy overhead should be included in the benchmark.

Differential Revision: [D71570143](https://our.internmc.facebook.com/intern/diff/D71570143/)
ghstack-source-id: 274197244
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot facebook-github-bot merged commit e68552d into gh/SS-JIA/199/base Mar 27, 2025
82 of 83 checks passed
@facebook-github-bot facebook-github-bot deleted the gh/SS-JIA/199/head branch March 27, 2025 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants