[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-thuml--depyf":3,"tool-thuml--depyf":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":80,"owner_location":80,"owner_email":81,"owner_twitter":80,"owner_website":82,"owner_url":83,"languages":84,"stars":93,"forks":94,"last_commit_at":95,"license":96,"difficulty_score":23,"env_os":97,"env_gpu":98,"env_ram":99,"env_deps":100,"category_tags":106,"github_topics":107,"view_count":23,"oss_zip_url":80,"oss_zip_packed_at":80,"status":16,"created_at":111,"updated_at":112,"faqs":113,"releases":143},3851,"thuml\u002Fdepyf","depyf","depyf is a tool to help you understand and adapt to PyTorch compiler torch.compile.","depyf 是一款专为 PyTorch 开发者设计的开源工具，旨在帮助用户深入理解并优化 PyTorch 编译器 torch.compile 的工作机制。许多用户在使用 torch.compile 时，常因其生成的字节码和内部实现细节如同“黑魔法”般难以捉摸，导致无法有效调试或提升代码性能。depyf 通过先进的 Python 反编译技术，将 torch.compile 生成的复杂字节码还原为可读性极高的 Python 源代码，让用户能够直观地看到编译器究竟做了什么。\n\n与其他反编译工具相比，depyf 在多个 Python 版本（3.7 至 3.11）及 PyTorch 场景下均实现了 100% 的反编译成功率，填补了现有工具对 PyTorch 支持不足的空白。它特别适合需要深入底层原理的 AI 研究人员、框架开发者以及希望最大化模型推理性能的工程师使用。只需简单地将代码包裹在上下文管理器中，depyf 即可自动输出详细的源码信息，极大降低了学习门槛。作为 PyTorch 官方生态项目之一，depyf 与 PyTorch 团队紧密合作，建议搭配 PyTorch 2.2.0 及以上版本","depyf 是一款专为 PyTorch 开发者设计的开源工具，旨在帮助用户深入理解并优化 PyTorch 编译器 torch.compile 的工作机制。许多用户在使用 torch.compile 时，常因其生成的字节码和内部实现细节如同“黑魔法”般难以捉摸，导致无法有效调试或提升代码性能。depyf 通过先进的 Python 反编译技术，将 torch.compile 生成的复杂字节码还原为可读性极高的 Python 源代码，让用户能够直观地看到编译器究竟做了什么。\n\n与其他反编译工具相比，depyf 在多个 Python 版本（3.7 至 3.11）及 PyTorch 场景下均实现了 100% 的反编译成功率，填补了现有工具对 PyTorch 支持不足的空白。它特别适合需要深入底层原理的 AI 研究人员、框架开发者以及希望最大化模型推理性能的工程师使用。只需简单地将代码包裹在上下文管理器中，depyf 即可自动输出详细的源码信息，极大降低了学习门槛。作为 PyTorch 官方生态项目之一，depyf 与 PyTorch 团队紧密合作，建议搭配 PyTorch 2.2.0 及以上版本使用，以获得最佳体验。","![Logo](imgs\u002Flogo-and-text.svg)\n\n[![Documentation Status](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fthuml_depyf_readme_13d664e1afd7.png)](https:\u002F\u002Fdepyf.readthedocs.io\u002Fen\u002Flatest\u002F) ![Supported Python Versions](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue) ![Python Decompilation Tests](https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Factions\u002Fworkflows\u002Ftest_decompile.yml\u002Fbadge.svg) ![PyTorch Integration Tests](https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Factions\u002Fworkflows\u002Ftest_pytorch.yml\u002Fbadge.svg) [![Test Coverage](https:\u002F\u002Fcodecov.io\u002Fgithub\u002Fthuml\u002Fdepyf\u002Fgraph\u002Fbadge.svg?token=DUQ1CQ0I5U)](https:\u002F\u002Fcodecov.io\u002Fgithub\u002Fthuml\u002Fdepyf) ![MIT License](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fthuml\u002Fdepyf)\n\n> `depyf` is proud to be a [PyTorch ecosystem project](https:\u002F\u002Fpytorch.org\u002Fecosystem\u002F). Check out the announcement blog [https:\u002F\u002Fpytorch.org\u002Fblog\u002Fintroducing-depyf\u002F](https:\u002F\u002Fpytorch.org\u002Fblog\u002Fintroducing-depyf\u002F) for more details.\n\nHave you ever felt overwhelmed by the complexities of `torch.compile`? Diving into its workings can feel like black magic, with bytecode and Python internal details that many users fail to understand, hindering them from understanding and adapting to `torch.compile`.\n\nIf you also face the problem, then you might be interested in `depyf`. As the logo suggests, `depyf` is a software tool to leverage advanced Python features (the Python snake symbol) to open up internal details (the internal gears symbol) of PyTorch's compiler `torch.compile` (the PyTorch logo), so that users can understand it, adapt to it, and tune their code (the debugger symbol) to get maximum performance benefit out of it.\n\n:warning: This project is developed under close collaborations with the PyTorch team. Therefore, it requires very new features from PyTorch to support better understanding of `torch.compile`. **Please use this project along with PyTorch>=2.2.0 (PyTorch nightly is recommended)**. Visit the [PyTorch website](https:\u002F\u002Fpytorch.org\u002F) for how to install different versions of PyTorch.\n\n:warning: During development, we seek suggestions from the community quite a lot. You may find some early usage examples from some discussion forums or social media platforms. **Please follow the latest documentation for how to use this tool.**\n\n# Why `depyf`?\n\nIf you want to understand bytecode generated by `torch.compile`, then `depyf` might be the only choice for you. Below we tested several existing decompilers, they struggle to decompile simple Python bytecode across versions, and have poor support for PyTorch.\n\n| Decompiler  | Python 3.8   | Python 3.9 | Python 3.10 | Python 3.11 | PyTorch |\n|-------------|--------------|------------|-------------|-------------|---------|\n| [decompyle3](https:\u002F\u002Fgithub.com\u002Frocky\u002Fpython-decompile3)  | 90.6% (77\u002F85)  | ×          | ×           | ×           | ×       |\n| [uncompyle6](https:\u002F\u002Fgithub.com\u002Frocky\u002Fpython-uncompyle6)  | 91.8% (78\u002F85)| ×          | ×           | ×           | ×       |\n| [pycdc](https:\u002F\u002Fgithub.com\u002Fzrax\u002Fpycdc)       | 74.1% (63\u002F85)  | 74.1% (63\u002F85)| 74.1% (63\u002F85) | 67.1% (57\u002F85)          | 19.3% (27\u002F140)|\n| [depyf](https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf)       | 100% (85\u002F85) | 100% (85\u002F85)| 100% (85\u002F85)| 100% (85\u002F85)| 100% (140\u002F140)|\n\n# Installation\n\nStable release: `pip install depyf`\n\nNightly version (recommended): `pip install git+https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf.git`\n\n# Usage\n\nThe main usage is quite simple: just wrap your code within a context manager:\n\n```python\nimport torch\nfrom torch import _dynamo as torchdynamo\nfrom typing import List\n\n@torch.compile\ndef toy_example(a, b):\n    x = a \u002F (torch.abs(a) + 1)\n    if b.sum() \u003C 0:\n        b = b * -1\n    return x * b\n\ndef main():\n    for _ in range(100):\n        toy_example(torch.randn(10), torch.randn(10))\n\nif __name__ == \"__main__\":\n    # main()\n    # surround the code you want to run inside `with depyf.prepare_debug`\n    import depyf\n    with depyf.prepare_debug(\".\u002Fdump_src_dir\"):\n        main()\n```\n\nThen you can see all the details of `torch.compile` inside the directory `.\u002Fdump_src_dir`. The details are organized into the following:\n\n- `full_code_for_xxx.py` for each function using `torch.compile`\n- `__transformed_code_for_xxx.py` for Python code associated with each graph.\n- `__transformed_code_for_xxx.py.xxx_bytecode` for Python bytecode, dumped code object, can be loaded via `dill.load(open(\"\u002Fpath\u002Fto\u002Ffile\", \"wb\"))`. Note that the `load` function might import some modules like `transformers`. Make sure you have these modules installed.\n- `__compiled_fn_xxx.py` for each computation graph and its optimization:\n  - `Captured Graph`: a plain forward computation graph\n  - `Joint Graph`: joint forward-backward graph from `AOTAutograd`\n  - `Forward Graph`: forward graph from `AOTAutograd`\n  - `Backward Graph`: backward graph from `AOTAutograd`\n  - `kernel xxx`: compiled CPU\u002FGPU kernel wrapper from Inductor.\n\nWe collect [all the compilation artifacts](https:\u002F\u002Fgithub.com\u002Fthuml\u002Flearn_torch.compile) when testing over 100 deep learning models. You can take a look to learn how the PyTorch compiler works.\n\nIf you want to use debugger to step through the above code, just add another context manager (and launch the script through debuggers):\n\n```python\nimport torch\nfrom torch import _dynamo as torchdynamo\nfrom typing import List\n\n@torch.compile\ndef toy_example(a, b):\n    x = a \u002F (torch.abs(a) + 1)\n    if b.sum() \u003C 0:\n        b = b * -1\n    return x * b\n\ndef main():\n    for _ in range(100):\n        toy_example(torch.randn(10), torch.randn(10))\n\nif __name__ == \"__main__\":\n    import depyf\n    with depyf.prepare_debug(\".\u002Fdump_src_dir\"):\n        main()\n    # surround the code you want to debug inside `with depyf.debug()`\n    with depyf.debug():\n        main()\n```\n\nCalling `depyf.debug()` will pause the program for you to set breakpoints, and then you can use debuggers to hit breakpoints in these files under the `.\u002Fdump_src_dir` directory you specified above.\n\n# Contact\n\nIf you have any question about `depyf`, feel free to open issues to reach out! Any discussion\u002Fissue report\u002FPR is welcome. Or contact youkaichao@gmail.com if you have any other questions.\n\n# Citing `depyf`\n\nIf you find `depyf` useful, please cite it in your publications.\n\n```latex\n@article{you2024depyf,\n      title={depyf: Open the Opaque Box of PyTorch Compiler for Machine Learning Researchers}, \n      author={Kaichao You and Runsheng Bai and Meng Cao and Jianmin Wang and Ion Stoica and Mingsheng Long},\n      year={2024},\n      eprint={2403.13839},\n      journal={arXiv},\n      primaryClass={cs.LG},\n      url={https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf}\n}\n```","![Logo](imgs\u002Flogo-and-text.svg)\n\n[![文档状态](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fthuml_depyf_readme_13d664e1afd7.png)](https:\u002F\u002Fdepyf.readthedocs.io\u002Fen\u002Flatest\u002F) ![支持的Python版本](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue) ![Python反编译测试](https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Factions\u002Fworkflows\u002Ftest_decompile.yml\u002Fbadge.svg) ![PyTorch集成测试](https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Factions\u002Fworkflows\u002Ftest_pytorch.yml\u002Fbadge.svg) [![测试覆盖率](https:\u002F\u002Fcodecov.io\u002Fgithub\u002Fthuml\u002Fdepyf\u002Fgraph\u002Fbadge.svg?token=DUQ1CQ0I5U)](https:\u002F\u002Fcodecov.io\u002Fgithub\u002Fthuml\u002Fdepyf) ![MIT许可证](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fthuml\u002Fdepyf)\n\n> `depyf` 自豪地成为 [PyTorch 生态系统项目](https:\u002F\u002Fpytorch.org\u002Fecosystem\u002F)。更多详情请参阅公告博客 [https:\u002F\u002Fpytorch.org\u002Fblog\u002Fintroducing-depyf\u002F](https:\u002F\u002Fpytorch.org\u002Fblog\u002Fintroducing-depyf\u002F)。\n\n你是否曾因 `torch.compile` 的复杂性而感到不知所措？深入研究其内部机制，仿佛进入了一片黑魔法领域——字节码和 Python 内部细节让许多用户难以理解，从而阻碍了他们对 `torch.compile` 的掌握与灵活应用。\n\n如果你也有同样的困扰，那么 `depyf` 或许会对你有所帮助。正如其标志所示，`depyf` 是一款利用 Python 高级特性（Python 蛇形符号）来揭示 PyTorch 编译器 `torch.compile`（PyTorch 标志）内部细节（齿轮符号）的工具，旨在帮助用户深入理解、灵活适应并优化代码（调试器符号），从而充分发挥其性能优势。\n\n:warning: 本项目是在与 PyTorch 团队紧密合作下开发的。因此，它依赖于 PyTorch 中非常新的功能，以更好地支持对 `torch.compile` 的理解。**请务必配合 PyTorch>=2.2.0 使用此项目（推荐使用 PyTorch 夜间版）**。有关如何安装不同版本 PyTorch 的信息，请访问 [PyTorch 官网](https:\u002F\u002Fpytorch.org\u002F)。\n\n:warning: 在开发过程中，我们广泛征求社区意见。你可能会在一些讨论论坛或社交媒体平台上找到早期的使用示例。**请以最新文档为准，了解如何使用此工具。**\n\n# 为什么选择 `depyf`？\n\n如果你想深入了解 `torch.compile` 生成的字节码，那么 `depyf` 可能是你的不二之选。我们测试了几款现有的反编译工具，它们在跨版本处理简单 Python 字节码时表现不佳，且对 PyTorch 的支持十分有限。\n\n| 反编译工具   | Python 3.8   | Python 3.9 | Python 3.10 | Python 3.11 | PyTorch |\n|--------------|--------------|------------|-------------|-------------|---------|\n| [decompyle3](https:\u002F\u002Fgithub.com\u002Frocky\u002Fpython-decompile3)  | 90.6% (77\u002F85)  | ×          | ×           | ×           | ×       |\n| [uncompyle6](https:\u002F\u002Fgithub.com\u002Frocky\u002Fpython-uncompyle6)  | 91.8% (78\u002F85)| ×          | ×           | ×           | ×       |\n| [pycdc](https:\u002F\u002Fgithub.com\u002Fzrax\u002Fpycdc)       | 74.1% (63\u002F85)  | 74.1% (63\u002F85)| 74.1% (63\u002F85) | 67.1% (57\u002F85)          | 19.3% (27\u002F140)|\n| [depyf](https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf)       | 100% (85\u002F85) | 100% (85\u002F85)| 100% (85\u002F85)| 100% (85\u002F85)| 100% (140\u002F140)|\n\n# 安装\n\n稳定版：`pip install depyf`\n\n夜间版（推荐）：`pip install git+https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf.git`\n\n# 使用方法\n\n主要用法非常简单：只需将你的代码包裹在一个上下文管理器中即可：\n\n```python\nimport torch\nfrom torch import _dynamo as torchdynamo\nfrom typing import List\n\n@torch.compile\ndef toy_example(a, b):\n    x = a \u002F (torch.abs(a) + 1)\n    if b.sum() \u003C 0:\n        b = b * -1\n    return x * b\n\ndef main():\n    for _ in range(100):\n        toy_example(torch.randn(10), torch.randn(10))\n\nif __name__ == \"__main__\":\n    # main()\n    # 将要运行的代码包围在 `with depyf.prepare_debug` 中\n    import depyf\n    with depyf.prepare_debug(\".\u002Fdump_src_dir\"):\n        main()\n```\n\n随后，你便可在 `.\u002Fdump_src_dir` 目录下查看 `torch.compile` 的所有详细信息。这些内容被组织如下：\n\n- 每个使用 `torch.compile` 的函数对应的 `full_code_for_xxx.py`\n- 每个计算图相关的 Python 代码 `__transformed_code_for_xxx.py`\n- 每个 Python 字节码文件 `__transformed_code_for_xxx.py.xxx_bytecode`，以代码对象形式转储，可通过 `dill.load(open(\"\u002Fpath\u002Fto\u002Ffile\", \"wb\"))` 加载。请注意，`load` 函数可能会导入一些模块，如 `transformers`，请确保已安装这些模块。\n- 每个计算图及其优化对应的 `__compiled_fn_xxx.py`：\n  - `Captured Graph`：原始的前向计算图\n  - `Joint Graph`：来自 `AOTAutograd` 的前向后向联合图\n  - `Forward Graph`：来自 `AOTAutograd` 的前向图\n  - `Backward Graph`：来自 `AOTAutograd` 的后向图\n  - `kernel xxx`：来自 Inductor 的编译后的 CPU\u002FGPU 内核封装。\n\n我们在测试超过 100 个深度学习模型的过程中收集了 [所有编译产物](https:\u002F\u002Fgithub.com\u002Fthuml\u002Flearn_torch.compile)，你可以参考这些内容来了解 PyTorch 编译器的工作原理。\n\n若想使用调试器逐步执行上述代码，只需再添加一个上下文管理器（并通过调试器启动脚本）：\n\n```python\nimport torch\nfrom torch import _dynamo as torchdynamo\nfrom typing import List\n\n@torch.compile\ndef toy_example(a, b):\n    x = a \u002F (torch.abs(a) + 1)\n    if b.sum() \u003C 0:\n        b = b * -1\n    return x * b\n\ndef main():\n    for _ in range(100):\n        toy_example(torch.randn(10), torch.randn(10))\n\nif __name__ == \"__main__\":\n    import depyf\n    with depyf.prepare_debug(\".\u002Fdump_src_dir\"):\n        main()\n    # 将要调试的代码包围在 `with depyf.debug()` 中\n    with depyf.debug():\n        main()\n```\n\n调用 `depyf.debug()` 会暂停程序，以便你设置断点；之后，你就可以使用调试器在上述指定的 `.\u002Fdump_src_dir` 目录下的文件中命中断点。\n\n# 联系方式\n\n如对 `depyf` 有任何疑问，欢迎随时提交问题！我们欢迎任何讨论、问题报告或 Pull Request。如有其他问题，也可联系 youkaichao@gmail.com。\n\n# 引用 `depyf`\n\n如果你认为 `depyf` 对你有所帮助，请在你的论文中引用它。\n\n```latex\n@article{you2024depyf,\n      title={depyf: Open the Opaque Box of PyTorch Compiler for Machine Learning Researchers}, \n      author={Kaichao You and Runsheng Bai and Meng Cao and Jianmin Wang and Ion Stoica and Mingsheng Long},\n      year={2024},\n      eprint={2403.13839},\n      journal={arXiv},\n      primaryClass={cs.LG},\n      url={https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf}\n}\n```","# depyf 快速上手指南\n\n`depyf` 是一个专为 PyTorch 开发者设计的工具，旨在揭开 `torch.compile` 的黑盒面纱。它能将编译后的字节码反编译为可读的 Python 源码，并导出详细的计算图信息，帮助你深入理解、调试和优化 PyTorch 编译流程。\n\n## 环境准备\n\n在开始之前，请确保满足以下系统要求：\n\n*   **Python 版本**：支持 3.7, 3.8, 3.9, 3.10, 3.11。\n*   **PyTorch 版本**：**必须使用 PyTorch >= 2.2.0**。\n    *   为了获得最佳支持和最新功能，强烈推荐使用 **PyTorch Nightly** 版本。\n    *   安装命令参考：`pip install --pre torch --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fnightly\u002Fcu121` (根据具体 CUDA 版本调整)。\n*   **可选依赖**：若需加载导出的 bytecode 文件，可能需要安装 `dill` 及相关模型库（如 `transformers`）。\n\n> **提示**：国内用户可使用清华或阿里镜像源加速 PyTorch 安装，例如：\n> `pip install --pre torch --index-url https:\u002F\u002Fmirror.tuna.tsinghua.edu.cn\u002Fpytorch-whl\u002Fnightly\u002Fcu121`\n\n## 安装步骤\n\n你可以选择安装稳定版或推荐的夜间版（Nightly）：\n\n**选项 1：安装稳定版**\n```bash\npip install depyf\n```\n\n**选项 2：安装夜间版（推荐，获取最新功能）**\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf.git\n```\n> **国内加速**：如果 GitHub 连接缓慢，可使用国内镜像代理：\n> ```bash\n> pip install git+https:\u002F\u002Fghp.ci\u002Fhttps:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf.git\n> ```\n\n## 基本使用\n\n`depyf` 的核心用法非常简单，只需使用上下文管理器包裹你的代码即可。\n\n### 1. 导出编译细节\n\n以下示例展示了如何捕获 `torch.compile` 生成的源码、字节码和计算图，并保存到指定目录。\n\n```python\nimport torch\nfrom torch import _dynamo as torchdynamo\nfrom typing import List\n\n@torch.compile\ndef toy_example(a, b):\n    x = a \u002F (torch.abs(a) + 1)\n    if b.sum() \u003C 0:\n        b = b * -1\n    return x * b\n\ndef main():\n    for _ in range(100):\n        toy_example(torch.randn(10), torch.randn(10))\n\nif __name__ == \"__main__\":\n    import depyf\n    # 使用 prepare_debug 上下文管理器包裹需要运行的代码\n    # 编译产物将保存到 .\u002Fdump_src_dir 目录\n    with depyf.prepare_debug(\".\u002Fdump_src_dir\"):\n        main()\n```\n\n运行后，`.\u002Fdump_src_dir` 目录下将生成以下关键文件：\n*   `full_code_for_xxx.py`: `torch.compile` 装饰函数的完整代码。\n*   `__transformed_code_for_xxx.py`: 与每个计算图关联的 Python 代码（反编译结果）。\n*   `__compiled_fn_xxx.py`: 包含捕获的计算图（Captured Graph）、联合图（Joint Graph）以及 Inductor 编译后的内核包装器。\n\n### 2. 启用断点调试\n\n如果你希望使用标准调试器（如 `pdb` 或 IDE 调试器）逐步跟踪编译后的代码逻辑，可以额外添加 `depyf.debug()` 上下文管理器。\n\n```python\nimport torch\nfrom torch import _dynamo as torchdynamo\nfrom typing import List\n\n@torch.compile\ndef toy_example(a, b):\n    x = a \u002F (torch.abs(a) + 1)\n    if b.sum() \u003C 0:\n        b = b * -1\n    return x * b\n\ndef main():\n    for _ in range(100):\n        toy_example(torch.randn(10), torch.randn(10))\n\nif __name__ == \"__main__\":\n    import depyf\n    # 第一步：准备调试环境并导出源码\n    with depyf.prepare_debug(\".\u002Fdump_src_dir\"):\n        main()\n    \n    # 第二步：进入调试模式\n    # 程序会在此暂停，允许你在 .\u002Fdump_src_dir 生成的文件中设置断点\n    with depyf.debug():\n        main()\n```\n\n**操作提示**：\n1. 运行脚本，程序会在 `depyf.debug()` 处暂停。\n2. 在你的 IDE 或调试器中，打开 `.\u002Fdump_src_dir` 下生成的 `.py` 文件。\n3. 在感兴趣的代码行设置断点，然后继续执行即可进行单步调试。","某深度学习算法工程师在尝试利用 `torch.compile` 加速自定义的复杂动态控制流模型时，遭遇性能不升反降的困境。\n\n### 没有 depyf 时\n- **编译过程如黑盒**：面对 `torch.compile` 生成的底层字节码，开发者完全无法直观理解编译器究竟对代码做了哪些变换或优化。\n- **调试无从下手**：当模型因动态分支（如 `if b.sum() \u003C 0`）导致编译失败或回退到 eager 模式时，缺乏有效手段定位具体是哪行逻辑触发了问题。\n- **盲目试错成本高**：为了适配编译器，只能凭经验猜测并反复修改代码结构，依赖运气而非原理进行性能调优，严重拖慢研发进度。\n- **现有工具失效**：通用的反编译工具（如 uncompyle6）对新版 Python 及 PyTorch 特有的字节码支持极差，几乎无法还原出可读的源代码。\n\n### 使用 depyf 后\n- **源码透明可见**：depyf 能将 `torch.compile` 生成的复杂字节码完美反编译为人类可读的 Python 源代码，让内部优化逻辑一目了然。\n- **精准定位瓶颈**：通过查看 depyf _dump_出的源码，工程师能迅速发现动态控制流导致图断裂的具体位置，从而针对性地重构代码。\n- **高效性能调优**：基于清晰的编译视图，开发者可以有的放矢地调整算子写法，确保模型真正运行在优化后的计算图上，最大化加速收益。\n- **全版本兼容支持**：无论使用 Python 3.8 还是最新的 3.11，depyf 均能提供 100% 的反编译成功率，彻底解决工具链断裂问题。\n\ndepyf 将 `torch.compile` 从难以捉摸的“黑魔法”变成了透明可控的“白盒”，让开发者能够真正理解并驾驭 PyTorch 编译器的强大性能。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fthuml_depyf_27961839.png","thuml","THUML @ Tsinghua University","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fthuml_2b45f3ea.png","Machine Learning Group, School of Software, Tsinghua University",null,"mingsheng@tsinghua.edu.cn","http:\u002F\u002Fise.thss.tsinghua.edu.cn\u002F~mlong","https:\u002F\u002Fgithub.com\u002Fthuml",[85,89],{"name":86,"color":87,"percentage":88},"Python","#3572A5",99.9,{"name":90,"color":91,"percentage":92},"Jupyter Notebook","#DA5B0B",0.1,797,27,"2026-03-28T15:21:34","MIT","","未说明（工具用于分析 torch.compile，若被分析代码涉及 GPU 计算则需相应环境，但工具本身无特定显卡型号或显存要求）","未说明",{"notes":101,"python":102,"dependencies":103},"该项目与 PyTorch 团队紧密合作开发，强烈建议使用 PyTorch 2.2.0 及以上版本（推荐夜间构建版 nightly）以支持对 torch.compile 的最佳理解。加载转储的字节码文件时可能需要安装如 transformers 等额外模块。请遵循最新文档进行使用，早期示例可能已过时。","3.7, 3.8, 3.9, 3.10, 3.11",[104,105],"torch>=2.2.0 (推荐使用 PyTorch nightly 版本)","dill",[13],[108,109,110],"compiler","deep-learning","pytorch","2026-03-27T02:49:30.150509","2026-04-06T07:11:58.855801",[114,119,124,129,134,139],{"id":115,"question_zh":116,"answer_zh":117,"source_url":118},17626,"使用 depyf 调试时，应该在哪个文件中设置断点？","在较新版本中，您无需手动设置断点。维护者已在 `depyf.debug()` 内部自动添加了断点。您只需按照以下模式运行代码即可直接进入调试状态：\n\n```python\nimport depyf\nwith depyf.prepare_debug(\".\u002Fdump_src_dir\"):\n    main()  # 生成源码\nwith depyf.debug():\n    main()  # 此处会自动中断，无需手动添加 breakpoint()\n```\n此外，程序现在不会阻塞等待输入，对 pdb 用户更加友好。","https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fissues\u002F16",{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},17627,"为什么通过 `_torchdynamo_orig_callable` API 获取 guard 和 code 时会报错？","这通常是由于 PyTorch API 调整导致的。早期教程中的解包方式可能已失效。如果遇到 `TypeError: cannot unpack non-iterable ...` 或 `IndentationError`，请确保您使用的是与当前 PyTorch 版本兼容的 depyf 版本。维护者建议检查是否使用了最新的 depyf 代码，因为该问题通常在新版本中已通过适配新版 PyTorch 内部结构得到解决。如果问题依旧，尝试直接访问 `cache_entries[0].code` 和 `cache_entries[0].check_fn`（注意 check_fn 可能需要特殊处理而非直接解析为 AST）。","https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fissues\u002F2",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},17628,"使用 depyf.prepare_debug 时遇到 'free var mismatch' 错误导致 torch.compile 崩溃怎么办？","这是一个已知问题，源于 PyTorch 内部代码对象自由变量（freevars）顺序的不确定性。该问题已在 PyTorch 的 PR #126630 中修复。\n解决方案：\n1. 升级到包含该修复的 PyTorch 夜间构建版本（nightly build）。\n2. 或者等待该 PR 合并到正式的 PyTorch 发布版中。\n在修复生效前，`depyf.prepare_debug` 可能会在某些复杂模型（如 transformer_engine）上触发此断言错误。","https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fissues\u002F28",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},17629,"反编译代码中出现 KeyError，提示临时变量被过早合并（remove_some_temp 问题），如何解决？","这是由于 `remove_some_temp()` 函数过于激进地合并了临时变量，导致副作用操作（如 `preds.clear()`）的执行顺序发生变化。\n该问题已在 depyf 的 PR #87 中修复。如果您遇到此类错误（例如在字典操作后出现 KeyError），请升级到修复后的 depyf 版本（查看 commit 7d7a9bca0be33c06022cf8c152dda3ce12a0ec20 以了解细节）。升级后，反编译代码将正确保留临时变量以确保执行顺序安全。","https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fissues\u002F85",{"id":135,"question_zh":136,"answer_zh":137,"source_url":138},17630,"在使用 Mixtral 等大模型时遇到 'DecompilationError: Failed to decompile resume_in_forward' 错误怎么办？","这通常是因为 PyTorch 或 depyf 版本不匹配导致的反编译指令不支持问题。维护者测试表明，使用最新的 depyf 代码（如 commit f38884c）配合 PyTorch 2.2.1 或更高版本可以正常运行该示例。\n建议操作：\n1. 更新 depyf 到最新开发版：`pip install git+https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf.git`\n2. 确保 PyTorch 版本较新（推荐 2.2+）。\n3. 如果问题仍存在，可能是特定算子尚未支持，可尝试简化模型或提交具体复现案例给维护者。","https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fissues\u002F8",{"id":140,"question_zh":141,"answer_zh":142,"source_url":118},17631,"depyf 生成的 dump 目录中有很多文件，它们分别代表什么含义？","虽然 Issue 未直接列出所有文件名含义，但根据常见输出模式：\n- `__compiled_fn_X Captured Graph X.py`: 捕获的计算图代码。\n- `__transformed_code_X_for_...py`: 经过 Dynamo 转换后的可执行代码，通常是调试的主要目标文件。\n- `full_code_for_...py`: 完整的原始函数代码。\n调试时，主要关注 `__transformed_code_...py` 文件，因为这是实际执行的优化后逻辑。结合 `depyf.debug()` 使用时，断点会自动在这些生成的转换代码中生效。",[144,149,154,159,164,169,173,178,183,188,193,198,203,208,213,218,223,228],{"id":145,"version":146,"summary_zh":147,"released_at":148},107936,"v0.20.0","## 变更内容\n* 修复了 `list.extend` 在 `argval != 1` 时的 bug，并由 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F87 中添加了 `DEPYF_REMOVE_TEMP` 环境变量。\n* 由 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F88 中更新了测试文件。\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fcompare\u002Fv0.19.0...v0.20.0","2025-10-13T12:36:49",{"id":150,"version":151,"summary_zh":152,"released_at":153},107937,"v0.19.0","## 变更内容\n* 由 @ProExpertProg 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F82 中添加设备到导入列表\n* 由 @nopperl 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F81 中为 `patched_load_by_key_path` 添加缺失的默认参数值\n* 由 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F83 中更新测试文件\n* 由 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F84 中修复复制指令\n\n## 新贡献者\n* @ProExpertProg 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F82 中完成了首次贡献\n* @nopperl 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F81 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fcompare\u002Fv0.18.0...v0.19.0","2025-04-20T08:10:09",{"id":155,"version":156,"summary_zh":157,"released_at":158},107938,"v0.18.0","## 变更内容\n* 与 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F47 中的最新 PyTorch 代码同步\n* @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F48 中添加开发者文档\n* @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F49 中完善包含整体架构的文档\n* @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F51 中添加 Codecov\n* @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F52 中添加架构图\n* @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F54 中增加覆盖率覆盖的文件\n* @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F55 中移除过时代码并增加更多测试\n* @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F56 中增加更多测试\n* @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F57 中添加 Codecov 配置\n* @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F58 中添加 depyf.optimization 模块及测试\n* @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F59 中添加优化教程\n* @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F60 中修复文档格式\n* @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F61 中添加 API 参考文档\n* @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F64 中使项目与最新 PyTorch 版本保持同步\n* @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F65 中修复旧版 PyTorch 的问题\n* @imShZh 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F67 中添加尾声 Lambda 保护机制\n* @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F70 中统一使用下划线和点号命名方式\n* @imShZh 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F66 中修复检查错误对象类型的 bug\n* @zincnode 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F71 中更新 `.gitignore` 文件以忽略测试输出\n* @gilfree 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F73 中修复 torch.export 导致程序崩溃的问题\n* @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F74 中对子模块使用 print_readable 格式化输出\n\n## 新贡献者\n* @imShZh 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F67 中完成了首次贡献\n* @zincnode 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F71 中完成了首次贡献\n* @gilfree 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F73 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fcompare\u002Fv0.17.0...v0.18.0","2024-12-07T00:44:08",{"id":160,"version":161,"summary_zh":162,"released_at":163},107939,"v0.17.0","## 变更内容\n* 由 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F40 中处理 `None` 情况\n* 由 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F41 中更新使用说明\n* 由 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F42 中尝试处理不规则的 `const`\n* 由 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F44 中修复 C++ 宏保护\n* 由 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F45 中美化宏保护代码\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fcompare\u002Fv0.16.0...v0.17.0","2024-08-10T22:49:18",{"id":165,"version":166,"summary_zh":167,"released_at":168},107940,"v0.16.0","## 变更内容\n* 由 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F30 中改进了 guard 信息\n* 由 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F31 中添加了 guard 中使用的 freevars\n* 由 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F33 中修复了 nightly 版本下的 lazy_format_graph_code\n* 由 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F35 中修复了 co_cellvars\n* 由 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F37 中修复了解包仅含一个元素的序列问题\n* 由 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F38 中更新了 README\n* 由 @youkaichao 在 https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fpull\u002F39 中改进了警告信息\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fthuml\u002Fdepyf\u002Fcompare\u002Fv0.15.0...v0.16.0","2024-07-02T22:22:32",{"id":170,"version":171,"summary_zh":80,"released_at":172},107941,"v0.15.0","2024-05-18T07:06:48",{"id":174,"version":175,"summary_zh":176,"released_at":177},107942,"v0.14.0","及时了解 PyTorch 的最新代码，比如懒加载图模块。","2024-03-07T17:20:07",{"id":179,"version":180,"summary_zh":181,"released_at":182},107943,"v0.13.0","添加对健壮的 if-else 反编译的支持","2023-12-18T07:07:38",{"id":184,"version":185,"summary_zh":186,"released_at":187},107944,"v0.12.0","让转储的源代码看起来更美观，并添加文档网站。","2023-11-27T11:52:47",{"id":189,"version":190,"summary_zh":191,"released_at":192},107945,"v0.11.0","支持调试 torch.compile","2023-10-23T02:57:27",{"id":194,"version":195,"summary_zh":196,"released_at":197},107946,"v0.9.0","使用你最喜欢的调试器调试 `torch.compile` 吧！","2023-10-22T09:15:43",{"id":199,"version":200,"summary_zh":201,"released_at":202},107947,"v0.8.0","Explain all the details of `torch.compile` to users in human-readable source code.","2023-10-18T08:10:31",{"id":204,"version":205,"summary_zh":206,"released_at":207},107948,"v0.7.0","support pytorch hooks, add explain notebooks","2023-10-15T09:49:49",{"id":209,"version":210,"summary_zh":211,"released_at":212},107949,"v0.5.0","Support Python 3.12.","2023-10-09T23:03:01",{"id":214,"version":215,"summary_zh":216,"released_at":217},107950,"v0.3.0","The decompiler is tested against pytorch benchmark. For bytecode generated by pytorch, we decompile it to get source code, and compile the source code to get a new bytecode, run pytorch with the new bytecode.","2023-10-05T17:16:45",{"id":219,"version":220,"summary_zh":221,"released_at":222},107951,"v0.2.0","Add support for simple for-while loops.","2023-09-02T16:36:40",{"id":224,"version":225,"summary_zh":226,"released_at":227},107952,"v0.1.2","We add support for a simple jump, used in `__resume_at_xxx` functions for pytorch dynamo.","2023-08-30T03:15:08",{"id":229,"version":230,"summary_zh":231,"released_at":232},107953,"v0.1.1","Support python 3.7 - 3.11.\r\n\r\nTransform bytecode to source code, so that understanding python bytecode can be much easier. This is especially useful to understand pytorch 2.0 compiler stack.","2023-08-29T15:23:57"]