Skip to content

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

Open
@BioTurboNick

Description

@BioTurboNick

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions