Lightning-AI / Lightning-AI/lightning-thunder

UX: adding an executor requires grabbing the default list

Open
#1,309 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

## 🚀 Feature

### Motivation

Adding an executor requires obtaining the list of default executors and appending them, which is not very elegant:

```py
# Default executors
model = thunder.jit(model, executors=None) # None means default

# Adding Transformer Engine
te = thunder.extend.get_executor("transformer_engine")
executors = [te] + list(get_default_executors())
model = thunder.jit(model, executors=executors)

```

### Pitch

Allow providing only additional executors.

```py
# Proposition
te = thunder.extend.get_executor("transformer_engine")
model = thunder.jit(model, additional_executors=[te])

```

**Open questions**: how to retain full control on executors, i.e. how to allow user to modify the list of default executors? This is possible now, but won't be possible with the proposed solution.

### Alternatives

### Additional context

Discussed with @tfogal et al who requested to create this issue.

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 with the thunder.jit executor argument and the thunder.extend.get_executor and get_default_executors entry points shown in the issue. Define how additional executors are combined with defaults while preserving a way for users to modify the full executor list; done means the proposed usage works without removing that control.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design, compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.