Lightning-AI / Lightning-AI/lightning-thunder

Should thunderfx's splitter reach executor level while determining if thunder can execute an operation

Open
#2,148 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The earlier assumption of `try_execute_thunder_symbol` (in splitter) only invokes the meta function associated with the Torch symbol (without interacting with the executors). But in order to fix https://github.com/Lightning-AI/lightning-thunder/issues/2036, the `value_and_grad` is added in `try_execute_thunder_symbol` to determine if the backward pass of an operator can be run by Thunder or not. However in the `value_and_grad` it introduces the interaction with executor binding:
[lightning-thunder/thunder/core/transforms.py](https://github.com/Lightning-AI/lightning-thunder/blob/f73bfa0eef857532beeaea44964b0bfd9926325a/thunder/core/transforms.py#L1492-L1507)
This Issue is created to discuss whether thunderfx's splitter should reach executor level while determining if thunder can execute an operation

_Originally posted by @kshitij12345 in https://github.com/Lightning-AI/lightning-thunder/issues/2073#issuecomment-2886039404_

cc: @kshitij12345 @IvanYashchuk

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 by reading thunder/core/transforms.py at lines 1492-1507, focusing on try_execute_thunder_symbol and its value_and_grad interaction with executor binding. Review the linked issue 2036 and the earlier issue 2073 discussion to determine whether splitter executor access is intended; done means reaching a documented decision on that design question.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.