Skip to content

[Intel GPU] enable use of dinov2 models for offload benchmark_low_bit_adam#3191

Merged
liangan1 merged 2 commits intopytorch:mainfrom
arlesniak:arlesniak/xpu_optim_bench_dino_model_align
Dec 17, 2025
Merged

[Intel GPU] enable use of dinov2 models for offload benchmark_low_bit_adam#3191
liangan1 merged 2 commits intopytorch:mainfrom
arlesniak:arlesniak/xpu_optim_bench_dino_model_align

Conversation

@arlesniak
Copy link
Copy Markdown
Contributor

Fix for the assertion:
AssertionError: Input height (224) doesn't match model (518).
when running benchmark_low_bit_adam with i.e. timm/vit_giant_patch14_dinov2.lvd142m (results for the offload benchmarks)

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Oct 16, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3191

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

✅ No Failures

As of commit 24d094a with merge base b9e5780 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@meta-cla meta-cla 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 Oct 16, 2025
@liangan1 liangan1 self-requested a review October 17, 2025 07:36
@liangan1 liangan1 added topic: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories) ciflow/xpu label used to trigger xpu CI jobs labels Oct 17, 2025
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Oct 17, 2025

To add the ciflow label ciflow/xpu please first approve the workflows that are awaiting approval (scroll to the bottom of this page).

This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows.

@pytorch-bot pytorch-bot bot removed the ciflow/xpu label used to trigger xpu CI jobs label Oct 17, 2025
@arlesniak
Copy link
Copy Markdown
Contributor Author

@pytorchbot retest

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Oct 24, 2025

❌ 🤖 pytorchbot command failed:

@pytorchbot: error: argument command: invalid choice: 'retest' (choose from 'merge', 'revert', 'rebase', 'label', 'drci', 'cherry-pick')

usage: @pytorchbot [-h] {merge,revert,rebase,label,drci,cherry-pick} ...

Try @pytorchbot --help for more info.

@liangan1 liangan1 added the ciflow/xpu label used to trigger xpu CI jobs label Oct 26, 2025
@arlesniak arlesniak force-pushed the arlesniak/xpu_optim_bench_dino_model_align branch from 8a44016 to d5312a9 Compare October 30, 2025 12:57
@pytorch-bot pytorch-bot bot removed the ciflow/xpu label used to trigger xpu CI jobs label Oct 30, 2025
@liangan1 liangan1 added the ciflow/xpu label used to trigger xpu CI jobs label Nov 4, 2025
@liangan1
Copy link
Copy Markdown
Collaborator

@arlesniak this is the benchmark part, you also need to enable the realted UTs

@arlesniak
Copy link
Copy Markdown
Contributor Author

@arlesniak this is the benchmark part, you also need to enable the realted UTs

The PR changes are solely for the purpose of the benchmark when dinov2 models are used with it. The root cause of the error was the hardcoded input size, fixed with more flexible solution.These changes don't affect the TorchAo functionality and IMHO are not to be unit tested.

@liangan1 liangan1 requested a review from jerryzh168 November 21, 2025 00:44
@EikanWang
Copy link
Copy Markdown

@liangan1 , @arlesniak , is the issue a XPU-specific issue? According to the error message, it should be a general issue, rigth?

@arlesniak
Copy link
Copy Markdown
Contributor Author

@EikanWang It's a general issue, the fix is needed for the benchmark to be run with models on IntelGPU and others. (https://github.com/pytorch/ao/blob/main/torchao/optim/README.md)


def get_dloader(args, training: bool):
transforms = [v2.ToImage()]
input_size = (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a example benchmark command for xpu in the start of the file as a comment?

@pytorch-bot pytorch-bot bot removed the ciflow/xpu label used to trigger xpu CI jobs label Dec 5, 2025
@liangan1 liangan1 added ciflow/xpu label used to trigger xpu CI jobs xpu Intel XPU related features labels Dec 15, 2025
@arlesniak arlesniak force-pushed the arlesniak/xpu_optim_bench_dino_model_align branch from 09612c9 to 24d094a Compare December 16, 2025 11:13
@pytorch-bot pytorch-bot bot removed the ciflow/xpu label used to trigger xpu CI jobs label Dec 16, 2025
@liangan1 liangan1 added the ciflow/xpu label used to trigger xpu CI jobs label Dec 16, 2025
@liangan1 liangan1 merged commit f3342a0 into pytorch:main Dec 17, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/xpu label used to trigger xpu CI jobs CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories) xpu Intel XPU related features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants