Skip to content
Merged
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
3 changes: 2 additions & 1 deletion backends/qualcomm/_passes/recompose_hadamard.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import os
from operator import attrgetter

import torch
Expand Down Expand Up @@ -156,7 +157,7 @@ def _is_hadamard_transform(self, graph_module, node):
def call(self, graph_module: torch.fx.GraphModule):
# HadamardTransform is only supported by QNN 2.47+. On older SDKs skip the
# rewrite so the op keeps its normal lowering path.
if is_qnn_sdk_version_less_than("2.47"):
if not os.environ.get("QNN_SDK_ROOT") or is_qnn_sdk_version_less_than("2.47"):
return PassResult(graph_module, False)

graph = graph_module.graph
Expand Down
Loading