-
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
[Doc] [refactor] Improve Taichi kernels and functions definition #1576
Conversation
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.
Great job! Some nits here and there, cheers 🥂
docs/hello.rst
Outdated
|
||
.. warning:: | ||
|
||
Taichi kernels must be called in the Python-scope. I.e., **nested kernels are not supported**. | ||
Nested functions are allowed. **Recursive functions are not supported for now**. | ||
|
||
But nested functions are allowed. **Recursive functions are not supported for now**. |
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.
I don't really think the but is appropriate here. Could you either remove the but or swap the order of the last 2 sentences (and turn the period into a comma)?
docs/type.rst
Outdated
- ``i32 + f32 = f32`` (integer + float = float) | ||
- ``i32 + i64 = i64`` (less-bits + more-bits = lamore-bits) | ||
|
||
Basically it will try to choose the least precise type to contain the result value. |
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.
Umm... I'm not following here. Do you mean 'most'?
Co-authored-by: Xiao Zhai <7610945+TroyZhai@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## master #1576 +/- ##
==========================================
- Coverage 44.11% 44.08% -0.04%
==========================================
Files 41 41
Lines 5905 5907 +2
Branches 1024 1025 +1
==========================================
- Hits 2605 2604 -1
- Misses 3151 3153 +2
- Partials 149 150 +1
Continue to review full report at Codecov.
|
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.
Hi @archibate , great job! Just one minor thing, I remembered that there was a place that you mentioned the type will be automatically casted to the most precise type (like float + double -> double) in binary operations, but I think you used 'least precise' or something like that. Could you explain the reason for that?
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.
Thanks! Only a few nits ⚡
Co-authored-by: Danni <38550500+isdanni@users.noreply.github.com>
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!
Related issue = #
[Click here for the format server]