-
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
Cannot print field in kernel #6566
Comments
If I remember correctly we don't support printing a field in a kernel... |
So what is the obstacle here? I think it should be equivalent to printing each element of a field, which is valid. |
I have confirmed that this is not related to import taichi as ti
ti.init()
a = ti.field(ti.f32, shape=(4, 4))
@ti.kernel
def f():
print(a)
f() |
Directly printing a field in Taichi scope hasn't been supported yet. There are some performance concerns especially in terms of sparse fields such as However, we're considering supporting this feature in the future. |
This also does not work for ndarrays
|
will cause the following error:
However, both this
and this
can work.
The text was updated successfully, but these errors were encountered: