Skip to content
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

Use tensor_shape_to_c_string for error in check_mask_indices #8314

Merged
merged 3 commits into from
Feb 12, 2025

Conversation

swolchok
Copy link
Contributor

@swolchok swolchok commented Feb 7, 2025

Rolling out for #7902

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Feb 7, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 1a17c4d with merge base 9746ce7 (image):
💚 Looks good so far! There are no failures yet. 💚

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

swolchok added a commit that referenced this pull request Feb 7, 2025
Rolling out for #7902

ghstack-source-id: db14c70dfafc167611004d7842325d3f6e0ebbde
ghstack-comment-id: 2643854240
Pull Request resolved: #8314
@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 7, 2025
[ghstack-poisoned]
Comment on lines 54 to 66
#ifdef ET_LOG_ENABLED
auto mask_shape = executorch::runtime::tensor_shape_to_c_string(
executorch::runtime::Span<const Tensor::SizesType>(
index.sizes().data(), index.sizes().size()));
auto input_shape = executorch::runtime::tensor_shape_to_c_string(
executorch::runtime::Span<const Tensor::SizesType>(
in.sizes().data() + in_i, index.sizes().size()));
#endif // ET_LOG_ENABLED
ET_LOG(
Error,
"The shape of mask index %s must match the sizes of the corresponding input dimensions %s.",
mask_shape.data(),
input_shape.data());
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, I think it'd be less surprising if the ifdef covered the entire scope of the vars that are defined inside it.

Suggested change
#ifdef ET_LOG_ENABLED
auto mask_shape = executorch::runtime::tensor_shape_to_c_string(
executorch::runtime::Span<const Tensor::SizesType>(
index.sizes().data(), index.sizes().size()));
auto input_shape = executorch::runtime::tensor_shape_to_c_string(
executorch::runtime::Span<const Tensor::SizesType>(
in.sizes().data() + in_i, index.sizes().size()));
#endif // ET_LOG_ENABLED
ET_LOG(
Error,
"The shape of mask index %s must match the sizes of the corresponding input dimensions %s.",
mask_shape.data(),
input_shape.data());
#ifdef ET_LOG_ENABLED
auto mask_shape = executorch::runtime::tensor_shape_to_c_string(
executorch::runtime::Span<const Tensor::SizesType>(
index.sizes().data(), index.sizes().size()));
auto input_shape = executorch::runtime::tensor_shape_to_c_string(
executorch::runtime::Span<const Tensor::SizesType>(
in.sizes().data() + in_i, index.sizes().size()));
ET_LOG(
Error,
"The shape of mask index %s must match the sizes of the corresponding input dimensions %s.",
mask_shape.data(),
input_shape.data());
#endif // ET_LOG_ENABLED

[ghstack-poisoned]
@swolchok swolchok merged commit ee7d388 into main Feb 12, 2025
45 checks passed
@swolchok swolchok deleted the gh/swolchok/236/head branch February 12, 2025 00:30
@cccclai
Copy link
Contributor

cccclai commented Feb 12, 2025

It seems like this PR breaks multiple tests

@swolchok
Copy link
Contributor Author

It seems like this PR breaks multiple tests

ugh, why do we have tests that only run on trunk, grumble grumble

@swolchok
Copy link
Contributor Author

suspiciously it is mostly qnn stuff + test-binary-size-linux. investigating

@swolchok
Copy link
Contributor Author

#8403 should fix test-binary-size-linux

@swolchok
Copy link
Contributor Author

swolchok commented Feb 12, 2025

#8404 might fix QNN, running ciflow/trunk on the stack (EDIT: looks green)

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. release notes: devtools Changes to dev tooling, for example the debugger & profiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants