cornell-zhang / heterocl

HeteroCL: A Multi-Paradigm Programming Infrastructure for Software-Defined Heterogeneous Computing
https://cornell-zhang.github.io/heterocl/
Apache License 2.0
322 stars 92 forks source link

[API] Generate correct error message when operating with NumPy numbers #343

Closed seanlatias closed 3 years ago

seanlatias commented 3 years ago

Solved Issue: #342

Reason and solution: When operating with NumPy numbers (e.g., +, >), if we put NumPy numbers on LHS, it will trigger NumPy's operators instead of HeteroCL's. Thus, it generates errors. The existing error message does not show the correct information. This PR fixes the output error messages.

Test case: tests/issues/test_issue_342.py