Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

polish mapreduce interface #204

Closed
Closed

Description

Don't let the following call to mapreduce fallback to CPU

using CuArrays, CUDAnative
CuArrays.allowscalar(false)

x = randn(1000) |> cu
CUDAnative.map(CUDAnative.exp, x)
CUDAnative.reduce(+, x)

# works, but no kernel is evaluated
@device_code_warntype CUDAnative.mapreduce(exp, +, x) # no kernel evaluated

# the following code will cause Julia break down
@device_code_warntype CUDAnative.mapreduce(CUDAnative.exp, +, x)

Issue #180 can be helpful in preventing unexpected fallback, with data transferred silently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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