lightning-thunder
lightning-thunder copied to clipboard
UX: adding an executor requires grabbing the default list
🚀 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.
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.