[torchlib] logcumsumexp underflows to -inf for prefixes far below the global max
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 64/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- backend, machine-learning
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 456
- Fork
- 148
- Merge trung bình
- 3 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 21
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/onnxscript
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/onnxscript#3003 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
CI : Pin github actions to full commit SHACó thể đã có người làm @Aniketsy đã nhận 179 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/onnxscript#2903 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
optimize() crashes when constant folding produces a string tensorCó thể đã có người làm @nniiovoo đã nhận 4 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
microsoft/onnxscript#3129 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[torchlib] Float remainder is off by the divisor when the quotient rounds up, and nan for an infinite divisorCó thể đã có người làm @usmanmateen đã nhận 10 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
microsoft/onnxscript#3116 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[torchlib] Float floor_divide is one too large when the quotient rounds up to a whole numberCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
microsoft/onnxscript#3115 ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của microsoft/onnxscript
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
vllm-project/vllm#64845 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
dekobon/big-code-analysis#1729 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add `openai_safety_identifier`, the replacement for the `user` field that `openai_user` sendsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
pydantic/pydantic-ai#12091 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100