Lightning-AI / Lightning-AI/lightning-thunder

Error on reentrant jit invocation

Open
#1,222 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue ux
Dominant language
Python
Stars
1.5k
Forks
121
PR merge metrics
No merged PRs in 30d

Description

...to provide a better error message.
Most likely the easiest is to add something like
```
if get_jit_ctx() is not None:
raise NotImplementedError("Re-entrant jitting is not supported")
```
to the top of `thunder.jit.thunder_general_jit` and then write a test.

First step in #1126

cc @carmocca @borda

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in thunder.jit.thunder_general_jit, where the issue identifies the reentrant JIT entry point and proposed error behavior. Add a regression test that invokes JIT reentrantly and verifies the clearer failure, then use the existing test setup to confirm non-reentrant JIT behavior is unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.