# GPU

**URL:** https://discourse.julialang.org/c/domain/gpu/11.md?page=7

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 8

---

## [Fresh CUDA and LuxCUDA error ERROR: could not load symbol "cublasLtMatmulDescCreate":](https://discourse.julialang.org/t/fresh-cuda-and-luxcuda-error-error-could-not-load-symbol-cublasltmatmuldesccreate/114401)

<div class="topic-metadata">

**Author:** [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Replies:** 14\
**Last updated:** [May 31, 2024, 4:41pm UTC](https://discourse.julialang.org/t/fresh-cuda-and-luxcuda-error-error-could-not-load-symbol-cublasltmatmuldesccreate/114401 "2024-05-31T16:41:22Z")

</div>

From Lux polynomial fitting tutorial I get during the training step ERROR: could not load symbol "cublasLtMatmulDescCreate": The specified procedure could not be found. I did the Cuda.test() and got errors core/nvml …

---

## [Activating environment triggers error in CUDA](https://discourse.julialang.org/t/activating-environment-triggers-error-in-cuda/114710)

<div class="topic-metadata">

**Author:** [@lance\_xwq](https://discourse.julialang.org/u/lance_xwq)\
**Replies:** 5\
**Last updated:** [May 28, 2024, 1:09am UTC](https://discourse.julialang.org/t/activating-environment-triggers-error-in-cuda/114710 "2024-05-28T01:09:02Z")

</div>

Hi all, I ran into a strange issue today; it seems that activating an environment of mine would trigger an ArgumentError: Pass LowerSIMDLoop error in CUDA. The full error message is at the end of this post. This env…

---

## [Why is this CUDA interpolation kernel scaling poorly?](https://discourse.julialang.org/t/why-is-this-cuda-interpolation-kernel-scaling-poorly/114008)

<div class="topic-metadata">

**Author:** [@leestrobel](https://discourse.julialang.org/u/leestrobel)\
**Replies:** 1\
**Last updated:** [May 8, 2024, 8:10pm UTC](https://discourse.julialang.org/t/why-is-this-cuda-interpolation-kernel-scaling-poorly/114008 "2024-05-08T20:10:10Z")

</div>

I’m quite new to CUDA programming with Julia. I have been trying to write a CUDA kernel for doing a simple 1D interpolation on a uniform logarithmic grid - here is the function: function CUDA\_interpolate!(out,ydata,E) …

---

## [Scalar indexing GPU problem in Flux.jl model](https://discourse.julialang.org/t/scalar-indexing-gpu-problem-in-flux-jl-model/113974)

<div class="topic-metadata">

**Author:** [@mward19](https://discourse.julialang.org/u/mward19)\
**Replies:** 4\
**Last updated:** [May 8, 2024, 3:35pm UTC](https://discourse.julialang.org/t/scalar-indexing-gpu-problem-in-flux-jl-model/113974 "2024-05-08T15:35:22Z")

</div>

I am trying to use the GPU to accelerate training on a CNN. It’s my first time doing this. I keep getting an exception saying that “Scalar indexing is disallowed”, and I can’t understand why after reading what I could fi…

---

## [Unable to use local CUDA runtime toolkit](https://discourse.julialang.org/t/unable-to-use-local-cuda-runtime-toolkit/113980)

<div class="topic-metadata">

**Author:** [@mtyogi](https://discourse.julialang.org/u/mtyogi)\
**Replies:** 2\
**Last updated:** [May 8, 2024, 7:59am UTC](https://discourse.julialang.org/t/unable-to-use-local-cuda-runtime-toolkit/113980 "2024-05-08T07:59:44Z")

</div>

Hi All, I am trying use local CUDA runtime (12.4) toolkit, but I get the following error. └ @ CUDA\_Runtime\_Discovery C:\\Users\\mohitt\\.julia\\packages\\CUDA\_Runtime\_Discovery\\ZGnCZ\\src\\CUDA\_Runtime\_Discovery.jl:139 ┌ Deb…

---

## [Adding at specific CuArray position](https://discourse.julialang.org/t/adding-at-specific-cuarray-position/113855)

<div class="topic-metadata">

**Author:** [@Andrea\_Deflorio](https://discourse.julialang.org/u/Andrea_Deflorio)\
**Replies:** 6\
**Last updated:** [May 6, 2024, 1:58pm UTC](https://discourse.julialang.org/t/adding-at-specific-cuarray-position/113855 "2024-05-06T13:58:25Z")

</div>

How to fix this function? Also how to fix the line #@atomic counts\[indices\[idx\]\] += 1, it doesn’t compile at all. function count\_indices(indices::CuArray{Int64,1}, maxSize::Int64) # Initialize a CuArray of zeros wi…

---

## [How to sort a GPU StructArray vector by a subfield and update location of other elements in place?](https://discourse.julialang.org/t/how-to-sort-a-gpu-structarray-vector-by-a-subfield-and-update-location-of-other-elements-in-place/113617)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 0\
**Last updated:** [April 29, 2024, 4:18pm UTC](https://discourse.julialang.org/t/how-to-sort-a-gpu-structarray-vector-by-a-subfield-and-update-location-of-other-elements-in-place/113617 "2024-04-29T16:18:26Z")

</div>

Hi! I have the following code: using Random using StaticArrays using StructArrays using CUDA # Function to generate a simplified SimParticles with random values function generate\_simplified\_particles(num\_particles::Int…

---

## [Can we accelerate functions from other packages using juliaGPU package?](https://discourse.julialang.org/t/can-we-accelerate-functions-from-other-packages-using-juliagpu-package/113587)

<div class="topic-metadata">

**Author:** [@tjk](https://discourse.julialang.org/u/tjk)\
**Replies:** 2\
**Last updated:** [April 29, 2024, 11:03am UTC](https://discourse.julialang.org/t/can-we-accelerate-functions-from-other-packages-using-juliagpu-package/113587 "2024-04-29T11:03:15Z")

</div>

Hello, I want to accelerate functions imported from other julia packages. In the past, I always use using Distributed addprocs(Num) To accelerate computation, and what I need to do is just write the functions and exec…

---

## [Help using CUDA to exponentiate Matrix](https://discourse.julialang.org/t/help-using-cuda-to-exponentiate-matrix/113548)

<div class="topic-metadata">

**Author:** [@ShaswataRoy](https://discourse.julialang.org/u/ShaswataRoy)\
**Replies:** 3\
**Last updated:** [April 27, 2024, 2:46pm UTC](https://discourse.julialang.org/t/help-using-cuda-to-exponentiate-matrix/113548 "2024-04-27T14:46:14Z")

</div>

I am trying to use CUDA to speed up the process of finding the exponential of a matrix. For some reason, all the steps are fast except the code written inside a loop using LinearAlgebra using SparseArrays using CUDA us…

---

## [Any qualifier in CUDA.jl like \`\_\_device\_\_\` in CUDA/C++?](https://discourse.julialang.org/t/any-qualifier-in-cuda-jl-like-device-in-cuda-c/113517)

<div class="topic-metadata">

**Author:** [@huiyuxie](https://discourse.julialang.org/u/huiyuxie)\
**Replies:** 6\
**Last updated:** [April 26, 2024, 4:20pm UTC](https://discourse.julialang.org/t/any-qualifier-in-cuda-jl-like-device-in-cuda-c/113517 "2024-04-26T16:20:51Z")

</div>

Hi all! I was wondering is there any qualifier in CUDA.jl like \_\_device\_\_ in CUDA/C++ to calling a function from device to make sure the function call is not falling back to CPU. For example, using CUDA function gpu\_a…

---

## [Multiple GPUs with CuStateVec in CUDA.jl](https://discourse.julialang.org/t/multiple-gpus-with-custatevec-in-cuda-jl/113499)

<div class="topic-metadata">

**Author:** [@tipfom](https://discourse.julialang.org/u/tipfom)\
**Replies:** 1\
**Last updated:** [April 25, 2024, 1:33pm UTC](https://discourse.julialang.org/t/multiple-gpus-with-custatevec-in-cuda-jl/113499 "2024-04-25T13:33:39Z")

</div>

Hello, I’m trying to use multiple GPUs for computations involving CuStateVec from the CUDA.jl implementation, specifically the function swapIndexBitsMultiDevice!. However, this function always throws the error Argume…

---

## [Edited video of the course “GPU Programming with Julia - 2nd edition” at the Swiss National Supercomputing Centre (CSCS) now available!](https://discourse.julialang.org/t/edited-video-of-the-course-gpu-programming-with-julia-2nd-edition-at-the-swiss-national-supercomputing-centre-cscs-now-available/113392)

<div class="topic-metadata">

**Author:** [@samo](https://discourse.julialang.org/u/samo)\
**Replies:** 2\
**Last updated:** [April 23, 2024, 3:35pm UTC](https://discourse.julialang.org/t/edited-video-of-the-course-gpu-programming-with-julia-2nd-edition-at-the-swiss-national-supercomputing-centre-cscs-now-available/113392 "2024-04-23T15:35:14Z")

</div>

Get the Jupyter notebooks discussed in the course, the edited recording and any other relevant information from here: GitHub - omlins/julia-gpu-course-2023: GPU Programming with Julia 2023 - course at the Swiss Nation…

---

## [Using CUDA hangs with P100 GPU](https://discourse.julialang.org/t/using-cuda-hangs-with-p100-gpu/113337)

<div class="topic-metadata">

**Author:** [@Donald](https://discourse.julialang.org/u/Donald)\
**Replies:** 2\
**Last updated:** [April 23, 2024, 9:53am UTC](https://discourse.julialang.org/t/using-cuda-hangs-with-p100-gpu/113337 "2024-04-23T09:53:01Z")

</div>

Hello. I’m trying to install CUDA.jl inside an interactive session on a cluster node with an NVIDIA Tesla P100 GPU. The output of nvidia-smi is +--------------------------------------------------------------------------…

---

## [Adjoint/transpose wrapper question](https://discourse.julialang.org/t/adjoint-transpose-wrapper-question/113128)

<div class="topic-metadata">

**Author:** [@jamesr137](https://discourse.julialang.org/u/jamesr137)\
**Replies:** 18\
**Last updated:** [April 21, 2024, 4:42pm UTC](https://discourse.julialang.org/t/adjoint-transpose-wrapper-question/113128 "2024-04-21T16:42:15Z")

</div>

Hi everyone. This is my first time posting on this site. Let me start off by saying that I am not a professional software developer (at least, not yet). I am more or less just a tinkerer or hobbyist atm, both in terms of…

---

## [Why is it consuming and not freeing GPU memory?](https://discourse.julialang.org/t/why-is-it-consuming-and-not-freeing-gpu-memory/113087)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 5\
**Last updated:** [April 18, 2024, 3:55pm UTC](https://discourse.julialang.org/t/why-is-it-consuming-and-not-freeing-gpu-memory/113087 "2024-04-18T15:55:25Z")

</div>

Hi, I’m running into something I do not understand. My simple CUDA code is taking memory all the time and not freeing it. A simple example: julia\> using CUDA julia\> CUDA.memory\_status() Effective GPU memory usage: 4.…

---

## [Batched LU solves (or Factorizations) with Sparse Matrices](https://discourse.julialang.org/t/batched-lu-solves-or-factorizations-with-sparse-matrices/106019)

<div class="topic-metadata">

**Author:** [@schev](https://discourse.julialang.org/u/schev)\
**Replies:** 6\
**Last updated:** [April 15, 2024, 5:37am UTC](https://discourse.julialang.org/t/batched-lu-solves-or-factorizations-with-sparse-matrices/106019 "2024-04-15T05:37:51Z")

</div>

Let’s say I have a sparse set of matrices A1, A2, ... An, each of type CuSparseMatrixCSC{Float32, Int32} along with associated RHS vectors b1, b2, ... bn. Is there some watch to do a batch LU solve on the GPU with CUDA.j…

---

## [Updating CUDA seems to have completely broken the package](https://discourse.julialang.org/t/updating-cuda-seems-to-have-completely-broken-the-package/110101)

<div class="topic-metadata">

**Author:** [@Hareruya](https://discourse.julialang.org/u/Hareruya)\
**Replies:** 3\
**Last updated:** [April 14, 2024, 11:36pm UTC](https://discourse.julialang.org/t/updating-cuda-seems-to-have-completely-broken-the-package/110101 "2024-04-14T23:36:36Z")

</div>

Salutations, I am currently a PhD student and defended my thesis last month. Most of my Master’s research and all of my PhD research were developed using julia. I decided to update julia and run my old code at which poi…

---

## [Newbie question regarding GPU with metal.jl](https://discourse.julialang.org/t/newbie-question-regarding-gpu-with-metal-jl/112850)

<div class="topic-metadata">

**Author:** [@cloner0110](https://discourse.julialang.org/u/cloner0110)\
**Replies:** 0\
**Last updated:** [April 11, 2024, 10:39pm UTC](https://discourse.julialang.org/t/newbie-question-regarding-gpu-with-metal-jl/112850 "2024-04-11T22:39:14Z")

</div>

Hi Everyone, Im a bit new to julia and GPU programming, Im about to solve a system of equation using metal.jl on a GPU and see the performance, as a starting point, does any of you have any suggestions? Cheers,

---

## [GPU Genetic Algorithm](https://discourse.julialang.org/t/gpu-genetic-algorithm/112700)

<div class="topic-metadata">

**Author:** [@fender9723](https://discourse.julialang.org/u/fender9723)\
**Replies:** 12\
**Last updated:** [April 9, 2024, 10:07am UTC](https://discourse.julialang.org/t/gpu-genetic-algorithm/112700 "2024-04-09T10:07:33Z")

</div>

Hello everyone! I’m fairly new to Julia and am attempting to enhance the performance of my code. I have a straightforward optimization problem involving finding the maximum of a function. The variables in my problem ar…

---

## [Math support for GPU kernels](https://discourse.julialang.org/t/math-support-for-gpu-kernels/112381)

<div class="topic-metadata">

**Author:** [@fwinter](https://discourse.julialang.org/u/fwinter)\
**Replies:** 3\
**Last updated:** [April 1, 2024, 8:15pm UTC](https://discourse.julialang.org/t/math-support-for-gpu-kernels/112381 "2024-04-01T20:15:52Z")

</div>

I was hoping you could provide some insight into the process of incorporating support for mathematical functions (such as sin, cos, sqrt, etc.) in GPU kernels. Within the ROCm installation, there exists a file located a…

---

## [NeuralPDE issue trying to use LuxAMDGPU](https://discourse.julialang.org/t/neuralpde-issue-trying-to-use-luxamdgpu/111567)

<div class="topic-metadata">

**Author:** [@mre](https://discourse.julialang.org/u/mre)\
**Replies:** 15\
**Last updated:** [March 28, 2024, 10:40pm UTC](https://discourse.julialang.org/t/neuralpde-issue-trying-to-use-luxamdgpu/111567 "2024-03-28T22:40:17Z")

</div>

Hi everyone, as a Julia newbie, I tried to solve a simple bvp with NeuralPDE and GPUs. Using LuxCUDA on nvidia hardware, everything was fine. After switching to LuxAMDGPU (and AMD hardware) the code did not work any…

---

## [Cuda.versioninfo() error "NVML could not be initialized"](https://discourse.julialang.org/t/cuda-versioninfo-error-nvml-could-not-be-initialized/112123)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [March 28, 2024, 10:48am UTC](https://discourse.julialang.org/t/cuda-versioninfo-error-nvml-could-not-be-initialized/112123 "2024-03-28T10:48:45Z")

</div>

When I type CUDA.versioninfo() on a Ubuntu 22.04 box I got the following error: julia\> CUDA.versioninfo() CUDA runtime 12.3, artifact installation CUDA driver 12.3 ┌ Error: Cannot use NVML, as it failed to initialize │ …

---

## [Why CUDA is so slow on y = x\*w + w0?](https://discourse.julialang.org/t/why-cuda-is-so-slow-on-y-x-w-w0/112144)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 1\
**Last updated:** [March 28, 2024, 10:43am UTC](https://discourse.julialang.org/t/why-cuda-is-so-slow-on-y-x-w-w0/112144 "2024-03-28T10:43:14Z")

</div>

Hi, I am doing my first steps on GPU programming, using the Array interface on CUDA. Wondering why CUDA is so slower than CPU on matrix multiplication: julia\> using CUDA, BenchmarkTools julia\> a = 100; julia\> b = 30; …

---

## [Error in testset base/aqua, test failed at \\CUDA\\htRwP\\test\\base\\aqua.jl](https://discourse.julialang.org/t/error-in-testset-base-aqua-test-failed-at-cuda-htrwp-test-base-aqua-jl/111994)

<div class="topic-metadata">

**Author:** [@NikoBiele](https://discourse.julialang.org/u/NikoBiele)\
**Replies:** 2\
**Last updated:** [March 25, 2024, 7:36pm UTC](https://discourse.julialang.org/t/error-in-testset-base-aqua-test-failed-at-cuda-htrwp-test-base-aqua-jl/111994 "2024-03-25T19:36:39Z")

</div>

Hi all, First of all I appreciate all of the work that has been and is being put into making GPU programming possible in Julia. :slight\_smile: I am new to GPU programming, and I basically just installed CUDA.jl and tri…

---

## [KernelAbstractions for splines](https://discourse.julialang.org/t/kernelabstractions-for-splines/104312)

<div class="topic-metadata">

**Author:** [@weymouth](https://discourse.julialang.org/u/weymouth)\
**Replies:** 6\
**Last updated:** [March 22, 2024, 2:58pm UTC](https://discourse.julialang.org/t/kernelabstractions-for-splines/104312 "2024-03-22T14:58:48Z")

</div>

I’m trying to code a simple b-spline (and then NURBS) on the GPU using kernels to speed up a ton of simultaneous evaluations. I’m having trouble because Cox-deBoor is recursive and throws an error when I try to use this…

---

## [Add specific elements of a CUDA matrix](https://discourse.julialang.org/t/add-specific-elements-of-a-cuda-matrix/111909)

<div class="topic-metadata">

**Author:** [@NonDairyNeutrino](https://discourse.julialang.org/u/NonDairyNeutrino)\
**Replies:** 1\
**Last updated:** [March 21, 2024, 2:48pm UTC](https://discourse.julialang.org/t/add-specific-elements-of-a-cuda-matrix/111909 "2024-03-21T14:48:48Z")

</div>

Question I have an N \\times N matrix A on the GPU (e.g. CuArray{Float32, 2, CUDA.Mem.DeviceBuffer} from CUDA.jl), and two N-element “index vectors” iVector and jVector also on the GPU. I want to add the elements of A lo…

---

## [CUDNNError: CUDNN\_STATUS\_NOT\_SUPPORTED (code 9) with Transformers.jl](https://discourse.julialang.org/t/cudnnerror-cudnn-status-not-supported-code-9-with-transformers-jl/103453)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 5\
**Last updated:** [March 19, 2024, 6:27am UTC](https://discourse.julialang.org/t/cudnnerror-cudnn-status-not-supported-code-9-with-transformers-jl/103453 "2024-03-19T06:27:26Z")

</div>

Hi, I am optimizing prompt for llama2 model with Transformers.jl and I occasionally see this error. CUDNNError: CUDNN\_STATUS\_NOT\_SUPPORTED (code 9) Stacktrace: \[1\] throw\_api\_error @ ~/.julia/packages/cuDNN/YkZhm/…

---

## [How to sort an array based on another on GPU (CUDA) efficiently?](https://discourse.julialang.org/t/how-to-sort-an-array-based-on-another-on-gpu-cuda-efficiently/111693)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 3\
**Last updated:** [March 17, 2024, 7:44pm UTC](https://discourse.julialang.org/t/how-to-sort-an-array-based-on-another-on-gpu-cuda-efficiently/111693 "2024-03-17T19:44:49Z")

</div>

Hello! I have the following toy-example below: using CUDA using BenchmarkTools function reorder\_vectors!(sorted\_indices, vec1, vec2, vec3) CUDA.sortperm!(sorted\_indices, vec1) vec1 .= vec1\[sorted\_indices\] …

---

## [@cuda max\_registers not registered as a key word argument?](https://discourse.julialang.org/t/cuda-max-registers-not-registered-as-a-key-word-argument/111695)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 2\
**Last updated:** [March 17, 2024, 7:24pm UTC](https://discourse.julialang.org/t/cuda-max-registers-not-registered-as-a-key-word-argument/111695 "2024-03-17T19:24:47Z")

</div>

ERROR: LoadError: ArgumentError: Unsupported keyword argument 'max\_registers' And I am applying it as shown in the documentation: @cuda max\_registers=32 Kind regards

---

## [How to vectorize any function on the GPU with CUDA.jl?](https://discourse.julialang.org/t/how-to-vectorize-any-function-on-the-gpu-with-cuda-jl/111490)

<div class="topic-metadata">

**Author:** [@RYB](https://discourse.julialang.org/u/RYB)\
**Replies:** 3\
**Last updated:** [March 14, 2024, 7:01pm UTC](https://discourse.julialang.org/t/how-to-vectorize-any-function-on-the-gpu-with-cuda-jl/111490 "2024-03-14T19:01:38Z")

</div>

Hello, I just started programming with CUDA.jl and would like to understand how to vectorize an operation in a GPU Kernel. In particular, given some function func(), is there a way to vectorize this function to apply el…

[Previous page](https://discourse.julialang.org/c/domain/gpu/11.md?page=6)

[Next page](https://discourse.julialang.org/c/domain/gpu/11.md?page=8)
