Skip to content

[BE]Clean up old APIs in AOTI c shim#158400

Closed
yiming0416 wants to merge 1 commit intopytorch:mainfrom
yiming0416:export-D78378373
Closed

[BE]Clean up old APIs in AOTI c shim#158400
yiming0416 wants to merge 1 commit intopytorch:mainfrom
yiming0416:export-D78378373

Conversation

@yiming0416
Copy link
Contributor

Summary:
The shims for aten ops are now generated by torchgen. But there are some still old APIs in aoti_torch/c/shim.h

This diff moves the old to-be-deprecated APIs for aten ops to a separate header file shim_deprecated.h

The to-be-deprecated APIs are determined by comparing APIs in shim.h and ops in fallback_ops.py

Test Plan:
CI

Rollback Plan:

Differential Revision: D78378373

@pytorch-bot
Copy link

pytorch-bot bot commented Jul 15, 2025

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit 627aabc with merge base 23550ab (image):

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@facebook-github-bot
Copy link
Contributor

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

@yiming0416 yiming0416 marked this pull request as draft July 15, 2025 23:53
@github-actions
Copy link
Contributor

Attention! PyTorch one of the C-stable API file was changed

You MUST NOT change existing function declarations in this, as this header defines a stable C ABI. If you need to change the signature for a function, introduce a new v2 version of the function and modify code generation to target the new version of the function.


Caused by:

@yiming0416 yiming0416 changed the title [WIP][BE]Clean up old APIs in AOTI c shim [BE]Clean up old APIs in AOTI c shim Jul 16, 2025
@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jul 16, 2025
@yiming0416 yiming0416 marked this pull request as ready for review July 16, 2025 16:26
@yiming0416 yiming0416 requested a review from desertfire July 16, 2025 16:26
yiming0416 added a commit to yiming0416/pytorch that referenced this pull request Jul 16, 2025
Summary:

The shims for aten ops are now generated by torchgen. But there are some still old APIs in `aoti_torch/c/shim.h`

This diff moves the old to-be-deprecated APIs for aten ops to a separate header file `shim_deprecated.h`

The to-be-deprecated APIs are determined by comparing APIs in `shim.h` and ops in `fallback_ops.py`

Test Plan:
CI

Rollback Plan:

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

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

yiming0416 added a commit to yiming0416/pytorch that referenced this pull request Jul 16, 2025
Summary:
Pull Request resolved: pytorch#158400

The shims for aten ops are now generated by torchgen. But there are some still old APIs in `aoti_torch/c/shim.h`

This diff moves the old to-be-deprecated APIs for aten ops to a separate header file `shim_deprecated.h`

The to-be-deprecated APIs are determined by comparing APIs in `shim.h` and ops in `fallback_ops.py`

Test Plan:
CI

Rollback Plan:

Differential Revision: D78378373
yiming0416 added a commit to yiming0416/pytorch that referenced this pull request Jul 16, 2025
Summary:

The shims for aten ops are now generated by torchgen. But there are some still old APIs in `aoti_torch/c/shim.h`

This diff moves the old to-be-deprecated APIs for aten ops to a separate header file `shim_deprecated.h`

The to-be-deprecated APIs are determined by comparing APIs in `shim.h` and ops in `fallback_ops.py`

Test Plan:
CI

Rollback Plan:

Reviewed By: jingsh

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

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

@yiming0416 yiming0416 requested a review from desertfire July 16, 2025 20:28
yiming0416 added a commit to yiming0416/pytorch that referenced this pull request Jul 16, 2025
Summary:

The shims for aten ops are now generated by torchgen. But there are some still old APIs in `aoti_torch/c/shim.h`

This diff moves the old to-be-deprecated APIs for aten ops to a separate header file `shim_deprecated.h`

The to-be-deprecated APIs are determined by comparing APIs in `shim.h` and ops in `fallback_ops.py`

Test Plan:
CI

Rollback Plan:

Reviewed By: jingsh

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

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

yiming0416 added a commit to yiming0416/pytorch that referenced this pull request Jul 16, 2025
Summary:

The shims for aten ops are now generated by torchgen. But there are some still old APIs in `aoti_torch/c/shim.h`

This diff moves the old to-be-deprecated APIs for aten ops to a separate header file `shim_deprecated.h`

The to-be-deprecated APIs are determined by comparing APIs in `shim.h` and ops in `fallback_ops.py`

Test Plan:
CI

Rollback Plan:

Reviewed By: jingsh

Differential Revision: D78378373
yiming0416 added a commit to yiming0416/pytorch that referenced this pull request Jul 16, 2025
Summary:

The shims for aten ops are now generated by torchgen. But there are some still old APIs in `aoti_torch/c/shim.h`

This diff moves the old to-be-deprecated APIs for aten ops to a separate header file `shim_deprecated.h`

The to-be-deprecated APIs are determined by comparing APIs in `shim.h` and ops in `fallback_ops.py`

Test Plan:
CI

Rollback Plan:

Reviewed By: jingsh

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

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

@facebook-github-bot
Copy link
Contributor

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

yiming0416 added a commit to yiming0416/pytorch that referenced this pull request Jul 16, 2025
Summary:
Pull Request resolved: pytorch#158400

The shims for aten ops are now generated by torchgen. But there are some still old APIs in `aoti_torch/c/shim.h`

This diff moves the old to-be-deprecated APIs for aten ops to a separate header file `shim_deprecated.h`

The to-be-deprecated APIs are determined by comparing APIs in `shim.h` and ops in `fallback_ops.py`

Test Plan:
CI

Rollback Plan:

Reviewed By: jingsh

Differential Revision: D78378373
yiming0416 added a commit to yiming0416/pytorch that referenced this pull request Jul 16, 2025
Summary:

The shims for aten ops are now generated by torchgen. But there are some still old APIs in `aoti_torch/c/shim.h`

This diff moves the old to-be-deprecated APIs for aten ops to a separate header file `shim_deprecated.h`

The to-be-deprecated APIs are determined by comparing APIs in `shim.h` and ops in `fallback_ops.py`

Test Plan:
CI

Rollback Plan:

Reviewed By: jingsh

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

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

);

AOTI_TORCH_EXPORT AOTITorchError
aoti_torch__scaled_dot_product_flash_attention_v2(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one needs to be moved as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@desertfire I can move it to shim_deprecated.h but I cannot mark it with [[deprecated]]. Otherwise build failed as in shim_common.cpp aoti_torch__scaled_dot_product_flash_attention_v2 is being called inside aoti_torch__scaled_dot_product_flash_attention and all warnings being treated as errors in CI.

yiming0416 added a commit to yiming0416/pytorch that referenced this pull request Jul 17, 2025
Summary:

The shims for aten ops are now generated by torchgen. But there are some still old APIs in `aoti_torch/c/shim.h`

This diff moves the old to-be-deprecated APIs for aten ops to a separate header file `shim_deprecated.h`

The to-be-deprecated APIs are determined by comparing APIs in `shim.h` and ops in `fallback_ops.py`

#buildall

Test Plan:
CI

Rollback Plan:

Reviewed By: desertfire, jingsh

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

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

Summary:

The shims for aten ops are now generated by torchgen. But there are some still old APIs in `aoti_torch/c/shim.h`

This diff moves the old to-be-deprecated APIs for aten ops to a separate header file `shim_deprecated.h`

The to-be-deprecated APIs are determined by comparing APIs in `shim.h` and ops in `fallback_ops.py`

Test Plan:
CI

Rollback Plan:

Reviewed By: desertfire, jingsh

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

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

@facebook-github-bot
Copy link
Contributor

@pytorchbot merge

(Initiating merge automatically since Phabricator Diff has merged)

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants