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

Flexible tensor shape support #5

Closed
ifsheldon opened this issue Dec 30, 2021 · 1 comment
Closed

Flexible tensor shape support #5

ifsheldon opened this issue Dec 30, 2021 · 1 comment
Labels
enhancement New feature or request Taichi-related welcome_contribution contributions are welcome

Comments

@ifsheldon
Copy link
Owner

Now stannum only supports tensors with fixed shapes which are defined by shapes of registered fields. However, Taichi kernels are more flexible than that.

For example, this simple kernel can handle 3 arrays of the same arbitrary length

@ti.kernel
def array_add(array0: ti.template(), array1: ti.template(), output_array: ti.template()):
    for i in range(array0.shape[0]):
        output_array[i] = array0[i] + array1[i]  

But, we cannot do that with stannum now.

Now I don't have a clear idea about how to implement this, but discussions and PRs are always welcomed.

@ifsheldon ifsheldon added enhancement New feature or request Taichi-related welcome_contribution contributions are welcome labels Dec 30, 2021
@ifsheldon
Copy link
Owner Author

This is resolved by newly introduced Tube in v0.4.0, which self-manages the life cycle of fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Taichi-related welcome_contribution contributions are welcome
Projects
None yet
Development

No branches or pull requests

1 participant