-
Notifications
You must be signed in to change notification settings - Fork 699
[Onnxifi] Better error message #3514
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
Conversation
lib/Onnxifi/Base.cpp
Outdated
@@ -157,8 +157,18 @@ onnxStatus Graph::setIOAndRun(uint32_t inputsCount, | |||
} | |||
|
|||
if (inOnnxTensorSize > inPhPtr->getType()->size()) { | |||
std::stringstream ss; | |||
for (const auto i : inOnnxTensorDims) { | |||
ss << i << ", "; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nicer without the trailing comma, too bad we don't have folly::join :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python style. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yinghai has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yinghai has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Summary:
Give better error message when input tensor is larger than the compiled spec. Adding shape will help on which dimension we got wrong.
Documentation:
[Optional Fixes #issue]
Test Plan:
Please see a detailed explanation of how to fill out the fields in the relevant sections in PULL_REQUEST.md.