# Can not use CuArray on Julia 0.7

**URL:** <https://discourse.julialang.org/t/can-not-use-cuarray-on-julia-0-7/16089>\
**Category:** GPU\
**Created:** [October 9, 2018, 7:53pm UTC](https://discourse.julialang.org/t/can-not-use-cuarray-on-julia-0-7/16089 "2018-10-09T19:53:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cuchxq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cuchxq/32/3830_2.png) [@cuchxq](https://discourse.julialang.org/u/cuchxq)\
**Post date:** [October 9, 2018, 7:53pm UTC](https://discourse.julialang.org/t/can-not-use-cuarray-on-julia-0-7/16089/1 "2018-10-09T19:53:36Z")

</div>

When I use 0.7 and try to use CuArray, the following error happens:

```julia
julia> using CuArrays
┌ Warning: `using A: B` will only be allowed for single bindings, not modules. Use `using A.B` instead
│ caller = ip:0x0
└ @ Core :-1
WARNING: could not import Base.showarray into GPUArrays
WARNING: could not import GPUArrays.allowscalar into CuArrays
WARNING: could not import GPUArrays.@allowscalar into CuArrays
ERROR: LoadError: LoadError: UndefVarError: GPUBackend not defined
Stacktrace:
 [1] getproperty(::Module, ::Symbol) at ./sysimg.jl:13
 [2] top-level scope at none:0
 [3] include at ./boot.jl:317 [inlined]
 [4] include_relative(::Module, ::String) at ./loading.jl:1038
 [5] include at ./sysimg.jl:29 [inlined]
 [6] include(::String) at /home/xhu/.julia/packages/CuArrays/clDeS/src/CuArrays.jl:3
 [7] top-level scope at none:0
 [8] include at ./boot.jl:317 [inlined]
 [9] include_relative(::Module, ::String) at ./loading.jl:1038
 [10] _require(::Base.PkgId) at ./loading.jl:950
 [11] require(::Base.PkgId) at ./loading.jl:852
 [12] macro expansion at ./logging.jl:311 [inlined]
 [13] require(::Module, ::Symbol) at ./loading.jl:834
in expression starting at /home/xhu/.julia/packages/CuArrays/clDeS/src/gpuarray_interface.jl:3
in expression starting at /home/xhu/.julia/packages/CuArrays/clDeS/src/CuArrays.jl:38

```

Does this mean that GPUArrays are not imported?

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [October 10, 2018, 6:20am UTC](https://discourse.julialang.org/t/can-not-use-cuarray-on-julia-0-7/16089/2 "2018-10-10T06:20:14Z")

</div>

Package versions? CuArrays is working fine on 0.7: [https://gitlab.com/JuliaGPU/CuArrays.jl/pipelines/32486734](https://gitlab.com/JuliaGPU/CuArrays.jl/pipelines/32486734)

---

<div class="post-metadata">

**Author:** ![cuchxq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cuchxq/32/3830_2.png) [@cuchxq](https://discourse.julialang.org/u/cuchxq)\
**Post date:** [October 10, 2018, 3:32pm UTC](https://discourse.julialang.org/t/can-not-use-cuarray-on-julia-0-7/16089/3 "2018-10-10T15:32:05Z")

</div>

Through trail and error, I found out that I have 3 versions of GPUArrays, 2 in `~/.Julia/packages`, 1 in `~/.Julia/dev`. Once I removed all three and added the GPUArray packages again, which placed the package in `~/.Julia/dev`, and it worked fine. So, does this mean, right now it is best to use the dev version of GPUArray? And also a side question, what determines packages store location (that is, in `~/.Julia/packages` or `~/.Julia/dev`)?

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [October 10, 2018, 4:19pm UTC](https://discourse.julialang.org/t/can-not-use-cuarray-on-julia-0-7/16089/4 "2018-10-10T16:19:14Z")

</div>

> [@cuchxq](#):
>
> So, does this mean, right now it is best to use the dev version of GPUArray?

No. the tagged and released versions should work just fine. You should only need to `dev` packages if you want to contribute to them. If you need the master branch, e.g. because a bugfix, it’s better to `add MyPackage#master`.

> [@cuchxq](#):
>
> what determines packages store location (that is, in `~/.Julia/packages` or `~/.Julia/dev`

Whether you `add` or `dev`. The exact location is controlled by environment variables (`JULIA_DEPOT_PATH` and `JULIA_PKG_DEVDIR`).
