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

exp.(x) is not type stable when x isa CuArray{Complex{Float32}} #543

Closed
Sleort opened this issue Dec 18, 2019 · 1 comment · Fixed by JuliaGPU/CUDAnative.jl#516
Closed
Labels

Comments

@Sleort
Copy link

Sleort commented Dec 18, 2019

Describe the bug

using CuArrays
x = CuArrays.rand(ComplexF32, 1) # <: CuArray{Complex{Float32}}
y = exp.(x) # <: CuArray{Complex{Float64}}
y isa CuArray{Complex{Float32}} #false

Expected behavior

y isa CuArray{Complex{Float32}} #true

Environment details
Details on Julia:

Julia Version 1.3.0
Commit 46ce4d7933 (2019-11-26 06:09 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)

Julia packages:

(v1.3) pkg>  st CuArrays
    Status `~/.julia/environments/v1.3/Project.toml`
  [fa961155] CEnum v0.2.0
  [3895d2a7] CUDAapi v2.0.0
  [c5f51814] CUDAdrv v4.0.4
  [be33ccc6] CUDAnative v2.6.0
  [3a865a2d] CuArrays v1.5.0
  [864edb3b] DataStructures v0.17.6
  [872c559c] NNlib v0.6.0 #master (https://github.com/FluxML/NNlib.jl.git)

CUDA: toolkit and driver version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Fri_Feb__8_19:08:17_PST_2019
Cuda compilation tools, release 10.1, V10.1.105
@Sleort Sleort added the bug label Dec 18, 2019
@PhilipVinc
Copy link

bors bot added a commit to JuliaGPU/CUDAnative.jl that referenced this issue Dec 23, 2019
516: fix CuArrays.jl #543 - complex exp type instability r=maleadt a=PhilipVinc

Original issue: [#543](JuliaGPU/CuArrays.jl#543)

Make complex exp type stable

Co-authored-by: Filippo Vicentini <filippovicentini@gmail.com>
maleadt added a commit that referenced this issue Dec 23, 2019
bors bot added a commit to JuliaGPU/CUDAnative.jl that referenced this issue Dec 23, 2019
516: fix CuArrays.jl #543 - complex exp type instability r=maleadt a=PhilipVinc

Fixes JuliaGPU/CuArrays.jl#543

Make complex exp type stable

Co-authored-by: Filippo Vicentini <filippovicentini@gmail.com>
maleadt added a commit that referenced this issue Dec 23, 2019
maleadt added a commit that referenced this issue Dec 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants