heterocl.debug

Exception handler in HeteroCL

This module defines various HeteroCL exceptions. Developers are free to add new types of exception.

exception APIError(msg)[source]

Bases: heterocl.debug.HCLError

A subclass for specifying API related exception

exception DSLError(msg)[source]

Bases: heterocl.debug.HCLError

A subclass for specifying imperative DSL related exception

exception DTypeError(msg)[source]

Bases: heterocl.debug.HCLError

A subclass for specifying data type related exception

exception DeviceError(msg)[source]

Bases: heterocl.debug.HCLError

A subclass for specifying device related exception

exception HCLError(msg, info=None)[source]

Bases: Exception

HeteroCL related exception

User can specify additional class for the exception.

Parameters
  • msg (str) – The error message.

  • info (str, optional) – Additional class specification for the exception.

exception TensorError(msg)[source]

Bases: heterocl.debug.HCLError

A subclass for specifying tensor related exception

hcl_excepthook(etype, value, tb)[source]

Customized excepthook

If the exception is a HeteroCL exception, only the traceback that related to user’s program will be listed. All HeteroCL internal traceback will be hidden.