[torchlib] logcumsumexp underflows to -inf for prefixes far below the global max
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 64/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- backend, machine-learning
Línea de trabajo
Start with the torchlib implementation of torch.logcumsumexp and its aten_logcumsumexp decomposition, then review the changes referenced by #904 and #327. Use the provided Python reproduction to compare the exported model with PyTorch eager. The work is done when prefixes far below the global maximum remain finite and match the eager result.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
torch.logcumsumexp exported through torchlib returns -inf for any prefix whose values sit far below the maximum of the whole dimension. aten_logcumsumexp subtracts a single ReduceMax over the dim before Exp, so those early entries underflow to 0 in float32 and their log becomes -inf.
import torch
class M(torch.nn.Module):
def forward(self, x):
return torch.logcumsumexp(x, 0)
x = torch.tensor([-200., -100., 100.])
p = torch.onnx.export(M(), (x,), dynamo=True)
print(p(x)[0])
print(M()(x))
Observed: tensor([-inf, -inf, 100.])
Expected (PyTorch eager): tensor([-200., -100., 100.])
This hits running log-probability sums (CTC or HMM style) where early steps are very negative. #904 closed #327 with the subtract-max trick and no Scan; this input needs a per-prefix max, which one global max cannot provide.
onnxscript 0.7.2 (the function is identical on main), torch 2.14.1+cpu, onnxruntime 1.31.0, Python 3.13, Windows 11.
- Lenguaje dominante
- Python
- Estrellas
- 456
- Forks
- 148
- Merge medio
- 3 d 13 h
- PR fusionados (30 d)
- 21
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/onnxscript
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoft/onnxscript#3003 · 3 comentarios ·
Los mantenedores suelen responder en 3 días
-
CI : Pin github actions to full commit SHAPosiblemente ocupada @Aniketsy la tomó hace 179 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
microsoft/onnxscript#2903 · 6 comentarios ·
Los mantenedores suelen responder en 3 días
-
optimize() crashes when constant folding produces a string tensorPosiblemente ocupada @nniiovoo la tomó hace 4 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
microsoft/onnxscript#3129 ·
Los mantenedores suelen responder en 3 días
-
[torchlib] Float remainder is off by the divisor when the quotient rounds up, and nan for an infinite divisorPosiblemente ocupada @usmanmateen la tomó hace 10 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
microsoft/onnxscript#3116 ·
Los mantenedores suelen responder en 3 días
-
[torchlib] Float floor_divide is one too large when the quotient rounds up to a whole numberQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 57/100
microsoft/onnxscript#3115 ·
Los mantenedores suelen responder en 3 días
Todos los issues de microsoft/onnxscript
Issues similares
-
Add `openai_safety_identifier`, the replacement for the `user` field that `openai_user` sendsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
pydantic/pydantic-ai#12091 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Enhance blog readabilityAbiertoCSS enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
pychess/pychess-variants#2448 ·
Los mantenedores suelen responder en 1 día
-
Bump locked PyTensor so Apple clang 21 does not pass -ld64Posiblemente ocupada @drbenvincent la tomó hoy. Abiertobug dev ops
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 2 días
-
ai_p2 bug comp-datalake
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
ClickHouse/ClickHouse#128306 · 1 comentario ·
Los mantenedores suelen responder en 1 día