Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

MXNet currently has support for handling dmlc::Error exceptions in the backend and propagating them to frontend for both the operators and the iterators case.

There is a still some work needed w.r.t Exception Handling. This document lists out all the further improvements that can be done for the exception handling feature.

Improved Exception Types for the Backend

Currently, there are only three exceptions available for MXNet C++ backend: dmlc::Error, InferTypeError (inherits from dmlc::Error) and InferShapeError(inherits from dmlc::Error).

There are more scenarios where exceptions are thrown. Here are some examples: MemoryAllocationError, ConfigurationError(GPU_ENABLED), KVStoreError.

Add support for these exceptions in C++ backend. Exceptions that can be shared with dmlc-core should go in dmlc-core. 

Here is the implementation of dmlc::Error: https://github.com/dmlc/dmlc-core/blob/master/include/dmlc/logging.h#L31

I