lightning-thunder icon indicating copy to clipboard operation
lightning-thunder copied to clipboard

UX: adding an executor requires grabbing the default list

Open mjmikulski opened this issue 1 year ago • 1 comments

🚀 Feature

Motivation

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

# 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.

# 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.

mjmikulski avatar Oct 15 '24 11:10 mjmikulski

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 16 '25 06:04 stale[bot]