Qualcomm AI Engine Direct: a delegated mutable buffer starts from leftover memory
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
Start by reading the QNN partitioner logic that decides whether mutable buffers are delegated, including the int64 special case, and trace how delegated buffers are initialized before their first run. Reproduce the counter example with the QNN SDK 2.51 x86 simulator and compare delegated results with CPU results. Done means delegated buffers begin with the registered value across dtypes, and the int64 special case can be removed.
由索引模型根据 Issue 内容生成。
描述
When the QNN partitioner delegates a mutable buffer (the default,
skip_mutable_buffer=False), the buffer lives in memory that the QNN delegate
owns. Nothing sets that memory before the first run, so the buffer starts from
whatever the memory held. The result is wrong with no error.
Example: a counter that should start at zero.
class Int32Counter(torch.nn.Module):
def __init__(self):
super().__init__()
self.register_buffer("count", torch.zeros(2, dtype=torch.int32))
def forward(self, x):
self.count.add_(x.argmax(-1).to(torch.int32))
return x * 2, self.count + 0
With x = [[0.1, 0.9, 0.2], [0.7, 0.1, 0.3]] the first run should return
count = [1, 0]. Lowered for HTP float16 and run on the QNN SDK 2.51 x86
simulator, it returns values like [-1486893823, 32716], different on every
run.
Int64 buffers already stay on CPU for this reason, and the same counter with
an int64 buffer comes out right. Buffers of other dtypes,
including float buffers such as KV caches, are still delegated.
Expected: a delegated buffer starts from the same value as a CPU one, so the
int64 special case in the partitioner can go.
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
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pytorch/executorch 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
pytorch/executorch#24434 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
pytorch/executorch#24410 ·
维护者通常 1 天内回复
-
enhancement triaged
难度 2/5 半天 新手友好度 68/100
pytorch/executorch#21640 ·
维护者通常 1 天内回复
-
module: qnn partner: qualcomm
难度 4/5 3-5 天 新手友好度 45/100
pytorch/executorch#24750 ·
维护者通常 1 天内回复
-
CUDA AOTI:`reinterpret_tensor` drops the source tensor's storage offset可能已有人在做 @mshr-h 今天认领。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
pytorch/executorch#24737 · 1 条评论 ·
维护者通常 1 天内回复
查看 pytorch/executorch 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
Textualize/textual#6753 · 1 条评论 ·
-
priority:low size:small
难度 2/5 1-3 小时 新手友好度 70/100
RonaldHensbergen/composable-data-stack#1177 ·
维护者通常 1 天内回复
-
Use registered media types for HDF5 and NetCDF, and stop claiming media_type must be IANA-registered未关闭documentation metadata
难度 2/5 1-3 小时 新手友好度 87/100
维护者通常 1 天内回复
-
check-typing: ty 0.0.98+ fails on the renamed rule `unresolved-import` (now `import-not-found`)可能已有人在做 @oberstet 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 91/100
crossbario/cfxdb#145 ·