Qualcomm AI Engine Direct: HTP float16 Concat reads a static bool input of all True as False

未关闭
#24,750 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
python

调研方向

Start with CatBoolConstant in test_qnn_backend_cat and reproduce the reported case on the QNN SDK 2.51 x86 simulator. Compare HTP float16 Concat output with the static bool input and inspect the QNN Saver tensor values. Done means identifying why the constant is read as False and confirming correct output; the issue says the partitioner workaround can then be removed.

由索引模型根据 Issue 内容生成。

描述

module: qnn partner: qualcomm

In HTP float16, Concat can read a static bool input of all True as False, with
no error:

class CatBoolConstant(torch.nn.Module):
    def forward(self, x, y):
        return torch.cat((x > 0, torch.full((1, 1, 2, 2), True)), axis=3)

On the x86 simulator of QNN SDK 2.51, with a positive x, the part that comes
from the constant comes back as False. QNN Saver shows the static tensor holds
0x01 for every element, so the input given to QNN is right. The wrong result
depends on the shapes and on where the static input is. Quantized graphs, float
and int32 cats, and constants with mixed values come out right. Not checked on a
device yet.

The QNN partitioner now keeps every such bool cat on CPU in HTP float16. That
also moves cats that would come out right, and can split a graph into 2
delegates. CatBoolConstant in test_qnn_backend_cat checks the values, so the
rule can be removed once HTP reads the input right.

cc @cccclai @winskuo-quic @shewu-quic @haowhsu-quic @DannyYuyang-quic @qti-horodnic @cbilgin @abhinaykukkadapu @psiddh

主要语言
Python
星标
5.2k
派生
1.2k
平均合并
1 天 23 小时
30 天内合并 PR
696

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pytorch/executorch 的其他 Issue

查看 pytorch/executorch 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。