Skip to content

Conversation

@psaab
Copy link
Contributor

@psaab psaab commented Sep 6, 2022

Summary: quantize_val_arm is used in the kernels when building under aarch64

Test Plan: CI

Differential Revision: D39272746

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Sep 6, 2022

🔗 Helpful links

✅ No Failures (1 Pending)

As of commit ca4696f (more details on the Dr. CI page):

Expand to see more

Commit ca4696f was recently pushed. Waiting for builds...


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@facebook-github-bot
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this qualification needed?

@psaab
Copy link
Contributor Author

psaab commented Sep 6, 2022 via email

@kimishpatel
Copy link
Contributor

quantize_val_arm

I dont follow. quantize_val_arm is defined "if you are not USE_FBGEMM". Your changes say define quantize_val_arm "if you are not USE_FBGEMM OR you are aarch64". But if you are building for aarch64 you shouldnt really have USE_FBGEMM=1. SO not sure why the build would fail.

quantize_val_arm is actually used here https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/quantized/cpu/kernels/QuantizedOpKernels.cpp#L3373. So if you want to use appropriate macros to define it, a better thing to do would be to refactor that such that quantize_val_arm uses this, https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/quantized/cpu/kernels/QuantizedOpKernels.cpp#L3274.

I do agree though that this part of the code can be refactored for better readability. It is a bit of a mess.

@psaab
Copy link
Contributor Author

psaab commented Sep 6, 2022 via email

@kimishpatel
Copy link
Contributor

I took the easy way out to get things working. I'll refactor. Thx

On Tue, Sep 6, 2022 at 8:33 AM Kimish Patel @.> wrote: quantize_val_arm I dont follow. quantize_val_arm is defined "if you are not USE_FBGEMM". Your changes say define quantize_val_arm "if you are not USE_FBGEMM OR you are aarch64". But if you are building for aarch64 you shouldnt really have USE_FBGEMM=1. SO not sure why the build would fail. quantize_val_arm is actually used here https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/quantized/cpu/kernels/QuantizedOpKernels.cpp#L3373. So if you want to use appropriate macros to define it, a better thing to do would be to refactor that such that quantize_val_arm uses this, https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/quantized/cpu/kernels/QuantizedOpKernels.cpp#L3274 . I do agree though that this part of the code can be refactored for better readability. It is a bit of a mess. — Reply to this email directly, view it on GitHub <#84564 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQCUVJQJTQFBAK2EK3SF3V45P27ANCNFSM6AAAAAAQFZR4GI . You are receiving this because you authored the thread.Message ID: @.>

Sure but were you building for aarch64 with USE_FBGEMM=1? I dont think you want to do that. And if you dont do that, it should likely just work out of the box.

@psaab
Copy link
Contributor Author

psaab commented Sep 6, 2022

Well, we're trying to actually use simde to wrap a lot of the AVX/SSE code for aarch64 vs do a direct aarch64 port.

@jianyuh
Copy link
Member

jianyuh commented Sep 6, 2022

I guess ideally we would have QNNPACK for arm on mobile side for PyTorch, but @psaab is also exploring the option of using arm for server side (so checking if FBGEMM is working with simde conversion in FBGEMM PR like pytorch/FBGEMM#1271 ).

Copy link
Contributor

@kimishpatel kimishpatel left a comment

Choose a reason for hiding this comment

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

Looks ok for now. Do leave a comment as to a) why do this and b) maybe a better refactor might be to get _arm variants into arm specific macros.

@facebook-github-bot
Copy link
Contributor

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

@psaab
Copy link
Contributor Author

psaab commented Sep 6, 2022

@pytorchbot merge -g

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here.
The merge job was triggered with the green (-g) flag. This means that your change will be merged once all checks on your PR have passed (ETA: 0-4 Hours). If this is not the intended behavior, feel free to use some of the other merge options in the wiki.
Please reach out to the PyTorch DevX Team with feedback or questions!

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: The following mandatory check(s) failed (Rule superuser):

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

@psaab
Copy link
Contributor Author

psaab commented Sep 7, 2022

@pytorchbot merge -g

…rch#84564)

Summary:
Pull Request resolved: pytorch#84564

quantize_val_arm is used in the kernels when building under aarch64

Test Plan: CI

Reviewed By: kimishpatel, pallab-zz

Differential Revision: D39272746

fbshipit-source-id: 611a9a7b7f89ca268cd62a9e72db3f4f4c435fb9
@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here.
The merge job was triggered with the green (-g) flag. This means that your change will be merged once all checks on your PR have passed (ETA: 0-4 Hours). If this is not the intended behavior, feel free to use some of the other merge options in the wiki.
Please reach out to the PyTorch DevX Team with feedback or questions!

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: The following mandatory check(s) failed (Rule superuser):

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

@facebook-github-bot
Copy link
Contributor

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

@ajtulloch
Copy link
Contributor

@pytorchbot merge -g

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here.
The merge job was triggered with the green (-g) flag. This means that your change will be merged once all checks on your PR have passed (ETA: 0-4 Hours). If this is not the intended behavior, feel free to use some of the other merge options in the wiki.
Please reach out to the PyTorch DevX Team with feedback or questions!

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2022

Hey @psaab.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

facebook-github-bot pushed a commit that referenced this pull request Sep 9, 2022
…) (#84564)

Summary:
quantize_val_arm is used in the kernels when building under aarch64

Pull Request resolved: #84564
Approved by: https://github.com/kimishpatel

Test Plan:
contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/6bedb7a75e2c6712ef3a8de3283fe44adab4a659

Test plan from GitHub:
CI

Original Phabricator Test Plan:
CI

Reviewed By: kimishpatel, pallab-zz

Differential Revision: D39272746

fbshipit-source-id: a46dfacc50e34cabefd607be0059b8474017b330
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants