Qualcomm AI Engine Direct: a delegated mutable buffer starts from leftover memory
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- python
- Domínio
- embedded-iot, machine-learning
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Python
- Estrelas
- 5.2k
- Forks
- 1.2k
- Merge médio
- 1d 23h
- PRs com merge (30d)
- 700
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de pytorch/executorch
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
pytorch/executorch#24767 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
pytorch/executorch#24434 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
pytorch/executorch#24410 ·
Mantenedores costumam responder em até 1 dia
-
enhancement triaged
Dificuldade 2/5 Meio dia Facilidade para iniciantes 68/100
pytorch/executorch#21640 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
pytorch/executorch#24766 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de pytorch/executorch
Issues semelhantes
-
community enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
NVIDIA/auto-ontology#463 ·
Mantenedores costumam responder em até 1 dia
-
Update Atari link on Gymnasium docs pageTalvez já em andamento @qwist1233-cpu assumiu hoje. Abertahelp wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
Farama-Foundation/Gymnasium#1845 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 91/100
WingedGuardian/GENesis-AGI#4101 ·
Mantenedores costumam responder em até 1 dia