Skip to content
View hiyufan's full-sized avatar

Block or report hiyufan

Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
hiyufan/README.md

陈雨钒 · Chen Yufan

系统与 AI 基础设施  ·  Systems & AI Infrastructure

写编译器前端的补丁,也修别人的认证漏洞。
Patching compiler frontends, and fixing other people's auth bypasses.


Rust Go Python TypeScript Vue React
PyTorch Apache TVM Linux Docker Git

profile views

🔧 开源贡献 · Open Source

给自己在用的项目提交的修复。链接指向 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 flatten dims in the Relax PyTorch frontend. An out-of-range negative start_dim silently computed a wrong shape that only failed further downstream in reshape. 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.argsort return int64 indices; the frontend emitted int32. _topk in 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 reshape reads a literal 0 as "copy the input dimension" (ONNX allowzero=0) where PyTorch reads a real zero-sized one, so reshape / view / flatten / unflatten on 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 in RemoveRedundantReshape, 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 / rescale with 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__ and kornia.color.__all__ listed names that were not bound, so import * raised AttributeError. 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__.


🛠 项目 · Projects

项目 说明 技术栈
alcedo 高性能视频平台解析核心,35 个平台,纯 Rust 零外部进程依赖
抖音 / 小红书 / B站 / 快手 / YouTube / TikTok 等
Rust
拾帧 抖音 / 小红书 / X 等平台视频图片在线提取,一键转 GIF 和实况照片
线上服务 · parse-video-py 驱动
Python FastAPI Docker
yf-quant 🔒 基于 Qlib 的美股量化研究平台
日频研究工作流:元数据存储、确定性校验、实验报告、Qlib 适配层
Python Qlib
edubridge 高校教务系统中间件 Go Vue

📚 正在学 · Currently Learning

RAG · 检索增强生成
分块与召回策略、重排序、评测方法

LLM 推理引擎
vLLM / SGLang 的调度与显存管理

深度学习编译器
TVM Relax、算子融合与代码生成


📊 数据 · Stats

🐍 贡献图 · Contribution Graph

contribution snake animation

📮 联系 · Contact

Email GitHub

欢迎交流 AI 基础设施、编译器与开源协作
Happy to talk about AI infrastructure, compilers, and open source.

Pinned Loading

  1. apache/tvm apache/tvm Public

    Open Machine Learning Compiler Framework

    Python 13.9k 4k

  2. kornia/kornia kornia/kornia Public

    🐍 Geometric Computer Vision Library for Spatial AI

    Python 11.6k 1.5k

  3. shizhen shizhen Public

    求原图:Steam 动态头像/头像框/贴纸、HoYoPlay 壁纸、Apple Music/QQ 音乐/网易云封面提取;抖音/小红书/YouTube 视频原图下载,转 GIF、实况与动态照片。开源自部署。Steam assets, HoYoPlay wallpapers & animated album artwork downloader.

    Python 37 2

  4. alcedo alcedo Public

    高性能视频平台解析核心:35 个平台,纯 Rust,零外部进程依赖。抖音 / 小红书 / B站 / 快手 / YouTube / TikTok 等

    Rust 5 1