Skip to content

Extract _lora_call into a shared free function in lora.py (#20306)#20306

Merged
meta-codesync[bot] merged 1 commit into
pytorch:mainfrom
derekdixu:export-D108757232
Jun 17, 2026
Merged

Extract _lora_call into a shared free function in lora.py (#20306)#20306
meta-codesync[bot] merged 1 commit into
pytorch:mainfrom
derekdixu:export-D108757232

Conversation

@derekdixu

@derekdixu derekdixu commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary:

Both MultimodalTransformer (transformer.py) and StaticAttention (static_attention.py) had identical _lora_call methods. Extracted the logic into a module-level lora_call() function in lora.py and updated both consumers to import and call it directly.

Reviewed By: billmguo

Differential Revision: D108757232

Signed-off-by: Di Xu dixu@meta.com

@pytorch-bot

pytorch-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20306

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 New Failures, 30 Pending, 2 Unclassified Failures

As of commit dcfea58 with merge base ef5c8a7 (image):

NEW FAILURES - The following jobs have failed:

UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla 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 Jun 16, 2026
@meta-codesync

meta-codesync Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@derekdixu has exported this pull request. If you are a Meta employee, you can view the originating Diff in D108757232.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 16, 2026

Copy link
Copy Markdown

CLA Missing ID

  • ❌ The email address for the commit (dcfea58) is not linked to the GitHub account, preventing the EasyCLA check. Consult this Help Article and GitHub Help to resolve. (To view the commit's email address, add .patch at the end of this PR page's URL.) For further assistance with EasyCLA, please visit our EasyCLA portal and chat with our support bot.

@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@meta-codesync meta-codesync Bot changed the title Extract _lora_call into a shared free function in lora.py Extract _lora_call into a shared free function in lora.py (#20306) Jun 16, 2026
derekdixu pushed a commit to derekdixu/executorch that referenced this pull request Jun 16, 2026
…h#20306)

Summary:

Both `MultimodalTransformer` (transformer.py) and `StaticAttention` (static_attention.py) had identical `_lora_call` methods. Extracted the logic into a module-level `lora_call()` function in `lora.py` and updated both consumers to import and call it directly.

Differential Revision: D108757232
@derekdixu derekdixu force-pushed the export-D108757232 branch from 980454a to c62c9f7 Compare June 16, 2026 16:16
derekdixu pushed a commit to derekdixu/executorch that referenced this pull request Jun 16, 2026
…h#20306)

Summary:

Both `MultimodalTransformer` (transformer.py) and `StaticAttention` (static_attention.py) had identical `_lora_call` methods. Extracted the logic into a module-level `lora_call()` function in `lora.py` and updated both consumers to import and call it directly.

Reviewed By: billmguo

Differential Revision: D108757232
@derekdixu derekdixu force-pushed the export-D108757232 branch from c62c9f7 to bee4dad Compare June 16, 2026 21:34
derekdixu pushed a commit to derekdixu/executorch that referenced this pull request Jun 17, 2026
…h#20306)

Summary:

Both `MultimodalTransformer` (transformer.py) and `StaticAttention` (static_attention.py) had identical `_lora_call` methods. Extracted the logic into a module-level `lora_call()` function in `lora.py` and updated both consumers to import and call it directly.

Reviewed By: billmguo

Differential Revision: D108757232
@derekdixu derekdixu force-pushed the export-D108757232 branch from bee4dad to 778eb03 Compare June 17, 2026 04:14
derekdixu pushed a commit to derekdixu/executorch that referenced this pull request Jun 17, 2026
…h#20306)

Summary:
Pull Request resolved: pytorch#20306

Both `MultimodalTransformer` (transformer.py) and `StaticAttention` (static_attention.py) had identical `_lora_call` methods. Extracted the logic into a module-level `lora_call()` function in `lora.py` and updated both consumers to import and call it directly.

Reviewed By: billmguo

Differential Revision: D108757232
Signed-off-by: Di Xu <dixu@meta.com>
@derekdixu derekdixu force-pushed the export-D108757232 branch from 778eb03 to b17797e Compare June 17, 2026 04:17
derekdixu pushed a commit to derekdixu/executorch that referenced this pull request Jun 17, 2026
…h#20306)

Summary:

Both `MultimodalTransformer` (transformer.py) and `StaticAttention` (static_attention.py) had identical `_lora_call` methods. Extracted the logic into a module-level `lora_call()` function in `lora.py` and updated both consumers to import and call it directly.

Reviewed By: billmguo

Differential Revision: D108757232
@derekdixu derekdixu force-pushed the export-D108757232 branch from b17797e to b418779 Compare June 17, 2026 15:19
derekdixu pushed a commit to derekdixu/executorch that referenced this pull request Jun 17, 2026
…h#20306)

Summary:
Pull Request resolved: pytorch#20306

Both `MultimodalTransformer` (transformer.py) and `StaticAttention` (static_attention.py) had identical `_lora_call` methods. Extracted the logic into a module-level `lora_call()` function in `lora.py` and updated both consumers to import and call it directly.

Reviewed By: billmguo

Differential Revision: D108757232
Signed-off-by: Di Xu <dixu@meta.com>
@derekdixu derekdixu force-pushed the export-D108757232 branch from b418779 to b6add03 Compare June 17, 2026 15:22
…h#20306)

Summary:
Pull Request resolved: pytorch#20306

Both `MultimodalTransformer` (transformer.py) and `StaticAttention` (static_attention.py) had identical `_lora_call` methods. Extracted the logic into a module-level `lora_call()` function in `lora.py` and updated both consumers to import and call it directly.

Reviewed By: billmguo

Differential Revision: D108757232
Signed-off-by: Di Xu <dixu@meta.com>
@derekdixu derekdixu force-pushed the export-D108757232 branch from b6add03 to dcfea58 Compare June 17, 2026 15:27
@meta-codesync meta-codesync Bot merged commit 0eb8247 into pytorch:main Jun 17, 2026
186 of 196 checks passed
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. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants