---
title: thunder.compile_data
description: Obtains the compilation data from a JITed function.
canonical: >-
  https://lightning.ai/docs/thunder/stable/api-reference/generated/thunder.compile_data
---
# thunder.compile_data {#thunder-compile-data}

### `thunder.compile_data(fn)` {#thunder.compile_data}

[\[source\]](https://github.com/Lightning-AI/lightning-thunder/blob/0.2.6/thunder/__init__.py#L920-L926)

Obtains the compilation data from a JITed function.

The compile data ([`thunder.common.CompileData`](/docs/thunder/0.2.6/common/generated/thunder.common.CompileData.md#thunder.common.CompileData "thunder.common.CompileData")) contains information about how the JIT has been configured for compilation (including referencing the function or module that is being compiled).

Return type:

[`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional "(in Python v3.15)")\[[`CompileData`](/docs/thunder/0.2.6/common/generated/thunder.common.CompileData.md#thunder.common.CompileData "thunder.common.CompileData")\]

---

**Navigation**

- Parent: [Generated](/docs/thunder/0.2.6/api-reference/generated.md)
