MLKernels.jl icon indicating copy to clipboard operation
MLKernels.jl copied to clipboard

ForwardDiff.jl Compatibility

Open trthatcher opened this issue 7 years ago • 0 comments

ForwardDiff.jl has the following constraints:

  • [ ] The target function can only be composed of generic Julia functions. ForwardDiff cannot propagate derivative information through non-Julia code. Thus, your function may not work if it makes calls to external, non-Julia programs, e.g. uses explicit BLAS calls instead of Ax_mul_Bx-style functions.
  • [ ] The target function must be written generically enough to accept numbers of type T<:Real as input (or arrays of these numbers). The function doesn't require a specific type signature, as long as the type signature is generic enough to avoid breaking this rule. This also means that any storage assigned used within the function must be generic as well.

trthatcher avatar Jan 12 '19 22:01 trthatcher