-
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
[Lang] [bug] Fix support staticmethod decorator for data_oriented class #3186
Conversation
✔️ Deploy Preview for jovial-fermat-aa59dc ready! 🔨 Explore the source changes: 45efcd4 🔍 Inspect the deploy log: https://app.netlify.com/sites/jovial-fermat-aa59dc/deploys/616d29ca8330288237a82449 😎 Browse the preview: https://deploy-preview-3186--jovial-fermat-aa59dc.netlify.app |
@ailzhang @Zheaoli @yuanming-hu can you take a look, and make some change for |
tests/python/test_oop.py
Outdated
return 3 | ||
|
||
a = TestStatic() | ||
assert a.kernel_static == 42 |
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.
Seems you can not use a.kernel_static
here directly. Look at here https://github.com/taichi-dev/taichi/blob/master/python/taichi/lang/kernel_impl.py#L822
And check the unit test results https://github.com/taichi-dev/taichi/pull/3186/checks?check_run_id=3889839596
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.
Fixed.
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.
@Zheaoli its strange why some test case passed.......
My code is missing the ()
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.
The CI script may get some issue.
I will fix it
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! Thanks for contributing!
Related issue = #3019
Also support the
@staticmethod
decorator