# Is there @code\_warntype output documentation anywhere?

**URL:** <https://discourse.julialang.org/t/is-there-code-warntype-output-documentation-anywhere/54506>\
**Category:** Probabilistic Programming\
**Tags:** documentation, code\_warntype\
**Created:** [February 3, 2021, 2:14am UTC](https://discourse.julialang.org/t/is-there-code-warntype-output-documentation-anywhere/54506 "2021-02-03T02:14:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zenkavi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zenkavi/32/21645_2.png) [@zenkavi](https://discourse.julialang.org/u/zenkavi)\
**Post date:** [February 3, 2021, 2:14am UTC](https://discourse.julialang.org/t/is-there-code-warntype-output-documentation-anywhere/54506/1 "2021-02-03T02:14:12Z")

</div>

Where can I find more information on understanding the output of `@code_warntype` mentioned in Turing Performance Tips?

I’m trying to use it to debug some ForwardDiff Dual Type errors mentioned often (e.g. [one recent example](https://discourse.julialang.org/t/network-ode-model-type-error-with-forwarddiff-dual/54379)) but the output is difficult to decipher.

I found [this](https://discourse.julialang.org/t/help-reading-code-warntype-output/20832) but it wasn’t very comprehensive.

---

<div class="post-metadata">

**Author:** ![mmiller](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mmiller/32/20805_2.png) [@mmiller](https://discourse.julialang.org/u/mmiller)\
**Post date:** [February 3, 2021, 2:41am UTC](https://discourse.julialang.org/t/is-there-code-warntype-output-documentation-anywhere/54506/2 "2021-02-03T02:41:59Z")

</div>

There is some documentation here: [Performance Tips · The Julia Language](https://docs.julialang.org/en/v1/manual/performance-tips/#man-code-warntype)

---

<div class="post-metadata">

**Author:** ![ElOceanografo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eloceanografo/32/624_2.png) [@ElOceanografo](https://discourse.julialang.org/u/ElOceanografo)\
**Post date:** [February 3, 2021, 3:27am UTC](https://discourse.julialang.org/t/is-there-code-warntype-output-documentation-anywhere/54506/3 "2021-02-03T03:27:01Z")

</div>

Welcome @zenkavi! The Turing `@model` macro rewrites your model code (i.e., the tilde `~` statements etc.) into straight Julia code, which requires generating/mangling variable names in the process. Hence, using `@code_warntype` on a Turing model is harder to read than normal, an issue I run into myself pretty frequently. My only useful advice is to read through the output carefully, starting with the block at the top (where all the variables are listed with their original names). Often I can figure out which ones are causing issues from that section, then go back to reread my own code to try and figure out where any type instabilities came from.

If you can supply a [MWE](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757) of your model, we may be able to help debug it…

---

<div class="post-metadata">

**Author:** ![zenkavi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zenkavi/32/21645_2.png) [@zenkavi](https://discourse.julialang.org/u/zenkavi)\
**Post date:** [February 3, 2021, 7:41pm UTC](https://discourse.julialang.org/t/is-there-code-warntype-output-documentation-anywhere/54506/4 "2021-02-03T19:41:35Z")

</div>

Thanks! I will work on fixing it for a little more and if (i.e. when) I fail start another topic with an example.
