Implement `Cache` for Enzyme reverse mode

未关闭
#783 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
julia
领域
backend

调研方向

从报告中的 test_differentiation 调用里的 Enzyme reverse-mode 场景,以及堆栈跟踪中显示的 playground.jl 位置开始。启用 logging 后重现该故障,然后验证 cachified 场景能够成功,同时不会让 Julia 的 REPL 处于无法解析 get_binding_type 的状态。

由索引模型根据 Issue 内容生成。

描述

backend

At the moment this seems to break the REPL:

using DifferentiationInterface, DifferentiationInterfaceTest
import DifferentiationInterfaceTest as DIT
using Enzyme: Enzyme

scens = filter(
    s -> (
        DIT.function_place(s) == :out &&
            DIT.operator_place(s) == :in &&
            DIT.operator(s) == :pullback &&
            s.x isa Vector &&
            s.y isa Vector &&
            length(s.x) == 1 &&
            s.tang isa NTuple{2}
    ),
    default_scenarios(;
        include_normal=false, include_constantified=false, include_cachified=true
    ),
)
test_differentiation(AutoEnzyme(; mode=Enzyme.Reverse), scens; logging=true)  # fails

After I run it, the behavior of Julia itself is altered:

julia> a = 1
ERROR: UndefVarError: `get_binding_type` not defined in `Core`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
 [1] top-level scope
   @ ~/Documents/GitHub/Julia/DifferentiationInterface.jl/DifferentiationInterface/test/Back/Enzyme/playground.jl:21
主要语言
Julia
星标
317
派生
38
平均合并
7 小时 36 分钟
30 天内合并 PR
4

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

JuliaDiff/DifferentiationInterface.jl 的其他 Issue

查看 JuliaDiff/DifferentiationInterface.jl 的全部 Issue

相似的 Issue

更多 Julia Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。