# GPU

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

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

**Page:** 5

---

## [AMDGPU.versioninfo() trips an assertion in AMD's code](https://discourse.julialang.org/t/amdgpu-versioninfo-trips-an-assertion-in-amds-code/125203)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [January 26, 2025, 8:51am UTC](https://discourse.julialang.org/t/amdgpu-versioninfo-trips-an-assertion-in-amds-code/125203 "2025-01-26T08:51:27Z")

</div>

System and Julia info, ./julia-1.10.8/bin/julia -g2 -e 'using InteractiveUtils; versioninfo()': Julia Version 1.10.8 Commit 4c16ff44be8 (2025-01-22 10:06 UTC) Build Info: Official https://julialang.org/ release Platfo…

---

## [Unexpected coalesced group behaviour in CUDA.jl](https://discourse.julialang.org/t/unexpected-coalesced-group-behaviour-in-cuda-jl/125109)

<div class="topic-metadata">

**Author:** [@eldee](https://discourse.julialang.org/u/eldee)\
**Replies:** 3\
**Last updated:** [January 25, 2025, 8:07am UTC](https://discourse.julialang.org/t/unexpected-coalesced-group-behaviour-in-cuda-jl/125109 "2025-01-25T08:07:31Z")

</div>

Hi, When experimenting a bit with cooperative groups and in particular coalesced groups, I’ve encountered some strange behaviour which I cannot explain. As a simple example, consider using CUDA using CUDA: i32 functio…

---

## [MLX and Apple silicon](https://discourse.julialang.org/t/mlx-and-apple-silicon/125136)

<div class="topic-metadata">

**Author:** [@Hareruya](https://discourse.julialang.org/u/Hareruya)\
**Replies:** 4\
**Last updated:** [January 24, 2025, 2:44am UTC](https://discourse.julialang.org/t/mlx-and-apple-silicon/125136 "2025-01-24T02:44:02Z")

</div>

Good evening. I have recently bought an M4 MacbookPro Max and have been using it to do some programming in my free time, messing around with image processing on the side. The machine is very powerful and energy efficien…

---

## [Calculating statistics of SubArray of CuArray](https://discourse.julialang.org/t/calculating-statistics-of-subarray-of-cuarray/124874)

<div class="topic-metadata">

**Author:** [@chrissm23](https://discourse.julialang.org/u/chrissm23)\
**Replies:** 2\
**Last updated:** [January 17, 2025, 2:13pm UTC](https://discourse.julialang.org/t/calculating-statistics-of-subarray-of-cuarray/124874 "2025-01-17T14:13:14Z")

</div>

Hello everyone! I am working with CuArrays of complex numbers. After some previous processing, I would like to calculate the variance of only the real part of the array along the first dimension. In order to avoid copyi…

---

## [AMDGPU error on Fedora 40](https://discourse.julialang.org/t/amdgpu-error-on-fedora-40/124779)

<div class="topic-metadata">

**Author:** [@billmclean](https://discourse.julialang.org/u/billmclean)\
**Replies:** 3\
**Last updated:** [January 17, 2025, 11:31am UTC](https://discourse.julialang.org/t/amdgpu-error-on-fedora-40/124779 "2025-01-17T11:31:05Z")

</div>

When I run using AMDGPU I get the error message : CommandLine Error: Option 'disassemble' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options \[10292\] signal (6.-6): Aborted in express…

---

## [Using ODE solvers for accelerator physics project](https://discourse.julialang.org/t/using-ode-solvers-for-accelerator-physics-project/124853)

<div class="topic-metadata">

**Author:** [@Oleksii](https://discourse.julialang.org/u/Oleksii)\
**Replies:** 1\
**Last updated:** [January 17, 2025, 9:27am UTC](https://discourse.julialang.org/t/using-ode-solvers-for-accelerator-physics-project/124853 "2025-01-17T09:27:58Z")

</div>

Hi! I would like to incorporate DiffentialEquations for our Accelerator Physicists particle tracking code. The set up is the following: ensembles of particles are moving through the sequence of magnets each having a len…

---

## [cudaMemcpyAsync: where is it used?](https://discourse.julialang.org/t/cudamemcpyasync-where-is-it-used/117967)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 17\
**Last updated:** [January 14, 2025, 6:21pm UTC](https://discourse.julialang.org/t/cudamemcpyasync-where-is-it-used/117967 "2025-01-14T18:21:17Z")

</div>

I have a code written with CUDA.jl and I am trying to improve its performance. Upon CUDA.@profile, I learned that more than 60% of the host-side activity was spent on cudaMemcpyAsync: julia\> CUDA.@profile myfun(...) ..…

---

## [Clarifying expected behavior of dynamic CUDA kernels](https://discourse.julialang.org/t/clarifying-expected-behavior-of-dynamic-cuda-kernels/124689)

<div class="topic-metadata">

**Author:** [@NonDairyNeutrino](https://discourse.julialang.org/u/NonDairyNeutrino)\
**Replies:** 4\
**Last updated:** [January 12, 2025, 8:33pm UTC](https://discourse.julialang.org/t/clarifying-expected-behavior-of-dynamic-cuda-kernels/124689 "2025-01-12T20:33:18Z")

</div>

Dynamic Parallelism I’ve just learned about Dynamic Parallelism that is …useful for recursive algorithms, or for algorithms that otherwise need to dynamically spawn new work. So consider the following example: using…

---

## ["Quality of life" functions for CUDA.jl or GPUArrays.jl](https://discourse.julialang.org/t/quality-of-life-functions-for-cuda-jl-or-gpuarrays-jl/124220)

<div class="topic-metadata">

**Author:** [@anprasad](https://discourse.julialang.org/u/anprasad)\
**Replies:** 1\
**Last updated:** [January 5, 2025, 8:35am UTC](https://discourse.julialang.org/t/quality-of-life-functions-for-cuda-jl-or-gpuarrays-jl/124220 "2025-01-05T08:35:26Z")

</div>

First off, I want to thank the maintainers of JuliaGPU for the unbelievable work they’re doing. Even for someone like me who’s just beginning to write basic GPU kernels, it’s been easier and more illuminating to do so in…

---

## [Cumulative sum on GPUArray using KernelAbstractions](https://discourse.julialang.org/t/cumulative-sum-on-gpuarray-using-kernelabstractions/124098)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 4\
**Last updated:** [December 24, 2024, 3:16pm UTC](https://discourse.julialang.org/t/cumulative-sum-on-gpuarray-using-kernelabstractions/124098 "2024-12-24T15:16:37Z")

</div>

Hello, I need to implement the cumulative sum (cumsum) on a GPU array (CUDA.jl or Metal.jl). Looking at the CUDA.jl repository, I found this definition function cumsum!(sums) shift = 1 while shift \< length(sum…

---

## [KrylovKit eigsolve of LinearMap giving different values in CPU and GPU](https://discourse.julialang.org/t/krylovkit-eigsolve-of-linearmap-giving-different-values-in-cpu-and-gpu/124032)

<div class="topic-metadata">

**Author:** [@victor\_vhrn](https://discourse.julialang.org/u/victor_vhrn)\
**Replies:** 7\
**Last updated:** [December 23, 2024, 9:31pm UTC](https://discourse.julialang.org/t/krylovkit-eigsolve-of-linearmap-giving-different-values-in-cpu-and-gpu/124032 "2024-12-23T21:31:07Z")

</div>

I am trying to compare the eigsolve function using CPU and GPU, using the following code: using CUDA using CUDA.CUSPARSE using LinearAlgebra using LinearMaps using SparseArrays using Random using KrylovKit function eig…

---

## [CUDA.jl is slowed down after some number of iterations](https://discourse.julialang.org/t/cuda-jl-is-slowed-down-after-some-number-of-iterations/123911)

<div class="topic-metadata">

**Author:** [@Alex90](https://discourse.julialang.org/u/Alex90)\
**Replies:** 9\
**Last updated:** [December 22, 2024, 8:27am UTC](https://discourse.julialang.org/t/cuda-jl-is-slowed-down-after-some-number-of-iterations/123911 "2024-12-22T08:27:59Z")

</div>

Hello! When looping simple math operations it was found that CUDA.jl is slowed down after some number of iterations. In this case, most of the execution time is consumed by CuLaunchKernel procedure. I thought that a cus…

---

## [Unreasonable memory usage with M4 GPU](https://discourse.julialang.org/t/unreasonable-memory-usage-with-m4-gpu/123890)

<div class="topic-metadata">

**Author:** [@Andrea\_Pagnani](https://discourse.julialang.org/u/Andrea_Pagnani)\
**Replies:** 2\
**Last updated:** [December 21, 2024, 8:48am UTC](https://discourse.julialang.org/t/unreasonable-memory-usage-with-m4-gpu/123890 "2024-12-21T08:48:08Z")

</div>

Dearests, my fight to make a reasonable use of my M4 GPU continues. Metal.versioninfo()macOS 15.1.1, Darwin 24.1.0 Toolchain: Julia: 1.11.2 LLVM: 16.0.6 Julia packages: Metal.jl: 1.4.2 GPUArrays: 10.3.1 GPUCompil…

---

## [Julia compiler v.s. Julia GPU compiler](https://discourse.julialang.org/t/julia-compiler-v-s-julia-gpu-compiler/123951)

<div class="topic-metadata">

**Author:** [@huiyuxie](https://discourse.julialang.org/u/huiyuxie)\
**Replies:** 4\
**Last updated:** [December 19, 2024, 1:29am UTC](https://discourse.julialang.org/t/julia-compiler-v-s-julia-gpu-compiler/123951 "2024-12-19T01:29:10Z")

</div>

I’m currently developing a package to provide CUDA.jl support for solving hyperbolic PDEs on GPUs. I recently completed some coarse timing tests on the core acceleration parts of the solvers using a script similar to thi…

---

## [GPU kernel does not scale properly with data](https://discourse.julialang.org/t/gpu-kernel-does-not-scale-properly-with-data/123863)

<div class="topic-metadata">

**Author:** [@Giorgos\_Vretinaris](https://discourse.julialang.org/u/Giorgos_Vretinaris)\
**Replies:** 10\
**Last updated:** [December 17, 2024, 8:40am UTC](https://discourse.julialang.org/t/gpu-kernel-does-not-scale-properly-with-data/123863 "2024-12-17T08:40:56Z")

</div>

Hello, I am trying to write a ODE solver on the GPU. I am solving the same simple ODE but for different initial data. I tried the EnsembleGPUArray option from DiffEqGPU.jl but it was quite slow. The kernel I wrote is re…

---

## [Can I move an array asynchronously from main program to CUDA?](https://discourse.julialang.org/t/can-i-move-an-array-asynchronously-from-main-program-to-cuda/119976)

<div class="topic-metadata">

**Author:** [@joaquimg](https://discourse.julialang.org/u/joaquimg)\
**Replies:** 7\
**Last updated:** [December 15, 2024, 8:37pm UTC](https://discourse.julialang.org/t/can-i-move-an-array-asynchronously-from-main-program-to-cuda/119976 "2024-12-15T20:37:49Z")

</div>

I have an application that would benefit from passing an array asynchronously from the main program to my CUDA GPU while I am doing other computations on my CPU. The GPU would only be working on receiving the array. Als…

---

## [Implement feature common to all \`AbstractGPUArrays\` through KernelAbstractions.jl](https://discourse.julialang.org/t/implement-feature-common-to-all-abstractgpuarrays-through-kernelabstractions-jl/123855)

<div class="topic-metadata">

**Author:** [@albertomercurio](https://discourse.julialang.org/u/albertomercurio)\
**Replies:** 2\
**Last updated:** [December 15, 2024, 2:20pm UTC](https://discourse.julialang.org/t/implement-feature-common-to-all-abstractgpuarrays-through-kernelabstractions-jl/123855 "2024-12-15T14:20:39Z")

</div>

Hello, Let’s imagine I have a very common function LinearAlgebra.kron(a::VT, b::VT) where VT\<:AbstractGPUArray which can support any AbstractGPUArray since I’m using KernelAbstractions.jl. Where should I implement suc…

---

## [Symmetric view of sparse matrix CUDA.jl](https://discourse.julialang.org/t/symmetric-view-of-sparse-matrix-cuda-jl/123811)

<div class="topic-metadata">

**Author:** [@victor\_vhrn](https://discourse.julialang.org/u/victor_vhrn)\
**Replies:** 0\
**Last updated:** [December 13, 2024, 1:32pm UTC](https://discourse.julialang.org/t/symmetric-view-of-sparse-matrix-cuda-jl/123811 "2024-12-13T13:32:46Z")

</div>

What is the best way of adapting Symmetric to the GPU? Can it be done? Should it be done? I currently have the following function Aadj which I would like to create a GPU version of: using CUDA using CUDA.CUSPARSE using…

---

## [Flux and Metal circular dependencies in 1.10.7](https://discourse.julialang.org/t/flux-and-metal-circular-dependencies-in-1-10-7/123698)

<div class="topic-metadata">

**Author:** [@Andrea\_Pagnani](https://discourse.julialang.org/u/Andrea_Pagnani)\
**Replies:** 2\
**Last updated:** [December 11, 2024, 11:25am UTC](https://discourse.julialang.org/t/flux-and-metal-circular-dependencies-in-1-10-7/123698 "2024-12-11T11:25:16Z")

</div>

Dearests, I was inspecting my new MacBook pro M4 GPU capabilities. I created a TestMetal package on a fresh new environment in 1.10.7. I added Metal and Flux but received warnings that a circular dependency was detected…

---

## [Shared Memory CPU/GPU programming in Julia (M4 / ROCm)](https://discourse.julialang.org/t/shared-memory-cpu-gpu-programming-in-julia-m4-rocm/123477)

<div class="topic-metadata">

**Author:** [@Perrin\_Meyer](https://discourse.julialang.org/u/Perrin_Meyer)\
**Replies:** 1\
**Last updated:** [December 5, 2024, 5:52am UTC](https://discourse.julialang.org/t/shared-memory-cpu-gpu-programming-in-julia-m4-rocm/123477 "2024-12-05T05:52:51Z")

</div>

I’ve noticed that my new M4 (which just arrived) uses a shared CPU / GPU memory (similar to the old Silicon Graphics boxes 25 years ago…). Also AMD seems to have something called ROCm Is there a Julia way to experiment …

---

## [Metal.jl weird behavior above 2^27](https://discourse.julialang.org/t/metal-jl-weird-behavior-above-2-27/123261)

<div class="topic-metadata">

**Author:** [@jvsaddic](https://discourse.julialang.org/u/jvsaddic)\
**Replies:** 1\
**Last updated:** [November 29, 2024, 6:53pm UTC](https://discourse.julialang.org/t/metal-jl-weird-behavior-above-2-27/123261 "2024-11-29T18:53:51Z")

</div>

Hi! I am new to GPU programming, and I have been experimenting with Metal.jl As practice, I wrote this little program to estimate pi using the Monte Carlo method. using Metal using Random throw\_dart(a) = (2\*a - 1)^2 d…

---

## [How to improve the performance of CUDA kernel function which loop on a large struct array](https://discourse.julialang.org/t/how-to-improve-the-performance-of-cuda-kernel-function-which-loop-on-a-large-struct-array/123139)

<div class="topic-metadata">

**Author:** [@liutao](https://discourse.julialang.org/u/liutao)\
**Replies:** 4\
**Last updated:** [November 28, 2024, 3:47pm UTC](https://discourse.julialang.org/t/how-to-improve-the-performance-of-cuda-kernel-function-which-loop-on-a-large-struct-array/123139 "2024-11-28T15:47:08Z")

</div>

Dear all, I have a problem about the performance of CUDA kernel function which loop on a large struct array. Loop on the struct array is neccesaary for me. The MWE is as follows: using CUDA using Adapt using BenchmarkT…

---

## [How to access field values in ParallelStencil.jl custom struct](https://discourse.julialang.org/t/how-to-access-field-values-in-parallelstencil-jl-custom-struct/123172)

<div class="topic-metadata">

**Author:** [@pchaubal](https://discourse.julialang.org/u/pchaubal)\
**Replies:** 2\
**Last updated:** [November 28, 2024, 2:04pm UTC](https://discourse.julialang.org/t/how-to-access-field-values-in-parallelstencil-jl-custom-struct/123172 "2024-11-28T14:04:25Z")

</div>

I am trying to use a custom struct with ParallelStencil.jl. I define the custom struct as @CellType Field2D fieldnames=(xx, yy, zz) Then I initialize it for 2 variables as F1 = @zeros( nx, ny, celltype=Field2D) F2 = …

---

## [How to accelerate GPU operation？](https://discourse.julialang.org/t/how-to-accelerate-gpu-operation/122506)

<div class="topic-metadata">

**Author:** [@zhenweilin](https://discourse.julialang.org/u/zhenweilin)\
**Replies:** 12\
**Last updated:** [November 18, 2024, 8:29pm UTC](https://discourse.julialang.org/t/how-to-accelerate-gpu-operation/122506 "2024-11-18T20:29:15Z")

</div>

Hello, everyone in the Julia community. I’m currently writing a project about GPU. I hope to perform certain operations on some parts of a vector. These operations can be parallelized, but when I did it on the CPU, I fou…

---

## [Parallel launch of CUDA kernels](https://discourse.julialang.org/t/parallel-launch-of-cuda-kernels/122529)

<div class="topic-metadata">

**Author:** [@hexaeder](https://discourse.julialang.org/u/hexaeder)\
**Replies:** 5\
**Last updated:** [November 13, 2024, 1:14pm UTC](https://discourse.julialang.org/t/parallel-launch-of-cuda-kernels/122529 "2024-11-13T13:14:28Z")

</div>

I have a system with some kernels which are repeatatly called in a loop. My kernels operate on the same input data but in know at launchtime which kernels are safe to spawn asynchronously and which aren’t. A MWE would lo…

---

## [CUDA.jl version compatible with CUDA driver 10.1](https://discourse.julialang.org/t/cuda-jl-version-compatible-with-cuda-driver-10-1/122444)

<div class="topic-metadata">

**Author:** [@photor](https://discourse.julialang.org/u/photor)\
**Replies:** 3\
**Last updated:** [November 11, 2024, 7:48am UTC](https://discourse.julialang.org/t/cuda-jl-version-compatible-with-cuda-driver-10-1/122444 "2024-11-11T07:48:25Z")

</div>

The CUDA driver on my new computer is restricted to version 10.1 due to some reason, which is incompatible with the newest CUDA.jl (requiring CUDA driver version \>= 10.2). Is an older version of CUDA.jl compatible? If so…

---

## [Error with versioninfo of CUDA.jl on nVidia Jetson](https://discourse.julialang.org/t/error-with-versioninfo-of-cuda-jl-on-nvidia-jetson/122287)

<div class="topic-metadata">

**Author:** [@CaG21](https://discourse.julialang.org/u/CaG21)\
**Replies:** 2\
**Last updated:** [November 6, 2024, 7:22am UTC](https://discourse.julialang.org/t/error-with-versioninfo-of-cuda-jl-on-nvidia-jetson/122287 "2024-11-06T07:22:54Z")

</div>

Hello everyone. I am having a problem using CUDA.jl on a Jetson Orin DevKit. Even though everything seems to work, I get an error when I call CUDA.versioninfo(). Specifically, I get CUDA runtime 12.6, local installati…

---

## [How to precompile CUDA kernel itself?](https://discourse.julialang.org/t/how-to-precompile-cuda-kernel-itself/121849)

<div class="topic-metadata">

**Author:** [@0samuraiE](https://discourse.julialang.org/u/0samuraiE)\
**Replies:** 8\
**Last updated:** [November 6, 2024, 3:20am UTC](https://discourse.julialang.org/t/how-to-precompile-cuda-kernel-itself/121849 "2024-11-06T03:20:04Z")

</div>

Hi all. I am having problems with the CUDA kernel booting slowly the first time. In my application it takes about 60 seconds to boot the first time in the worst case. So, we tried PrecompileTools, but did not find it v…

---

## [Kernel for building histogram on GPU](https://discourse.julialang.org/t/kernel-for-building-histogram-on-gpu/34191)

<div class="topic-metadata">

**Author:** [@jeremiedb](https://discourse.julialang.org/u/jeremiedb)\
**Replies:** 14\
**Last updated:** [November 4, 2024, 10:54pm UTC](https://discourse.julialang.org/t/kernel-for-building-histogram-on-gpu/34191 "2024-11-04T22:54:27Z")

</div>

I want to build histogram from large matrix of floats, for which a matrix of integers of the same size identify the bin in which each of those float must be allocated. It could also be seen as a groupby aggregation, but …

---

## [Usage of CUDA.Const](https://discourse.julialang.org/t/usage-of-cuda-const/122157)

<div class="topic-metadata">

**Author:** [@Marco\_Lombardi](https://discourse.julialang.org/u/Marco_Lombardi)\
**Replies:** 1\
**Last updated:** [November 4, 2024, 4:34pm UTC](https://discourse.julialang.org/t/usage-of-cuda-const/122157 "2024-11-04T16:34:13Z")

</div>

I am unsure how to use the CUDA.Const function to mark an array as constant during the execution of a CUDA kernel. From the few examples I saw, it looks like I just need to define a variable within the kernel that “shado…

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

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