# Can't load CUDA.jl when I launch julia under Nsight compute

**URL:** <https://discourse.julialang.org/t/cant-load-cuda-jl-when-i-launch-julia-under-nsight-compute/97810>\
**Category:** Profiling\
**Tags:** gpu, cuda\
**Created:** [April 23, 2023, 9:07am UTC](https://discourse.julialang.org/t/cant-load-cuda-jl-when-i-launch-julia-under-nsight-compute/97810 "2023-04-23T09:07:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuwenchen95](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuwenchen95/32/38718_2.png) [@yuwenchen95](https://discourse.julialang.org/u/yuwenchen95)\
**Post date:** [April 23, 2023, 9:07am UTC](https://discourse.julialang.org/t/cant-load-cuda-jl-when-i-launch-julia-under-nsight-compute/97810/1 "2023-04-23T09:07:26Z")

</div>

When I launch julia with Nsight Compute 2023.1.1 as follows,

```julia
ncu --mode=launch julia

```

I get stalled when I try to load CUDA.jl at the command:

```julia
using CUDA

```

Anyone has the idea to solve it? Thanks in advance.

---

<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:** [April 23, 2023, 6:44pm UTC](https://discourse.julialang.org/t/cant-load-cuda-jl-when-i-launch-julia-under-nsight-compute/97810/2 "2023-04-23T18:44:42Z")

</div>

That’s exactly how NSight Compute works; upon the first API call you need to use the GUI to continue execution. See [Profiling · CUDA.jl](https://cuda.juliagpu.org/dev/development/profiling/#NVIDIA-Nsight-Compute) (it used to hang on the first operation, but now we initialize CUDA already during module init).

---

<div class="post-metadata">

**Author:** ![yuwenchen95](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuwenchen95/32/38718_2.png) [@yuwenchen95](https://discourse.julialang.org/u/yuwenchen95)\
**Post date:** [April 23, 2023, 10:18pm UTC](https://discourse.julialang.org/t/cant-load-cuda-jl-when-i-launch-julia-under-nsight-compute/97810/3 "2023-04-23T22:18:18Z")

</div>

Thanks a lot! I didn’t notice changing some default parameters in my pop-up.
