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

Add int64 dtype support for RangeFor boundaries #5320

Open
jim19930609 opened this issue Jul 4, 2022 · 1 comment
Open

Add int64 dtype support for RangeFor boundaries #5320

jim19930609 opened this issue Jul 4, 2022 · 1 comment
Labels
feature request Suggest an idea on this project

Comments

@jim19930609
Copy link
Contributor

jim19930609 commented Jul 4, 2022

Taichi implicitly casts RangeFor boundaries to ti.i32, which is an unnecessary limitation and causes confusion when users explicitly specifies ti.i64 as RangeFor boundaries (#5217).

image

Ideally, backend's dtype limitation should not bother the frontend design. Unfortunately, we did forbiddened higher precision dtypes in certain cases due to concerns regarding the backends (RangeFor boundaries, ti.atan type conversion, etc..)

We should add a "dtype demotion" pass for each specific backend, and remove all these dtype conversions from the frontend.

@jim19930609
Copy link
Contributor Author

jim19930609 commented Jul 8, 2022

PR #5322 just added a warning message for this implicit conversion, which did not actually resolve this issue. Ideally we should convert the boundaries to int64 instead of int32.

@jim19930609 jim19930609 reopened this Jul 8, 2022
@taichi-gardener taichi-gardener moved this to Untriaged in Taichi Lang Jul 12, 2022
@neozhaoliang neozhaoliang moved this from Untriaged to Backlog in Taichi Lang Jul 22, 2022
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: Backlog
Development

No branches or pull requests

2 participants