We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Thanks for the feature by the way, it is a great improvement. However it has an issue when one of the fields is a Vector type.
import taichi as ti ti.init() @ti.dataclass class Foo: x: ti.f32 y: ti.f32 z : ti.math.vec3 @ti.kernel def foo(x:Foo): print(x.x) foo(Foo(1,2,ti.math.vec3(1,2,3))) # (conan_ros) oliver-laptop sync python test_types.py # [Taichi] version 1.6.0, llvm 15.0.4, commit cc4cacfa, linux, python 3.8.16 # [Taichi] Starting on arch=x64 # Traceback (most recent call last): # File "test_types.py", line 20, in <module> # foo(Foo(1,2,ti.math.vec3(1,2,3))) # File "/home/oliver/mambaforge/envs/conan_ros/lib/python3.8/site-packages/taichi/lang/kernel_impl.py", line 1036, in wrapped # return primal(*args, **kwargs) # File "/home/oliver/mambaforge/envs/conan_ros/lib/python3.8/site-packages/taichi/lang/kernel_impl.py", line 963, in __call__ # return self.runtime.compiled_functions[key](*args) # File "/home/oliver/mambaforge/envs/conan_ros/lib/python3.8/site-packages/taichi/lang/kernel_impl.py", line 848, in func__ # needed.set_kernel_struct_args(v, launch_ctx, # File "/home/oliver/mambaforge/envs/conan_ros/lib/python3.8/site-packages/taichi/lang/struct.py", line 686, in set_kernel_struct_args # dtype.set_kernel_struct_args(struct[name], launch_ctx, # AttributeError: 'VectorType' object has no attribute 'set_kernel_struct_args'
The text was updated successfully, but these errors were encountered:
Thanks! It only supports primitive types in the struct now. Maybe vectors will be supported in the next release.
Sorry, something went wrong.
lin-hitonami
Successfully merging a pull request may close this issue.
Thanks for the feature by the way, it is a great improvement. However it has an issue when one of the fields is a Vector type.
The text was updated successfully, but these errors were encountered: