Skip to content

[executorch] Suppress wdeprecated warnings on tensor_layout.h and named_data_map.h #8201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

lucylq
Copy link
Contributor

@lucylq lucylq commented Feb 5, 2025

Stack from ghstack (oldest at bottom):

Context:
ET_EXPERIMENTAL is tagged with [[deprecated]]. This causes errors when ET_EXPERIMENTAL features are used in core ET and code is built with -Werror. See errors on D67127327.

This diff applies Option1 to 'tensor_layout.h' and Option2 to 'named_data_map.h'

Option 1:

  • gate with #pragma GCC diagnostic ignored "-Wdeprecated-declarations", for users of tensor_layout.h and program.h

Option 2:

  • use ET_DISABLE_EXPERIMENTAL_ANNOTATION=1, for users of tensor_layout.h and program.h

Users

  • tensor_layout.h: named_data_map.h
  • named_data_map.h: method.h, program.h

Generally, I think we can apply either option1/option2 to tensor_layout.h.
For named_data_map.h, I think we should apply option2, to make ET_EXPERIMENTAL a no-op, or remove the ET_EXPERIMENTAL annotation to the implementation class. Option 1 would disable deprecation warnings for the entire file.

Differential Revision: D69145438

…ed_data_map.h

Context:
ET_EXPERIMENTAL is tagged with [[deprecated]]. This causes errors when ET_EXPERIMENTAL features are used in core ET and code is built with -Werror. See errors on D67127327.

This diff applies Option1 to 'tensor_layout.h' and Option2 to 'named_data_map.h'

Option 1:
- gate with `#pragma GCC diagnostic ignored "-Wdeprecated-declarations"`, for users of tensor_layout.h and program.h

Option 2:
- use ET_DISABLE_EXPERIMENTAL_ANNOTATION=1, for users of tensor_layout.h and program.h

----

Users
- tensor_layout.h: named_data_map.h
- named_data_map.h: method.h, program.h

Generally, I think we can apply either option1/option2 to `tensor_layout.h`.
For `named_data_map.h`, I think we should apply option2, to make ET_EXPERIMENTAL a no-op, or remove the ET_EXPERIMENTAL annotation to the implementation class. Option 1 would disable deprecation warnings for the entire file.

Differential Revision: [D69145438](https://our.internmc.facebook.com/intern/diff/D69145438/)

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Feb 5, 2025

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit 57af983 with merge base 821a2fe (image):
💚 Looks good so far! There are no failures yet. 💚

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

@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 5, 2025
lucylq added a commit that referenced this pull request Feb 5, 2025
…ed_data_map.h

Context:
ET_EXPERIMENTAL is tagged with [[deprecated]]. This causes errors when ET_EXPERIMENTAL features are used in core ET and code is built with -Werror. See errors on D67127327.

This diff applies Option1 to 'tensor_layout.h' and Option2 to 'named_data_map.h'

Option 1:
- gate with `#pragma GCC diagnostic ignored "-Wdeprecated-declarations"`, for users of tensor_layout.h and program.h

Option 2:
- use ET_DISABLE_EXPERIMENTAL_ANNOTATION=1, for users of tensor_layout.h and program.h

----

Users
- tensor_layout.h: named_data_map.h
- named_data_map.h: method.h, program.h

Generally, I think we can apply either option1/option2 to `tensor_layout.h`.
For `named_data_map.h`, I think we should apply option2, to make ET_EXPERIMENTAL a no-op, or remove the ET_EXPERIMENTAL annotation to the implementation class. Option 1 would disable deprecation warnings for the entire file.

Differential Revision: [D69145438](https://our.internmc.facebook.com/intern/diff/D69145438/)

ghstack-source-id: 264698784
Pull Request resolved: #8201
@facebook-github-bot
Copy link
Contributor

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

…t.h and named_data_map.h"

Context:
ET_EXPERIMENTAL is tagged with [[deprecated]]. This causes errors when ET_EXPERIMENTAL features are used in core ET and code is built with -Werror. See errors on D67127327.

This diff applies Option1 to 'tensor_layout.h' and Option2 to 'named_data_map.h'

Option 1:
- gate with `#pragma GCC diagnostic ignored "-Wdeprecated-declarations"`, for users of tensor_layout.h and program.h

Option 2:
- use ET_DISABLE_EXPERIMENTAL_ANNOTATION=1, for users of tensor_layout.h and program.h

----

Users
- tensor_layout.h: named_data_map.h
- named_data_map.h: method.h, program.h

Generally, I think we can apply either option1/option2 to `tensor_layout.h`.
For `named_data_map.h`, I think we should apply option2, to make ET_EXPERIMENTAL a no-op, or remove the ET_EXPERIMENTAL annotation to the implementation class. Option 1 would disable deprecation warnings for the entire file.

Differential Revision: [D69145438](https://our.internmc.facebook.com/intern/diff/D69145438/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot facebook-github-bot merged commit e22b3ce into gh/lucylq/39/base Feb 5, 2025
46 of 48 checks passed
@facebook-github-bot facebook-github-bot deleted the gh/lucylq/39/head branch February 5, 2025 19:18
kirklandsign pushed a commit that referenced this pull request Feb 5, 2025
…ed_data_map.h

Pull Request resolved: #8201

Context:
ET_EXPERIMENTAL is tagged with [[deprecated]]. This causes errors when ET_EXPERIMENTAL features are used in core ET and code is built with -Werror. See errors on D67127327.

This diff applies Option1 to 'tensor_layout.h' and 'named_data_map.h'

Option 1:
- gate with `#pragma GCC diagnostic ignored "-Wdeprecated-declarations"`, for users of tensor_layout.h and program.h

Option 2:
- use ET_DISABLE_EXPERIMENTAL_ANNOTATION=1, for users of tensor_layout.h and program.h

----

Users
- tensor_layout.h: named_data_map.h
- named_data_map.h: method.h, program.h


~~Generally, I think we can apply either option1/option2 to `tensor_layout.h`.
For `named_data_map.h`, I think we should apply option2, to make ET_EXPERIMENTAL a no-op, or remove the ET_EXPERIMENTAL annotation to the implementation class. Option 1 would disable deprecation warnings for the entire file.`~~

Using option 1, as option 2 correctness depends on if compiler.h, or named_data_map/tensor_layout is compiled first, and likely we would implement it as an ET-wide flag, which would remove warnings for ET_EXPERIMENTAL across ET.


ghstack-source-id: 264730421
@exported-using-ghexport

Differential Revision: [D69145438](https://our.internmc.facebook.com/intern/diff/D69145438/)

Co-authored-by: lucylq <[email protected]>
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 topic: not user facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants