Only set torch preference for engined that actually work#3979
Draft
SuperSandro2000 wants to merge 1 commit into
Draft
Only set torch preference for engined that actually work#3979SuperSandro2000 wants to merge 1 commit into
SuperSandro2000 wants to merge 1 commit into
Conversation
qnnpack does not work on x86 and fbgemm uses x86 specific instructions.
| # torch aarch64 wheels advertise fbgemm in supported_engines but its kernels are x86-only. | ||
| is_arm = platform.machine().lower() in ("arm64", "aarch64", "armv8l", "armv7l") | ||
| preference = ("qnnpack", "fbgemm") if is_arm else ("fbgemm", "qnnpack") | ||
| preference = ("qnnpack") if is_arm else ("fbgemm") |
Contributor
There was a problem hiding this comment.
This is now not a tuple but a plain string, so the next down on line 92 will fail.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
qnnpack does not work on x86 and fbgemm uses x86 specific instructions.
What does this implement/fix?
When packaging Music Assistant for NixOS I noticed due to our systemd hardening that qnnpack failed to set up and according to the internet qnnpack probably does not even work on my x86 hardware.
Related issue (if applicable):
Types of changes
bugfixnew-featureenhancementnew-providerbreaking-changerefactordocumentationmaintenancecidependenciesChecklist
pre-commit run --all-filespasses.pytestpasses, and tests have been added/updated undertests/where applicable.music-assistant/modelsis linked.music-assistant/frontendis linked.