Skip to content
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

Use pprintpp to offer Python-style printf in Taichi scope #5987

Open
lucifer1004 opened this issue Sep 6, 2022 · 2 comments
Open

Use pprintpp to offer Python-style printf in Taichi scope #5987

lucifer1004 opened this issue Sep 6, 2022 · 2 comments
Assignees
Labels
feature request Suggest an idea on this project

Comments

@lucifer1004
Copy link
Contributor

Concisely describe the proposed feature
Currently, print() works differently in Python and Taichi scopes. In Taichi scopes, the format part is merely discarded.

Describe the solution you'd like (if any)
Projects like pprintpp provide Pythonic printf in C++, and can be used in Taichi.

@lucifer1004 lucifer1004 added the feature request Suggest an idea on this project label Sep 6, 2022
@taichi-gardener taichi-gardener moved this to Untriaged in Taichi Lang Sep 6, 2022
@lucifer1004
Copy link
Contributor Author

Related issues: #5949 #5972

@ailzhang ailzhang self-assigned this Sep 16, 2022
@ailzhang ailzhang moved this from Untriaged to Todo in Taichi Lang Sep 16, 2022
@ailzhang
Copy link
Contributor

Hey @lucifer1004 ! Thanks for the feature request!
IIUC pprintpp-like support is feasible on cpu backend, but for backends like cuda/vulkan printing actually happens on device and we'll mostly limit to what they support. For example "%s" is not supported on vulkan :P so it does require some tweaks for each backend to support them. Btw we currently partially support f-string since we does the parsing in python preprocessing ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Suggest an idea on this project
Projects
Status: Todo
Development

No branches or pull requests

2 participants