No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download

This is an experimental branch of Halide ( for making it able to compute gradients.

For a technical description see our paper, "Differentiable Programming for Image Processing and Deep Learning in Halide".

For build instruction see the original repository (

If you haven't used Halide before, it's probably a good idea to go through the tutorials first.

For examples on how to use the gradient extensions see the tests in test/correctness/autodiff.cpp, a simple polynomial function fitting example in test/correctness/fit_function.cpp, and a more involved lens optimization application in apps/derivatives/lens.cpp.

For the implementation see src/Derivative.h, src/Derivative.cpp, src/DerivativeUtils.h, src/DerivativeUtils.cpp.

We also implemented a new autoscheduler which takes a set of output Halide functions and automatically schedules all the dependencies. See src/SimpleAutoSchedule.h and the tests in src/SimpleAutoSchedule.cpp.

A proper tutorial and the source code for applications demonstrated in the paper will come soon.

If you have any questions, issues, bug report, feel free to open a Github issue or email Tzu-Mao Li (