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

Implement Array.astype #456

Open
inducer opened this issue Sep 13, 2023 · 2 comments
Open

Implement Array.astype #456

inducer opened this issue Sep 13, 2023 · 2 comments

Comments

@inducer
Copy link
Owner

inducer commented Sep 13, 2023

The most plausible realization is to just set the dtype of the IndexLambda to the desired output type. Codegen is a bit more complex. If materialized, things will generally fall into place. Un-materialized codegen requires casting, and loopy doesn't currently have a coherent set of casting functions. 🤔

@kaushikcfd
Copy link
Collaborator

kaushikcfd commented Sep 13, 2023

Loopy has a TypeCast node. That, along with eager dtype evaluation, should just work, I think.

@inducer
Copy link
Owner Author

inducer commented Sep 13, 2023

💡 Thanks for the reminder!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants