Skip to content

Conversation

@che-sh
Copy link
Contributor

@che-sh che-sh commented Feb 27, 2025

Summary:

Torchrec rewriting logic got a bit hairy over the years, this sequence of changes aims to refactor the rewrite logic to be less convoluted and more maintainable in the future.

This change: Splits monolithic ArgInfoStep into multiple classes, each handling single potential operation (+minimum data necessary to perform it).

Internal

Diff stack navigation:

  1. D69292525 and below - before refactoring
  2. D69438143 - Refactor get_node_args and friends into a class
  3. D69461227 - refactor "joint lists" in ArgInfo into a list of ArgInfoStep
  4. D69461226 - refactor _build_args_kwargs into instance methods on ArgInfo and ArgInfoStep
  5. D69461228 - split monolithic ArgInfoStep into a class hierarchy
  6. D69764721 - enable buffers as preproc arguments (you are here)

Differential Revision: D69764721

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 27, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69764721

che-sh added a commit to che-sh/torchrec that referenced this pull request Feb 27, 2025
Summary:


Torchrec rewriting logic got a bit hairy over the years, this sequence of changes aims to refactor the rewrite logic to be less convoluted and more maintainable in the future.

This change: Splits monolithic ArgInfoStep into multiple classes, each handling single potential operation (+minimum data necessary to perform it).

Internal

Diff stack navigation:
1. D69292525 and below - before refactoring
2. D69438143 - Refactor get_node_args and friends into a class 
3. D69461227 - refactor "joint lists" in ArgInfo into a list of ArgInfoStep
4. D69461226 - refactor `_build_args_kwargs` into instance methods on ArgInfo and ArgInfoStep 
5. D69461228 - split monolithic `ArgInfoStep` into a class hierarchy 
6. D69764721 - enable buffers as preproc arguments (**you are here**)

Differential Revision: D69764721
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69764721

che-sh added a commit to che-sh/torchrec that referenced this pull request Feb 27, 2025
Summary:


Torchrec rewriting logic got a bit hairy over the years, this sequence of changes aims to refactor the rewrite logic to be less convoluted and more maintainable in the future.

This change: Splits monolithic ArgInfoStep into multiple classes, each handling single potential operation (+minimum data necessary to perform it).

Internal

Diff stack navigation:
1. D69292525 and below - before refactoring
2. D69438143 - Refactor get_node_args and friends into a class 
3. D69461227 - refactor "joint lists" in ArgInfo into a list of ArgInfoStep
4. D69461226 - refactor `_build_args_kwargs` into instance methods on ArgInfo and ArgInfoStep 
5. D69461228 - split monolithic `ArgInfoStep` into a class hierarchy 
6. D69764721 - enable buffers as preproc arguments (**you are here**)

Differential Revision: D69764721
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69764721

che-sh added a commit to che-sh/torchrec that referenced this pull request Feb 27, 2025
Summary:
Pull Request resolved: meta-pytorch#2769

Pull Request resolved: meta-pytorch#2744

Torchrec rewriting logic got a bit hairy over the years, this sequence of changes aims to refactor the rewrite logic to be less convoluted and more maintainable in the future.

This change: Splits monolithic ArgInfoStep into multiple classes, each handling single potential operation (+minimum data necessary to perform it).

Internal

Diff stack navigation:
1. D69292525 and below - before refactoring
2. D69438143 - Refactor get_node_args and friends into a class
3. D69461227 - refactor "joint lists" in ArgInfo into a list of ArgInfoStep
4. D69461226 - refactor `_build_args_kwargs` into instance methods on ArgInfo and ArgInfoStep
5. D69461228 - split monolithic `ArgInfoStep` into a class hierarchy
6. D69764721 - enable buffers as preproc arguments (**you are here**)

Differential Revision: D69764721
che-sh added a commit to che-sh/torchrec that referenced this pull request Feb 27, 2025
Summary:


Torchrec rewriting logic got a bit hairy over the years, this sequence of changes aims to refactor the rewrite logic to be less convoluted and more maintainable in the future.

This change: Splits monolithic ArgInfoStep into multiple classes, each handling single potential operation (+minimum data necessary to perform it).

Internal

Diff stack navigation:
1. D69292525 and below - before refactoring
2. D69438143 - Refactor get_node_args and friends into a class 
3. D69461227 - refactor "joint lists" in ArgInfo into a list of ArgInfoStep
4. D69461226 - refactor `_build_args_kwargs` into instance methods on ArgInfo and ArgInfoStep 
5. D69461228 - split monolithic `ArgInfoStep` into a class hierarchy 
6. D69764721 - enable buffers as preproc arguments (**you are here**)

Differential Revision: D69764721
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69764721

@che-sh che-sh force-pushed the export-D69764721 branch from c1034b5 to 6716937 Compare March 4, 2025 09:03
che-sh added a commit to che-sh/torchrec that referenced this pull request Mar 4, 2025
Summary:


Torchrec rewriting logic got a bit hairy over the years, this sequence of changes aims to refactor the rewrite logic to be less convoluted and more maintainable in the future.

This change: Splits monolithic ArgInfoStep into multiple classes, each handling single potential operation (+minimum data necessary to perform it).

Internal

Diff stack navigation:
1. D69292525 and below - before refactoring
2. D69438143 - Refactor get_node_args and friends into a class 
3. D69461227 - refactor "joint lists" in ArgInfo into a list of ArgInfoStep
4. D69461226 - refactor `_build_args_kwargs` into instance methods on ArgInfo and ArgInfoStep 
5. D69461228 - split monolithic `ArgInfoStep` into a class hierarchy 
6. D69764721 - enable buffers as preproc arguments (**you are here**)

Differential Revision: D69764721
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69764721

che-sh added a commit to che-sh/torchrec that referenced this pull request Mar 4, 2025
Summary:
Pull Request resolved: meta-pytorch#2769

Pull Request resolved: meta-pytorch#2744

Torchrec rewriting logic got a bit hairy over the years, this sequence of changes aims to refactor the rewrite logic to be less convoluted and more maintainable in the future.

This change: Splits monolithic ArgInfoStep into multiple classes, each handling single potential operation (+minimum data necessary to perform it).

Internal

Diff stack navigation:
1. D69292525 and below - before refactoring
2. D69438143 - Refactor get_node_args and friends into a class
3. D69461227 - refactor "joint lists" in ArgInfo into a list of ArgInfoStep
4. D69461226 - refactor `_build_args_kwargs` into instance methods on ArgInfo and ArgInfoStep
5. D69461228 - split monolithic `ArgInfoStep` into a class hierarchy
6. D69764721 - enable buffers as preproc arguments (**you are here**)

Differential Revision: D69764721
@che-sh che-sh force-pushed the export-D69764721 branch 2 times, most recently from 81a42f5 to 2be5cbe Compare March 4, 2025 09:16
che-sh added a commit to che-sh/torchrec that referenced this pull request Mar 4, 2025
Summary:


Torchrec rewriting logic got a bit hairy over the years, this sequence of changes aims to refactor the rewrite logic to be less convoluted and more maintainable in the future.

This change: Splits monolithic ArgInfoStep into multiple classes, each handling single potential operation (+minimum data necessary to perform it).

Internal

Diff stack navigation:
1. D69292525 and below - before refactoring
2. D69438143 - Refactor get_node_args and friends into a class 
3. D69461227 - refactor "joint lists" in ArgInfo into a list of ArgInfoStep
4. D69461226 - refactor `_build_args_kwargs` into instance methods on ArgInfo and ArgInfoStep 
5. D69461228 - split monolithic `ArgInfoStep` into a class hierarchy 
6. D69764721 - enable buffers as preproc arguments (**you are here**)

Differential Revision: D69764721
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69764721

che-sh added a commit to che-sh/torchrec that referenced this pull request Mar 4, 2025
Summary:
Pull Request resolved: meta-pytorch#2769

Pull Request resolved: meta-pytorch#2744

Torchrec rewriting logic got a bit hairy over the years, this sequence of changes aims to refactor the rewrite logic to be less convoluted and more maintainable in the future.

This change: Splits monolithic ArgInfoStep into multiple classes, each handling single potential operation (+minimum data necessary to perform it).

Internal

Diff stack navigation:
1. D69292525 and below - before refactoring
2. D69438143 - Refactor get_node_args and friends into a class
3. D69461227 - refactor "joint lists" in ArgInfo into a list of ArgInfoStep
4. D69461226 - refactor `_build_args_kwargs` into instance methods on ArgInfo and ArgInfoStep
5. D69461228 - split monolithic `ArgInfoStep` into a class hierarchy
6. D69764721 - enable buffers as preproc arguments (**you are here**)

Differential Revision: D69764721
@che-sh che-sh force-pushed the export-D69764721 branch from 2be5cbe to 220edf7 Compare March 4, 2025 09:19
Evgenii Kolpakov added 4 commits March 4, 2025 22:04
Differential Revision: D69438143
…ent operations (meta-pytorch#2744)

Summary:
Pull Request resolved: meta-pytorch#2744

Torchrec rewriting logic got a bit hairy over the years, this sequence of changes aims to refactor the rewrite logic to be less convoluted and more maintainable in the future.

This change: Splits monolithic ArgInfoStep into multiple classes, each handling single potential operation (+minimum data necessary to perform it).

Internal

Diff stack navigation:
1. D69292525 and below - before refactoring
2. D69438143 - Refactor get_node_args and friends into a class
3. D69461227 - refactor "joint lists" in ArgInfo into a list of ArgInfoStep
4. D69461226 - refactor `_build_args_kwargs` into instance methods on ArgInfo and ArgInfoStep
5. D69461228 - split monolithic `ArgInfoStep` into a class hierarchy (**you are here**)

Differential Revision: D69461228
che-sh added a commit to che-sh/torchrec that referenced this pull request Mar 5, 2025
Summary:


Torchrec rewriting logic got a bit hairy over the years, this sequence of changes aims to refactor the rewrite logic to be less convoluted and more maintainable in the future.

This change: Splits monolithic ArgInfoStep into multiple classes, each handling single potential operation (+minimum data necessary to perform it).

Internal

Diff stack navigation:
1. D69292525 and below - before refactoring
2. D69438143 - Refactor get_node_args and friends into a class 
3. D69461227 - refactor "joint lists" in ArgInfo into a list of ArgInfoStep
4. D69461226 - refactor `_build_args_kwargs` into instance methods on ArgInfo and ArgInfoStep 
5. D69461228 - split monolithic `ArgInfoStep` into a class hierarchy 
6. D69764721 - enable buffers as preproc arguments (**you are here**)

Differential Revision: D69764721
@che-sh che-sh force-pushed the export-D69764721 branch from 220edf7 to 2a0d6da Compare March 5, 2025 06:06
Summary:
Pull Request resolved: meta-pytorch#2769

Pull Request resolved: meta-pytorch#2744

Torchrec rewriting logic got a bit hairy over the years, this sequence of changes aims to refactor the rewrite logic to be less convoluted and more maintainable in the future.

This change: Splits monolithic ArgInfoStep into multiple classes, each handling single potential operation (+minimum data necessary to perform it).

Internal

Diff stack navigation:
1. D69292525 and below - before refactoring
2. D69438143 - Refactor get_node_args and friends into a class
3. D69461227 - refactor "joint lists" in ArgInfo into a list of ArgInfoStep
4. D69461226 - refactor `_build_args_kwargs` into instance methods on ArgInfo and ArgInfoStep
5. D69461228 - split monolithic `ArgInfoStep` into a class hierarchy
6. D69764721 - enable buffers as preproc arguments (**you are here**)

Differential Revision: D69764721
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69764721

@che-sh che-sh force-pushed the export-D69764721 branch from 2a0d6da to f538acf Compare March 5, 2025 06:10
@TroyGarden TroyGarden closed this Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants