Skip to content

Log dtype names on input dtype mismatch #7537

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 1 commit into from
Jan 15, 2025

Conversation

GregoryComer
Copy link
Member

Summary:
Update the error message when input tensor scalar type is incorrect. We've seen this get hit a few times and it should be easier to debug than it is.

New Message:

[method.cpp:825] Input 0 has unexpected scalar type: expected Byte but was Float.

Old Message:

[method.cpp:826] The 0-th input tensor's scalartype does not meet requirement: found 0 but expected 6

Differential Revision: D67887770

Copy link

pytorch-bot bot commented Jan 7, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 5db5142 with merge base cf8d0cf (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 Jan 7, 2025
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

@GregoryComer has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Jan 7, 2025
Summary:
Update the error message when input tensor scalar type is incorrect. We've seen this get hit a few times and it should be easier to debug than it is.

New Message:
```
[method.cpp:825] Input 0 has unexpected scalar type: expected Byte but was Float.
```
Old Message:
```
[method.cpp:826] The 0-th input tensor's scalartype does not meet requirement: found 0 but expected 6
```


Reviewed By: digantdesai

Differential Revision: D67887770

Pulled By: GregoryComer
@facebook-github-bot
Copy link
Contributor

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

GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Jan 7, 2025
Summary:
Update the error message when input tensor scalar type is incorrect. We've seen this get hit a few times and it should be easier to debug than it is.

New Message:
```
[method.cpp:825] Input 0 has unexpected scalar type: expected Byte but was Float.
```
Old Message:
```
[method.cpp:826] The 0-th input tensor's scalartype does not meet requirement: found 0 but expected 6
```


Reviewed By: digantdesai

Differential Revision: D67887770

Pulled By: GregoryComer
@facebook-github-bot
Copy link
Contributor

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

GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Jan 7, 2025
Summary:
Update the error message when input tensor scalar type is incorrect. We've seen this get hit a few times and it should be easier to debug than it is.

New Message:
```
[method.cpp:825] Input 0 has unexpected scalar type: expected Byte but was Float.
```
Old Message:
```
[method.cpp:826] The 0-th input tensor's scalartype does not meet requirement: found 0 but expected 6
```


Test Plan:
Built executorch bento kernel locally and tested with an incorrect scalar type to view the new error message.
```
[method.cpp:825] Input 0 has unexpected scalar type: expected Byte but was Float.
```

Reviewed By: digantdesai

Differential Revision: D67887770

Pulled By: GregoryComer
@facebook-github-bot
Copy link
Contributor

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

GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Jan 8, 2025
Summary:
Update the error message when input tensor scalar type is incorrect. We've seen this get hit a few times and it should be easier to debug than it is.

New Message:
```
[method.cpp:825] Input 0 has unexpected scalar type: expected Float but was Byte.
```
Old Message:
```
[method.cpp:826] The 0-th input tensor's scalartype does not meet requirement: found 0 but expected 6
```


Test Plan:
Built executorch bento kernel locally and tested with an incorrect scalar type to view the new error message.
```
[method.cpp:825] Input 0 has unexpected scalar type: expected Float but was Byte.
```

Reviewed By: digantdesai, SS-JIA

Differential Revision: D67887770

Pulled By: GregoryComer
@facebook-github-bot
Copy link
Contributor

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

GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Jan 8, 2025
Summary:
Update the error message when input tensor scalar type is incorrect. We've seen this get hit a few times and it should be easier to debug than it is.

New Message:
```
[method.cpp:834] Input 0 has unexpected scalar type: expected Float but was Byte.
```
Old Message:
```
[method.cpp:826] The 0-th input tensor's scalartype does not meet requirement: found 0 but expected 6
```


Test Plan:
Built executorch bento kernel locally and tested with an incorrect scalar type to view the new error message.
```
[method.cpp:834] Input 0 has unexpected scalar type: expected Float but was Byte.
```
I also locally patched and built the bento kernel with ET_ENABLE_ENUM_STRINGS=0.
```
[method.cpp:834] Input 0 has unexpected scalar type: expected 6 but was 0.
```

Reviewed By: digantdesai, SS-JIA

Differential Revision: D67887770

Pulled By: GregoryComer
@facebook-github-bot
Copy link
Contributor

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

GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Jan 8, 2025
Summary:
Update the error message when input tensor scalar type is incorrect. We've seen this get hit a few times and it should be easier to debug than it is.

New Message:
```
[method.cpp:834] Input 0 has unexpected scalar type: expected Float but was Byte.
```
Old Message:
```
[method.cpp:826] The 0-th input tensor's scalartype does not meet requirement: found 0 but expected 6
```

Test Plan:
Built executorch bento kernel locally and tested with an incorrect scalar type to view the new error message.
```
[method.cpp:834] Input 0 has unexpected scalar type: expected Float but was Byte.
```
I also locally patched and built the bento kernel with ET_ENABLE_ENUM_STRINGS=0.
```
[method.cpp:834] Input 0 has unexpected scalar type: expected 6 but was 0.
```

Reviewed By: digantdesai, SS-JIA

Differential Revision: D67887770

Pulled By: GregoryComer
GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Jan 9, 2025
Summary:
Update the error message when input tensor scalar type is incorrect. We've seen this get hit a few times and it should be easier to debug than it is.

New Message:
```
[method.cpp:834] Input 0 has unexpected scalar type: expected Float but was Byte.
```
Old Message:
```
[method.cpp:826] The 0-th input tensor's scalartype does not meet requirement: found 0 but expected 6
```


Test Plan:
Built executorch bento kernel locally and tested with an incorrect scalar type to view the new error message.
```
[method.cpp:834] Input 0 has unexpected scalar type: expected Float but was Byte.
```
I also locally patched and built the bento kernel with ET_ENABLE_ENUM_STRINGS=0.
```
[method.cpp:834] Input 0 has unexpected scalar type: expected 6 but was 0.
```

Reviewed By: digantdesai, SS-JIA

Differential Revision: D67887770

Pulled By: GregoryComer
@facebook-github-bot
Copy link
Contributor

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

Summary:
Update the error message when input tensor scalar type is incorrect. We've seen this get hit a few times and it should be easier to debug than it is.

New Message:
```
[method.cpp:834] Input 0 has unexpected scalar type: expected Float but was Byte.
```
Old Message:
```
[method.cpp:826] The 0-th input tensor's scalartype does not meet requirement: found 0 but expected 6
```


Test Plan:
Built executorch bento kernel locally and tested with an incorrect scalar type to view the new error message.
```
[method.cpp:834] Input 0 has unexpected scalar type: expected Float but was Byte.
```
I also locally patched and built the bento kernel with ET_ENABLE_ENUM_STRINGS=0.
```
[method.cpp:834] Input 0 has unexpected scalar type: expected 6 but was 0.
```

Differential Revision: D67887770

Pulled By: GregoryComer
@facebook-github-bot
Copy link
Contributor

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

@GregoryComer GregoryComer merged commit 24f0d34 into pytorch:main Jan 15, 2025
45 checks passed
YIWENX14 pushed a commit that referenced this pull request Jan 28, 2025
Log dtype names on input dtype mismatch (#7537)

Summary:
Update the error message when input tensor scalar type is incorrect. We've seen this get hit a few times and it should be easier to debug than it is.

New Message:
```
[method.cpp:834] Input 0 has unexpected scalar type: expected Float but was Byte.
```
Old Message:
```
[method.cpp:826] The 0-th input tensor's scalartype does not meet requirement: found 0 but expected 6
```


Test Plan:
Built executorch bento kernel locally and tested with an incorrect scalar type to view the new error message.
```
[method.cpp:834] Input 0 has unexpected scalar type: expected Float but was Byte.
```
I also locally patched and built the bento kernel with ET_ENABLE_ENUM_STRINGS=0.
```
[method.cpp:834] Input 0 has unexpected scalar type: expected 6 but was 0.
```

Differential Revision: D67887770

Pulled By: GregoryComer
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 release notes: misc Miscellaneous
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants