thunder.core.baseutils.check

thunder.core.baseutils.check(cond, s, exception_type=<class 'RuntimeError'>)[source]

Helper function for raising an error_type (default: RuntimeError) if a boolean condition fails.

s is a callable producing a string to avoid string construction if the error check is passed.

Return type:

None

Parameters: