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

Update ICHECK error message with link to documentation page. #7869

Merged
merged 10 commits into from
Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions docs/errors.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

.. http://www.apache.org/licenses/LICENSE-2.0

.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.


What do to when encountering TVM Errors
=======================================

When running TVM, you may encounter an error message like:

.. code::

---------------------------------------------------------------
An error occurred during the execution of TVM.
For more information, please see: https://tvm.apache.org/docs/errors.html
---------------------------------------------------------------

Congratulations! You found this page. Below are some hints on how to interpret
these error messages and what you can do when they occur.

Where do these errors come from?
--------------------------------

This error is caused by an internal invariant being violated during TVM's
execution. On a technical level, the message is generated by the
``ICHECK`` macro, found in ``include/tvm/runtime/logging.h``.
The ``ICHECK`` macro is used in many places in the TVM code to assert
some condition is true during execution; any time the assertion fails, TVM
will exit with the error message shown above.

For more details about how errors are handled and generated by TVM, please
see `error-handling-guide`.

What should I do when I encounter such an error?
------------------------------------------------

First of all, *don't panic*. Well, you can panic, but it won't help.

The best course of action is to search the
`Apache TVM Discuss Forum <https://discuss.tvm.apache.org/>`_
for the error you are encountering, to see if this has been a problem
that others have encountered, and what the solution might be.
If this error is the result of a bug that has been fixed in a more
recent version of TVM, you may need to update to a newer version.

If you do not find an existing Discuss Forum thread about your
issue, you are welcome to start a new thread on the forum with details
on the problem. *Please* include in your posting the following key
pieces of information:

* The version of TVM you are using (e.g., the git commit hash of your source tree).
* Which hardware and operating system version you are running TVM on.
* Which hardware device and OS you are targeting for your TVM compilation.
* Details on the model, inputs, or other information about the workload, which can
be used to reproduce your problem.

Without these details it is very difficult for the TVM developers to do very
much to help you.

1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ For Developers
deploy/index
dev/how_to
microtvm/index
errors

.. toctree::
:maxdepth: 1
Expand Down
5 changes: 2 additions & 3 deletions include/tvm/runtime/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,8 @@ inline bool DebugLoggingEnabled() {
constexpr const char* kTVM_INTERNAL_ERROR_MESSAGE =
"\n"
"---------------------------------------------------------------\n"
"An internal invariant was violated during the execution of TVM.\n"
"Please read TVM's error reporting guidelines.\n"
"More details can be found here: https://discuss.tvm.ai/t/error-reporting/7793.\n"
"An error occurred during the execution of TVM.\n"
"For more information, please see: https://tvm.apache.org/docs/errors.html\n"
"---------------------------------------------------------------\n";

template <typename X, typename Y>
Expand Down