系统与 AI 基础设施 · Systems & AI Infrastructure
写编译器前端的补丁,也修别人的认证漏洞。
Patching compiler frontends, and fixing other people's auth bypasses.
给自己在用的项目提交的修复。链接指向 PR —— 5 个已提交,5 个已合并;Apache TVM 占 3 个。 Fixes sent to projects I use. Five pull requests, all merged; three of them in Apache TVM.
Apache TVM 13.7k ★ 深度学习编译器
#20245 🎉 已合并 merged — 修复 Relax PyTorch 前端 flatten 的参数校验缺陷。越界的负 start_dim 不在使用处报错:它被归一化成 -1,把多余的一维折进乘积,发出形状错误的 reshape,直到下游才失败。补上范围与顺序校验、0 维张量支持和回归测试。
Validate
flattendims in the Relax PyTorch frontend. An out-of-range negativestart_dimsilently computed a wrong shape that only failed further downstream inreshape. Added range and ordering checks, 0-d input support, and regression tests.
#20254 🎉 已合并 merged — torch.sort / torch.argsort 返回 int64 索引,前端却发 int32。同文件的 _topk 已经显式覆盖了同一个 int32 默认值,说明这是遗漏而非约定;前端支持的其他索引类算子(argmax、argmin、max(dim)、median(dim)、bucketize)也都是 int64。一张导入图会因此对同一种值带上两种索引 dtype。
torch.sort/torch.argsortreturn int64 indices; the frontend emitted int32._topkin the same file already overrides the identical default, and every other index-producing op comes out int64 — so one imported graph could carry two index dtypes for the same kind of value.
#20255 🎉 已合并 merged — Relax 的 reshape 把目标形状里的字面 0 读作"沿用输入对应维度"(ONNX allowzero=0 语义),PyTorch 读作真实的零维。空张量上的 reshape / view / flatten / unflatten 因此报错或静默给出错误形状;flatten 在 (0,3) 上恰好正确,正是这个巧合掩盖了其余情形。与 torch 逐例对照验证:2132 组静态形状,以及 938 组目标可含符号维的动态形状 —— 后者由维护者 review 中指出的两个残留缺口驱动补上,修复后其中 314 组由错转对。顺带修掉 RemoveRedundantReshape 的一个同源缺陷:它合并相邻 reshape 时把已解析的字面 0 挪到新输入上,零被重新当成"拷贝维度",整段改写连同 reshape 一起被删掉(938 组里有 24 组因此出错)。
Relax's
reshapereads a literal0as "copy the input dimension" (ONNXallowzero=0) where PyTorch reads a real zero-sized one, soreshape/view/flatten/unflattenon empty tensors raised or silently produced a wrong shape. Verified case by case against torch: 2132 static shapes, plus 938 dynamic ones whose target can reach a symbolic dimension, which found two further gaps under review. Also fixes the same confusion inRemoveRedundantReshape, which re-parented a resolved target onto a different input and so read its literal zeros as dimension copies, dropping the rewrite entirely in 24 of those cases.
kornia 11.3k ★ 可微分计算机视觉
#4140 🎉 已合并 merged — 统一 resize / rescale 的零尺寸语义。它们对零尺寸输出抛裸 ZeroDivisionError,而 warp_affine、warp_perspective、center_crop 对同样的参数返回空图像。空结果还需保持在自动微分图上 —— 否则一个退化成零尺寸的 batch 元素会静默断开梯度,这是 review 中提出、复现并修掉的。经 512 组形状 / 精度 / 插值模式组合验证,对合法输入数值零影响。
Align zero-size semantics in
resize/rescalewith the warping ops, and keep the empty result attached to the autograd graph so a batch element that degenerates to a zero-sized output still contributes a zero gradient. Verified numerically inert across 512 shape / dtype / interpolation combinations.
#4143 🎉 已合并 merged — kornia.core.__all__ 与 kornia.color.__all__ 列出了模块里并未绑定的名字,from kornia.core import * 直接抛 AttributeError。既有的 API 面守卫看不到这类问题 —— 它比对的就是 __all__ 本身,绑定丢失的名字仍然"在列"。恢复绑定、清理遗留条目,并加了一条覆盖全仓库每一个声明 __all__ 模块的解析守卫。
kornia.core.__all__andkornia.color.__all__listed names that were not bound, soimport *raisedAttributeError. The existing surface guard could not see it — it compares__all__against itself. Restored the bindings, dropped the leftover entry, and added a resolve check across every module that declares__all__.
| 项目 | 说明 | 技术栈 |
|---|---|---|
| alcedo | 高性能视频平台解析核心,35 个平台,纯 Rust 零外部进程依赖 抖音 / 小红书 / B站 / 快手 / YouTube / TikTok 等 |
Rust |
| 拾帧 | 抖音 / 小红书 / X 等平台视频图片在线提取,一键转 GIF 和实况照片 线上服务 · parse-video-py 驱动 |
Python FastAPI Docker |
| yf-quant 🔒 | 基于 Qlib 的美股量化研究平台 日频研究工作流:元数据存储、确定性校验、实验报告、Qlib 适配层 |
Python Qlib |
| edubridge | 高校教务系统中间件 | Go Vue |
|
RAG · 检索增强生成
|
LLM 推理引擎
|
深度学习编译器
|




