Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support types in @non_differentiable #213

Closed
oxinabox opened this issue Sep 3, 2020 · 0 comments · Fixed by #243
Closed

support types in @non_differentiable #213

oxinabox opened this issue Sep 3, 2020 · 0 comments · Fixed by #243
Labels
bug Something isn't working rule definition helper relating to helpers for declaring rules

Comments

@oxinabox
Copy link
Member

oxinabox commented Sep 3, 2020

Follow up from #212
it doesn't seem to work write with types.
e.g. @non_differentiable Channel(Any, Any)
at least it doesn't seem to work right an play nice with Zygote.

I know one thing that needs to be changes is to use Core.Typeof($primal_name) rather typeof($primal_name) in the signatio.
because Core.typeof(Channel) is Type{Channel} where as typeof(Channel) is DataType (for others it would be a UnionAll I think)
buit I don't think that is the only thing that prevents it working nice with Zygote.

@oxinabox oxinabox added bug Something isn't working rule definition helper relating to helpers for declaring rules labels Sep 3, 2020
bors bot added a commit to FluxML/Zygote.jl that referenced this issue Sep 3, 2020
780: Move a bunch of no_grad to ChainRules r=oxinabox a=oxinabox

this is the partner to JuliaDiff/ChainRules.jl#252
It will fail til that is merged and tagged

What is left is:

- Types (because JuliaDiff/ChainRulesCore.jl#213) (e.g. `Colon`, `OneTo` `Channel`)
- Things to which the derivative is `Zero()` not `DoesNotExist()` (e.g. `one`, `ones`, `zero`, `zeros`)
- Things that felt too magic: e.g. `Base.eval`


Should I bump patch version and tag a release?

Co-authored-by: Lyndon White <[email protected]>
Co-authored-by: Lyndon White <[email protected]>
bors bot added a commit to FluxML/Zygote.jl that referenced this issue Sep 4, 2020
780: Move a bunch of no_grad to ChainRules r=oxinabox a=oxinabox

this is the partner to JuliaDiff/ChainRules.jl#252
It will fail til that is merged and tagged

What is left is:

- Types (because JuliaDiff/ChainRulesCore.jl#213) (e.g. `Colon`, `OneTo` `Channel`)
- Things to which the derivative is `Zero()` not `DoesNotExist()` (e.g. `one`, `ones`, `zero`, `zeros`)
- Things that felt too magic: e.g. `Base.eval`


Should I bump patch version and tag a release?

Co-authored-by: Lyndon White <[email protected]>
Co-authored-by: Lyndon White <[email protected]>
@nickrobinson251 nickrobinson251 changed the title support types in @nondifferentiable support types in @non_differentiable Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rule definition helper relating to helpers for declaring rules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant