# Is it possible to use autodiff on an external program?

**URL:** <https://discourse.julialang.org/t/is-it-possible-to-use-autodiff-on-an-external-program/108475>\
**Category:** General Usage\
**Tags:** question, llvm, enzyme\
**Created:** [January 7, 2024, 6:27pm UTC](https://discourse.julialang.org/t/is-it-possible-to-use-autodiff-on-an-external-program/108475 "2024-01-07T18:27:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![wsmoses](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wsmoses/32/26497_2.png) [@wsmoses](https://discourse.julialang.org/u/wsmoses)\
**Post date:** [January 8, 2024, 12:12am UTC](https://discourse.julialang.org/t/is-it-possible-to-use-autodiff-on-an-external-program/108475/2 "2024-01-08T00:12:25Z")

</div>

Yeah!

You could llvmcall the IR directly if you compiled it elsewhere, or alternatively you could compile your simulation with embedded bitcode and Enzyme would be able to differentiate through the ccall.

---

_[View the full topic](https://discourse.julialang.org/t/is-it-possible-to-use-autodiff-on-an-external-program/108475)._
