Skip to content

Supporting map on GPU #300

Open
Open
@aplavin

Description

@aplavin

StructArrays components can be GPU arrays, but many operations on them are not supported yet. For example, a simple map:

using Metal

A = StructArray(a=MtlArray(rand(Float32, 10^3)), b=MtlArray(rand(Int8, 10^3)))

map(exp, A.a)  # works

map(x -> exp(x.a), A) # throws "Scalar indexing is disallowed" because `map` falls back to iteration

Would be great to make it work! How do you think could be implemented? I'm not very experienced with GPU arrays and their inner workings.

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