Yingbo Ma

Results 223 comments of Yingbo Ma

Yes, we know about this. We don't have the ability to select the chunk size yet.

Ref: https://github.com/jrevels/Cassette.jl/pull/157

That PR makes ForwardDiff2 on `sq2(x::Float64) = x^2` work and `Dual` not being a subtype of `Number`.

`Dual` can already contain arbitrary data types. The plan is to make `Dual` not visible.

Pure source to source is also prone to missing rule errors, so I don't think that is a good idea for the forward mode.

With `Dual`, we know what functions to differentiate, so it is pretty simple to ignore functions like ```julia methods, code_typed ``` One can solve this problem with a dependency analysis...

> I could probably also get around this by, for example, doing global foo = [x::Dual] or global foo = SomeStruct(x::Dual) (and same for setfield issues). If the user wants...

Caused by https://github.com/jrevels/Cassette.jl/issues/155

It hasn't been solved yet, but there is an improvement. ```julia julia> using ForwardDiff2: dualrun julia> using BenchmarkTools julia> @btime dualrun(()->rand()) 453.505 ns (1 allocation: 32 bytes) 0.6022948398960193 ```

Yes, if you define the partials for the i-th primal is `partials[:, i]`.