-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testable Device-Side Assertion Failures on CPUs #605
Conversation
Test case: ti.init(debug=True)
@ti.kernel
def boom():
assert 0
boom() Output:
Are we checking the error code too early? |
(Note that when two threads use |
I got this in another run:
Go to sleep now. Maybe debug it tomorrow. |
I'm actually slightly confused: why |
std::cout << "i64 " << (typeid(error_code) == typeid(unsigned long long)) << std::endl;
std::cout << "u64 " << (typeid(error_code) == typeid(long long)) << std::endl;
std::cout << "ptr " << (typeid(error_code) == typeid(void *)) << std::endl;
std::cout << "error code: " << error_code << std::endl; Output:
|
Oh I see. You are printing a pointer. |
|
How is this going? Do you need any help? I'm available via Skype if you would like to chat. |
Let's Skype chat then. |
Please move |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Could you please add some unit tests for bound checks and basic assert statements in tests/python/test_assert.py
?
The exception raised is |
Yeah, let's just use |
Need any help on this PR? |
Why did CI fail? |
Let me see. |
(Unlike AppVeyor, I can't find console log on Travis CI...) |
That's true. But good problem solvers don't find excuses. They look for ways to solve the problems or ask for help from someone more experienced :-) |
Go to cook dinner now. I think this is an issue across platforms but I only have access to my Windows laptop. See you later. |
Yeah, it is indeed a cross-platform issue but please let me know next time when you run into something that you can't resolve on your own. |
Should be fixed now. Please rebase your commits on |
std::exception is translated into RuntimeError. See pybind11 doc:exception for more info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Related issue id = #591
A continuation of #582