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

Find a better solution for determining element type for the return array in e.g. normalize #1182

Open
BioTurboNick opened this issue Jan 26, 2025 · 0 comments

Comments

@BioTurboNick
Copy link
Contributor

Coming from: JuliaLang/julia#55830

Making this an issue rather than PR because there seems to be some question about what the solution should actually be, and it might be broader than this one method.

In the normalize stack, the existing code computes the result on one element, finds the type, and then that becomes the element type for the output array. I believe this is done to be generic for operations on arrays of arrays. However, relying on the first element means the type of the result has a hidden dependency on element order, and the scalar lookup means the code can't run on a GPU.

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

1 participant