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

Unify the error code #690

Open
nudles opened this issue May 9, 2020 · 2 comments
Open

Unify the error code #690

nudles opened this issue May 9, 2020 · 2 comments

Comments

@nudles
Copy link
Member

nudles commented May 9, 2020

It would be better to have a error code list for debugging.
Then we can raise the errors.

Here are some example errors:

  1. device not set or not match for input tensors to an operator
  2. memory not allocated for a tensor
  3. parameters not created in a layer
  4. tensor shape not match
  5. tensor dtype not match
@chrishkchris
Copy link
Contributor

chrishkchris commented May 12, 2020

Yes, currently one of the problem in the debugging is that it do not tell which file and which line has problem.

I suggest we can add __FILE__, __LINE__ to incidate which file and which line when we handle the five examples errors in this issue. For examples:
https://github.com/apache/singa/blob/master/include/singa/io/communicator.h#L54

@XJDKC
Copy link
Member

XJDKC commented May 12, 2020

Yes, currently one of the problem in the debugging is that it do not tell which file and which line has problem.

I suggest we can add __FILE__, __LINE__ to incidate which file and which line when we handle the five examples errors in this issue. For examples:
https://github.com/apache/singa/blob/master/include/singa/io/communicator.h#L54

Yeah, we can use macros to achieve that. But @nudles suggested we can use an error code list. We can provide a table for users to look up the details of the error by using the error code they get.

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

No branches or pull requests

3 participants