# How to load \`CuArray\` depends on available devices?

**URL:** <https://discourse.julialang.org/t/how-to-load-cuarray-depends-on-available-devices/15851>\
**Category:** General Usage\
**Tags:** gpuarrays\
**Created:** [October 3, 2018, 10:37pm UTC](https://discourse.julialang.org/t/how-to-load-cuarray-depends-on-available-devices/15851 "2018-10-03T22:37:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roger-luo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/roger-luo/32/3399_2.png) [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Post date:** [October 3, 2018, 10:37pm UTC](https://discourse.julialang.org/t/how-to-load-cuarray-depends-on-available-devices/15851/1 "2018-10-03T22:37:29Z")

</div>

Say I have a package `ExamplePackage`, and it will use `CuArray` if we have a usable GPU device, but it will just use CPU if we don’t.

Then how do I add `CuArray` as my dependency with `Pkg3`?
