InplacableThunk and subspace types

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

  • #393 来自 @mcabbott —— 已关闭,未合并

评估

难度
5/5
预计耗时
一周以上
新手友好度
20/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
julia

调研方向

先阅读已关闭的 PR #393 和相关 issue #274 中的备注,然后检查此处描述的 InplaceableThunk、ProjectTo 和 mul! 案例。确定应如何处理子空间类型和结构零,并为有问题的示例记录一条明确的安全使用规则或实现路径。

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

描述

inplace accumulation

Using InplacableThunk does not play nice with
Some special cases like if the inplace part is just .+= are easy enough to do with ProjectTo see #inplace
See https://github.com/JuliaDiff/ChainRulesCore.jl/issues/274

But for something like:

dA = InplaceableThunk(
    X̄ -> mul!(X̄, Ȳ, B', true, true),
    @thunk(project_A(Ȳ * B')),
)

it is not so easy.
Since it may try and set a structural zero in the mul!.
For now we are just restricting use of InplacableThunk to places wehre it is known safe,
and removing them when issues occur.

One approach is in
https://github.com/JuliaDiff/ChainRulesCore.jl/pull/393
And some notes are there

主要语言
Julia
星标
267
派生
66
平均合并
1 天 1 小时
30 天内合并 PR
9

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

JuliaDiff/ChainRulesCore.jl 的其他 Issue

查看 JuliaDiff/ChainRulesCore.jl 的全部 Issue

相似的 Issue

更多 Julia Issue

把新 issue 发到你的邮箱

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