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

Conversation

baggepinnen
Copy link
Contributor

With this pr we have

julia> a = randn(2,2)
2×2 Array{Float64,2}:
 0.393718  -1.0575  
 2.1653    -0.835585

julia> cu(a)
2×2 CuArray{Float32,2,Nothing}:
 0.393718  -1.0575  
 2.1653    -0.835585

julia> cu(typeof(a))
CuArray{Float64,2,P} where P

Would it perhaps be better to have CuArray{Float64,2,Nothing}?

@baggepinnen
Copy link
Contributor Author

I changed the behaviour to return a concrete type if possible

julia> a = randn(2,2)
2×2 Array{Float64,2}:
 -0.184837  -0.0053234
  0.790932  -1.72842  

julia> cu(a)
2×2 CuArray{Float32,2,Nothing}:
 -0.184837  -0.0053234
  0.790932  -1.72842  

julia> cu(typeof(a))
CuArray{Float64,2,Nothing}

@maleadt
Copy link
Member

maleadt commented Dec 2, 2019

LGTM
bors r+

bors bot added a commit that referenced this pull request Dec 2, 2019
522: RFC: Allow cu to operate on Array types r=maleadt a=baggepinnen

With this pr we have
```
julia> a = randn(2,2)
2×2 Array{Float64,2}:
 0.393718  -1.0575  
 2.1653    -0.835585

julia> cu(a)
2×2 CuArray{Float32,2,Nothing}:
 0.393718  -1.0575  
 2.1653    -0.835585

julia> cu(typeof(a))
CuArray{Float64,2,P} where P
```
Would it perhaps be better to have `CuArray{Float64,2,Nothing}`?

Co-authored-by: Fredrik Bagge Carlson <[email protected]>
@bors
Copy link
Contributor

bors bot commented Dec 2, 2019

Build failed

@maleadt
Copy link
Member

maleadt commented Dec 20, 2019

Re-ran CI, succeeded this time (was a package installation failure across the board).

@maleadt maleadt merged commit 50c1a3d into JuliaGPU:master Dec 20, 2019
@maleadt maleadt mentioned this pull request Jan 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants