# GPU

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

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

**Page:** 20

---

## [Julia 1.7 & CUDA on Windows 11](https://discourse.julialang.org/t/julia-1-7-cuda-on-windows-11/72488)

<div class="topic-metadata">

**Author:** [@00shiv](https://discourse.julialang.org/u/00shiv)\
**Replies:** 6\
**Last updated:** [December 6, 2021, 6:56pm UTC](https://discourse.julialang.org/t/julia-1-7-cuda-on-windows-11/72488 "2021-12-06T18:56:57Z")

</div>

I am not able to get CUDA installed on Julia 1.7 on Windows 11 (not even with WSL). The errors seem to be the same in both cases as it is not able to install LLVM properly. The error seems to be “could not load symbol “L…

---

## [CUDA.@atomic causes type instability?](https://discourse.julialang.org/t/cuda-atomic-causes-type-instability/72224)

<div class="topic-metadata">

**Author:** [@guyvdb](https://discourse.julialang.org/u/guyvdb)\
**Replies:** 5\
**Last updated:** [November 29, 2021, 6:27pm UTC](https://discourse.julialang.org/t/cuda-atomic-causes-type-instability/72224 "2021-11-29T18:27:31Z")

</div>

I am not sure why adding CUDA.@atomic in the below code causes an error? # works fine without CUDA.@atomic function f(test) broadcast(CuVector(1:2), transpose(CuVector(1:3))) do i,j v::Float32 = j te…

---

## [Isbits union support in CUDA.jl](https://discourse.julialang.org/t/isbits-union-support-in-cuda-jl/72219)

<div class="topic-metadata">

**Author:** [@guyvdb](https://discourse.julialang.org/u/guyvdb)\
**Replies:** 2\
**Last updated:** [November 29, 2021, 5:18pm UTC](https://discourse.julialang.org/t/isbits-union-support-in-cuda-jl/72219 "2021-11-29T17:18:40Z")

</div>

I’m confused about the support that CUDA.jl has for isbits unions: # Unions of two work fine: map(x-\>1, CuVector(\[1,missing\])); map(x-\>1, CuVector(\[1,nothing\])); # It is possible to move unions of three to the GPU memo…

---

## [CuDynamicSharedArray error](https://discourse.julialang.org/t/cudynamicsharedarray-error/72063)

<div class="topic-metadata">

**Author:** [@Jakub\_Mitura](https://discourse.julialang.org/u/Jakub_Mitura)\
**Replies:** 2\
**Last updated:** [November 25, 2021, 1:58pm UTC](https://discourse.julialang.org/t/cudynamicsharedarray-error/72063 "2021-11-25T13:58:53Z")

</div>

Hello I am running extremely simple kernel as shown below and get and error pointing to CuDynamicSharedArray using CUDA ff = CUDA.zeros(3) function gggg(ff) shmemblockDataa = @cuDynamicSharedMem(Float32,(1,2)) r…

---

## [Triton: GPU Programming for Neural Networks](https://discourse.julialang.org/t/triton-gpu-programming-for-neural-networks/72033)

<div class="topic-metadata">

**Author:** [@stemann](https://discourse.julialang.org/u/stemann)\
**Replies:** 2\
**Last updated:** [November 25, 2021, 9:06am UTC](https://discourse.julialang.org/t/triton-gpu-programming-for-neural-networks/72033 "2021-11-25T09:06:42Z")

</div>

Any thoughts on OpenAI’s Triton? @maleadt ?

---

## [Illegal memory access problem CUDA](https://discourse.julialang.org/t/illegal-memory-access-problem-cuda/71836)

<div class="topic-metadata">

**Author:** [@Jakub\_Mitura](https://discourse.julialang.org/u/Jakub_Mitura)\
**Replies:** 8\
**Last updated:** [November 24, 2021, 7:22am UTC](https://discourse.julialang.org/t/illegal-memory-access-problem-cuda/71836 "2021-11-24T07:22:11Z")

</div>

I am creating some dynamic shared memory boolean arrays in kernel, and it give me consistently ERROR: LoadError: CUDA error: an illegal memory access was encountered (code 700, ERROR\_ILLEGAL\_ADDRESS) Stacktrace: \[1\] t…

---

## [ParallelStencil for Vector Fields](https://discourse.julialang.org/t/parallelstencil-for-vector-fields/70997)

<div class="topic-metadata">

**Author:** [@gerhardu](https://discourse.julialang.org/u/gerhardu)\
**Replies:** 5\
**Last updated:** [November 23, 2021, 6:04pm UTC](https://discourse.julialang.org/t/parallelstencil-for-vector-fields/70997 "2021-11-23T18:04:11Z")

</div>

Hello, I am trying to use ParallelStencil to solve a diffeq on a lattice, where at each lattice site I have an Array (StaticArray) instead of a float. E.g A vector field on a 3D domain. But @init\_parallel\_stencil works…

---

## [CUDA eigenvalues of a sparse matrix](https://discourse.julialang.org/t/cuda-eigenvalues-of-a-sparse-matrix/46851)

<div class="topic-metadata">

**Author:** [@8me](https://discourse.julialang.org/u/8me)\
**Replies:** 8\
**Last updated:** [November 17, 2021, 1:51pm UTC](https://discourse.julialang.org/t/cuda-eigenvalues-of-a-sparse-matrix/46851 "2021-11-17T13:51:20Z")

</div>

I’m trying to optimize the eigenvalue (and eigenvector) calculation for a neutrino oscillation package which is currently under development (https://github.com/KM3NeT/Neurthino.jl). The problem consists of a lot of smal…

---

## [oneAPI error when running basic example on Intel internal GPU](https://discourse.julialang.org/t/oneapi-error-when-running-basic-example-on-intel-internal-gpu/71452)

<div class="topic-metadata">

**Author:** [@b1d](https://discourse.julialang.org/u/b1d)\
**Replies:** 2\
**Last updated:** [November 14, 2021, 12:20pm UTC](https://discourse.julialang.org/t/oneapi-error-when-running-basic-example-on-intel-internal-gpu/71452 "2021-11-14T12:20:02Z")

</div>

Hi there, I just installed oneAPI just as an experiment. I’m afraid I was not able to run all the examples and searching for a solution was not solving the issue. So I kindly ask for a hint to get this running, or just …

---

## [CuArray only supports element types that are stored inline?](https://discourse.julialang.org/t/cuarray-only-supports-element-types-that-are-stored-inline/71339)

<div class="topic-metadata">

**Author:** [@Ludovic\_Dumoulin](https://discourse.julialang.org/u/Ludovic_Dumoulin)\
**Replies:** 1\
**Last updated:** [November 11, 2021, 5:23pm UTC](https://discourse.julialang.org/t/cuarray-only-supports-element-types-that-are-stored-inline/71339 "2021-11-11T17:23:19Z")

</div>

Hello, I would like to define, a mutable structure with a field of type ::CuArray{an\_other\_mutable\_structure} but I get this error: CuArray only supports element types that are stored inline I don’t understand what i…

---

## [Problem with CUDAv3](https://discourse.julialang.org/t/problem-with-cudav3/71118)

<div class="topic-metadata">

**Author:** [@shiroghost](https://discourse.julialang.org/u/shiroghost)\
**Replies:** 9\
**Last updated:** [November 8, 2021, 1:19pm UTC](https://discourse.julialang.org/t/problem-with-cudav3/71118 "2021-11-08T13:19:30Z")

</div>

I have been using CUDAv2.4 and everything has worked perfect. But after upgrading, I have found that many kernels fail to compile. Even a simple kernel: function krnl\_foo!(ac,bc) b = threadIdx().x …

---

## [Can I use opensource drivers to code in Cuda?](https://discourse.julialang.org/t/can-i-use-opensource-drivers-to-code-in-cuda/70682)

<div class="topic-metadata">

**Author:** [@anon69491625](https://discourse.julialang.org/u/anon69491625)\
**Replies:** 3\
**Last updated:** [November 2, 2021, 9:57pm UTC](https://discourse.julialang.org/t/can-i-use-opensource-drivers-to-code-in-cuda/70682 "2021-11-02T21:57:57Z")

</div>

Hi all can I use xserver-xorg-video-nouveau v 1:1.0.16.1 display drivers to code in Cuda and NOT the official nvidia 470? I have had a bit of bad news. I am using linux mint 20.2 ( based on Ubuntu) and am using open so…

---

## [Correct version of cuda.jl for Quadro K4200](https://discourse.julialang.org/t/correct-version-of-cuda-jl-for-quadro-k4200/70744)

<div class="topic-metadata">

**Author:** [@jamaas](https://discourse.julialang.org/u/jamaas)\
**Replies:** 5\
**Last updated:** [November 2, 2021, 4:52pm UTC](https://discourse.julialang.org/t/correct-version-of-cuda-jl-for-quadro-k4200/70744 "2021-11-02T16:52:22Z")

</div>

I’d like to learn how to use gpu computing with my pc, runs on ubuntu linux and has a Quadro K4200 gpu which only has a compute capability of 3.0. What version of cuda.jl should I be trying to install that will work wi…

---

## [Starting to program for Cuda do I have to load the drivers](https://discourse.julialang.org/t/starting-to-program-for-cuda-do-i-have-to-load-the-drivers/70676)

<div class="topic-metadata">

**Author:** [@anon69491625](https://discourse.julialang.org/u/anon69491625)\
**Replies:** 3\
**Last updated:** [November 1, 2021, 10:59pm UTC](https://discourse.julialang.org/t/starting-to-program-for-cuda-do-i-have-to-load-the-drivers/70676 "2021-11-01T22:59:39Z")

</div>

Hi there new to julia and cuda. Have loaded Linux Mint 20.2 and using the OPENSOURCE drivers for a Nvidia k5000 board. Graphics: Device-1: NVIDIA GK104GL \[Quadro K5000\] vendor: Hewlett-Packard driver: nouveau v: kern…

---

## [Error when mapping a CuVector{UnitRange} to index another gpu Array](https://discourse.julialang.org/t/error-when-mapping-a-cuvector-unitrange-to-index-another-gpu-array/70451)

<div class="topic-metadata">

**Author:** [@ogoid](https://discourse.julialang.org/u/ogoid)\
**Replies:** 8\
**Last updated:** [October 28, 2021, 9:27pm UTC](https://discourse.julialang.org/t/error-when-mapping-a-cuvector-unitrange-to-index-another-gpu-array/70451 "2021-10-28T21:27:46Z")

</div>

I’m running into an error while trying to use a CuVector{UnitRange} as an index to map another CuArray. I’m not sure if it’s a bug or not. I think I can explain it better with this example: using CUDA CUDA.allowscalar(…

---

## [FFT is too fast compared to assignment in CUDA](https://discourse.julialang.org/t/fft-is-too-fast-compared-to-assignment-in-cuda/70353)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 3\
**Last updated:** [October 28, 2021, 8:23pm UTC](https://discourse.julialang.org/t/fft-is-too-fast-compared-to-assignment-in-cuda/70353 "2021-10-28T20:23:29Z")

</div>

FFT is a pretty fast algorithm, but its performance on CUDA seems even comparable to simple element-wise assignment. I am wondering if this is something expected. Here is the contents of a performance test code named t…

---

## [Unrolling of loops with operations on CuArrays](https://discourse.julialang.org/t/unrolling-of-loops-with-operations-on-cuarrays/70468)

<div class="topic-metadata">

**Author:** [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Replies:** 4\
**Last updated:** [October 27, 2021, 5:10pm UTC](https://discourse.julialang.org/t/unrolling-of-loops-with-operations-on-cuarrays/70468 "2021-10-27T17:10:42Z")

</div>

I have a loop where at each iteration I do some vectorial operation over CuArray. For example using CUDA N = 4 a = ones(N) u = CUDA.zeros(1000) @. u = a\[1\] for i=2:N @. u += a\[i\] end As far as I understand, in t…

---

## [Scalar Indexing Error: multiplying matrix by scalar](https://discourse.julialang.org/t/scalar-indexing-error-multiplying-matrix-by-scalar/70342)

<div class="topic-metadata">

**Author:** [@naubertc](https://discourse.julialang.org/u/naubertc)\
**Replies:** 2\
**Last updated:** [October 25, 2021, 4:25pm UTC](https://discourse.julialang.org/t/scalar-indexing-error-multiplying-matrix-by-scalar/70342 "2021-10-25T16:25:10Z")

</div>

Hey all, I’ve been trying to use Flux on my GPU and am running into a scalar indexing error when trying to multiply a matrix by a scalar. I found a workaround by creating a function that multiplies two items and then br…

---

## [Broadcasting using slices on the GPU](https://discourse.julialang.org/t/broadcasting-using-slices-on-the-gpu/70290)

<div class="topic-metadata">

**Author:** [@fedario](https://discourse.julialang.org/u/fedario)\
**Replies:** 1\
**Last updated:** [October 25, 2021, 10:08am UTC](https://discourse.julialang.org/t/broadcasting-using-slices-on-the-gpu/70290 "2021-10-25T10:08:39Z")

</div>

Hi! I’m trying to broadcast a two argument function over slices on the second argument like so: # using CUDA # todevice = cu todevice = identity x = rand(5) |\> todevice a = rand(2, 5) |\> todevice function kernel(x, a…

---

## [Error when importing CUDAnative (or just about anything with CUDA)](https://discourse.julialang.org/t/error-when-importing-cudanative-or-just-about-anything-with-cuda/70198)

<div class="topic-metadata">

**Author:** [@Niceno](https://discourse.julialang.org/u/Niceno)\
**Replies:** 2\
**Last updated:** [October 22, 2021, 8:55am UTC](https://discourse.julialang.org/t/error-when-importing-cudanative-or-just-about-anything-with-cuda/70198 "2021-10-22T08:55:06Z")

</div>

Dear all, When I try to import CUDAnative into Julia 1.6.3, I get the following error: julia\> import Pkg; Pkg.add("CUDAnative") Resolving package versions... ERROR: Unsatisfiable requirements detected for package CU…

---

## [What is \`Base.allocatedinline\` and custom types for \`CuArray\` (\`CUDA.jl\`) involving \`Missing\`](https://discourse.julialang.org/t/what-is-base-allocatedinline-and-custom-types-for-cuarray-cuda-jl-involving-missing/70122)

<div class="topic-metadata">

**Author:** [@PaulVirally](https://discourse.julialang.org/u/PaulVirally)\
**Replies:** 3\
**Last updated:** [October 22, 2021, 8:24am UTC](https://discourse.julialang.org/t/what-is-base-allocatedinline-and-custom-types-for-cuarray-cuda-jl-involving-missing/70122 "2021-10-22T08:24:01Z")

</div>

I am trying to pass an array of a custom type to the GPU using CUDA.jl. Here is a MWE: using CUDA struct MyStruct arr::Vector{Tuple{Int, Int}} end cpu\_arr = Vector{Union{Missing, MyStruct}} # Works as expected gpu…

---

## [Arrays of arrays and arrays of structures in CUDA kernels cause random errors](https://discourse.julialang.org/t/arrays-of-arrays-and-arrays-of-structures-in-cuda-kernels-cause-random-errors/69739)

<div class="topic-metadata">

**Author:** [@fedoroff](https://discourse.julialang.org/u/fedoroff)\
**Replies:** 21\
**Last updated:** [October 21, 2021, 2:21pm UTC](https://discourse.julialang.org/t/arrays-of-arrays-and-arrays-of-structures-in-cuda-kernels-cause-random-errors/69739 "2021-10-21T14:21:01Z")

</div>

Hello, I want to pass an array of structures to CUDA kernel. Each structure contains an array of CuArrays. Most of the time my code works well, but sometimes randomly I see errors of the following type: ERROR: Out-of-…

---

## [Juliacon21-gpu\_workshop kernel abstractions heat diffusion](https://discourse.julialang.org/t/juliacon21-gpu-workshop-kernel-abstractions-heat-diffusion/70048)

<div class="topic-metadata">

**Author:** [@Ludovic\_Dumoulin](https://discourse.julialang.org/u/Ludovic_Dumoulin)\
**Replies:** 2\
**Last updated:** [October 20, 2021, 8:24am UTC](https://discourse.julialang.org/t/juliacon21-gpu-workshop-kernel-abstractions-heat-diffusion/70048 "2021-10-20T08:24:43Z")

</div>

Hi, I am trying to reproduce the Juliacon21-gpu workshop and I am stuck at the last part of kernel abstractions. I wrote: @kernel function diffuse\_kabs\_lmem!(out, @Const(data), a, dt, dx, dy) i, j = @index(Global,…

---

## [Broadcasting a function on GPU](https://discourse.julialang.org/t/broadcasting-a-function-on-gpu/69694)

<div class="topic-metadata">

**Author:** [@lodygaw](https://discourse.julialang.org/u/lodygaw)\
**Replies:** 3\
**Last updated:** [October 14, 2021, 1:51pm UTC](https://discourse.julialang.org/t/broadcasting-a-function-on-gpu/69694 "2021-10-14T13:51:36Z")

</div>

Hi, I am looking for some advice on finding the most efficient way to parallelize my code on GPU. Let’s assume the simplified situation: struct MyOtherStruct1 end struct MyOtherStruct2 end struct MyStructType1 end str…

---

## [Is there a way to serialize a CURAND RNG?](https://discourse.julialang.org/t/is-there-a-way-to-serialize-a-curand-rng/34493)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 2\
**Last updated:** [October 11, 2021, 9:15pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-serialize-a-curand-rng/34493 "2021-10-11T21:15:16Z")

</div>

With Base, I can take the RNG returned by Random.default\_rng(), write it to file with eg JLD2, then later reload it and reproduce my random number sequence from that point. Is something like this possible with CURAND? I…

---

## [GPU Error in Julia 1.6 but not in Julia 1.5](https://discourse.julialang.org/t/gpu-error-in-julia-1-6-but-not-in-julia-1-5/69440)

<div class="topic-metadata">

**Author:** [@PGJulia](https://discourse.julialang.org/u/PGJulia)\
**Replies:** 3\
**Last updated:** [October 8, 2021, 8:53pm UTC](https://discourse.julialang.org/t/gpu-error-in-julia-1-6-but-not-in-julia-1-5/69440 "2021-10-08T20:53:34Z")

</div>

Hi, The following kernel works in Julia 1.5.3 but not in Julia 1.6.3. I believe it is related to CUDA.exp but I tried directly with exp() w/o success. function vr(Nb,Ny,α,β,τ,Vr,V0,Y,B,Price0,P) ib = (blockIdx().x-1)\*…

---

## [Out-of-bounds error when calling map!](https://discourse.julialang.org/t/out-of-bounds-error-when-calling-map/69053)

<div class="topic-metadata">

**Author:** [@JAgho](https://discourse.julialang.org/u/JAgho)\
**Replies:** 17\
**Last updated:** [October 6, 2021, 1:49pm UTC](https://discourse.julialang.org/t/out-of-bounds-error-when-calling-map/69053 "2021-10-06T13:49:46Z")

</div>

I’m using CUDA.jl to carry out some diffusion simulations. It’s a pretty standard setup, but makes fairly heavy use of rem and mod to bin particles to cells in a grid. To this end, we call map! on a pair of F32 CuArrays,…

---

## [Batched multiplication with CuSparseMatrix isn't working](https://discourse.julialang.org/t/batched-multiplication-with-cusparsematrix-isnt-working/69210)

<div class="topic-metadata">

**Author:** [@Michael\_Birk](https://discourse.julialang.org/u/Michael_Birk)\
**Replies:** 6\
**Last updated:** [October 5, 2021, 3:35pm UTC](https://discourse.julialang.org/t/batched-multiplication-with-cusparsematrix-isnt-working/69210 "2021-10-05T15:35:39Z")

</div>

Applying batched\_mul from NNlib/NNlibCUDA to a CuArray tensor and a CuSparseMatrix matrix falls back to the generic method and performs scalar indexing. Is there a GPU-efficient way to broadcast multiplication of a CuSpa…

---

## [Too many resources requested for launch](https://discourse.julialang.org/t/too-many-resources-requested-for-launch/69100)

<div class="topic-metadata">

**Author:** [@Jakub\_Mitura](https://discourse.julialang.org/u/Jakub_Mitura)\
**Replies:** 1\
**Last updated:** [October 4, 2021, 5:51am UTC](https://discourse.julialang.org/t/too-many-resources-requested-for-launch/69100 "2021-10-04T05:51:07Z")

</div>

I get “too many resources requested for launch” in CUDA.jl kernel when I try to either set value to the array set in global memory like mainWorkQueue\[1,1\]=1 OR print anything using CUDA.@cuprint “aa” I suspect …

---

## [Multiple texture interpolations at the same time](https://discourse.julialang.org/t/multiple-texture-interpolations-at-the-same-time/69037)

<div class="topic-metadata">

**Author:** [@lodygaw](https://discourse.julialang.org/u/lodygaw)\
**Replies:** 1\
**Last updated:** [October 1, 2021, 12:07pm UTC](https://discourse.julialang.org/t/multiple-texture-interpolations-at-the-same-time/69037 "2021-10-01T12:07:29Z")

</div>

Hello, I am begginer to Julia and CUDA.jl so please forgive me if the answer to the question is obvious. I couldn’t find the solution by myself. I would like to perform texture interpolation (similar to this) but I hav…

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

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