Detailed description:
Now when hcl.assert failed, an exception will be raised. Users can turn off the exception by setting hcl.init(raise_assert_exception=False). An example program to catch the assertion fail looks like this
def kernel(...):
...
hcl.assert_(xxx)
s = hcl.create_schedule()
f = hcl.build(s)
try:
f(args)
except hcl.debug.AssertError:
# handle the exception
Link to the tests:
Add one test under test_api_assert.py.
Fixed issue: #413
Detailed description: Now when
hcl.assert
failed, an exception will be raised. Users can turn off the exception by settinghcl.init(raise_assert_exception=False)
. An example program to catch the assertion fail looks like thisLink to the tests: Add one test under test_api_assert.py.