-
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] Support formatted printing in str.format() and f-strings #7686
Conversation
✅ Deploy Preview for docsite-preview canceled.
|
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.
Logic-wise it looks good to me!
However, I was thinking merge_printf_specifier
should aim at returning a backend-agnostic result of formatted string (only does the "merge" operation), and the adaptions for specific backends (vulkan, cuda, etc) can be done inside each codegen_cuda.cpp
, codegen_spirv.cpp
of visit(PrintStmt *stmt)
. What do you think?
for more information, see https://pre-commit.ci
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!
…hi-dev#7686) Issue: taichi-dev#5949 ### Brief Summary This PR enables formatted printing in Taichi scope using `str.format()` and f-strings. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Issue: #5949
Brief Summary
This PR enables formatted printing in Taichi scope using
str.format()
and f-strings.