Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions backends/qualcomm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import os

import cpuinfo
import torch

from .scripts.download_qnn_sdk import install_qnn_sdk, is_linux_x86


Expand All @@ -11,3 +14,8 @@
ok = install_qnn_sdk()
if not ok:
raise RuntimeError("Failed to install QNN SDK. Please check the logs above.")

info = cpuinfo.get_cpu_info()
vendor = info.get("vendor_id_raw", "").lower()
if "amd" in vendor:
torch.backends.mkldnn.enabled = False
1 change: 1 addition & 0 deletions backends/qualcomm/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
set -e

pip install pydot
pip install py-cpuinfo

# Check if running on macOS/Darwin
if [[ "$(uname -s)" == "Darwin" ]]; then
Expand Down
Loading