KEMBAR78
torch/ao/quantization/utils.py: Moving eps to targeted device to avoid device mismatch issue by yintong-lu · Pull Request #135204 · pytorch/pytorch · GitHub
Skip to content

Conversation

@yintong-lu
Copy link
Contributor

MOTIVATION

We recently verified some quantization tests on devices other than cpu (eg. CUDA and Intel Gaudi devices identified as 'hpu'). We noticed a device mismatch error as eps is a tensor created on cpu but other tensors (min_val_neg, max_val_pos, scale, zero_point) are moved to the targeted device.

CHANGES

Move eps to device of other tensors.

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 5, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 7a4033b with merge base 5b442e8 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 5, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@soulitzer soulitzer requested a review from jerryzh168 September 6, 2024 01:44
@soulitzer soulitzer added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Sep 6, 2024
@jgong5
Copy link
Collaborator

jgong5 commented Oct 15, 2024

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 15, 2024
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@yintong-lu yintong-lu deleted the fix_eps_device branch October 17, 2024 01:38
aostrowski-hbn pushed a commit to HabanaAI/pytorch-fork that referenced this pull request Jan 7, 2025
…, move eps to device of other tensors to avoid device mismatch issue. 2) pytorch upstream pr: pytorch#135204. This pull request is merged.

Change-Id: I52cad8dda1df4952bbdb2e4bc8eb39d9ab3e800f
Signed-off-by:: internal developer <developer@habana.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged open source release notes: AO frontend release notes: quantization release notes category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants