I have a kernel, which uses the
exp operation, it breaks down in a strange way
Minimum working example:
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 breaking down @device_code_warntype CUDAnative.mapreduce(CUDAnative.exp, +, x)
mapreducecan run without calling a kernel and
mapcalls the kernel?
- Is it possible to prevent Julia from breaking down when calling
CUDAnative.expdirectly (not on GPU) and other CUDA intrinsics? Relaunching Julia REPL or Atom can be frustrating.
- How to make the kernel function reusable, i.e. switch between
Base.expwithout changing the kernel function?