# GPU

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

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

**Page:** 25

---

## [Performance regression with GPUArrays subset sum](https://discourse.julialang.org/t/performance-regression-with-gpuarrays-subset-sum/50767)

<div class="topic-metadata">

**Author:** [@eaubanel](https://discourse.julialang.org/u/eaubanel)\
**Replies:** 9\
**Last updated:** [December 9, 2020, 7:20pm UTC](https://discourse.julialang.org/t/performance-regression-with-gpuarrays-subset-sum/50767 "2020-12-09T19:20:23Z")

</div>

I’ve been away from Julia for several months, and have been rerunning GPU code from this past summer on a new installation of Jula 1.5.3 and CUDA.jl (previously I used the separate CUDA packages). My subset sum program n…

---

## [Introduction to oneAPI.jl](https://discourse.julialang.org/t/introduction-to-oneapi-jl/51054)

<div class="topic-metadata">

**Author:** [@vchuravy](https://discourse.julialang.org/u/vchuravy)\
**Replies:** 2\
**Last updated:** [December 7, 2020, 6:10pm UTC](https://discourse.julialang.org/t/introduction-to-oneapi-jl/51054 "2020-12-07T18:10:48Z")

</div>

@maleadt is going to give a short introduction to his recent work on oneAPI.jl at the next virtual JuliaGPU user call. The next user call is at Mon, December 7, 17:00 – 18:00 UTC and the details on how to join can be fo…

---

## [What is a good way to get the n largest elements of a CuArray?](https://discourse.julialang.org/t/what-is-a-good-way-to-get-the-n-largest-elements-of-a-cuarray/51324)

<div class="topic-metadata">

**Author:** [@pjentsch0](https://discourse.julialang.org/u/pjentsch0)\
**Replies:** 1\
**Last updated:** [December 7, 2020, 7:26am UTC](https://discourse.julialang.org/t/what-is-a-good-way-to-get-the-n-largest-elements-of-a-cuarray/51324 "2020-12-07T07:26:11Z")

</div>

I noticed that partialsort! is not yet defined forCuArray, I don’t need the n largest in any particular order, either. Thank you!

---

## [CUDA.jl : Is the Surface Object available?](https://discourse.julialang.org/t/cuda-jl-is-the-surface-object-available/50796)

<div class="topic-metadata">

**Author:** [@kemu](https://discourse.julialang.org/u/kemu)\
**Replies:** 3\
**Last updated:** [November 26, 2020, 9:26am UTC](https://discourse.julialang.org/t/cuda-jl-is-the-surface-object-available/50796 "2020-11-26T09:26:53Z")

</div>

I’m investigating porting from python/pycuda to julia/CUDA.jl. Pycuda supports Texture / Surface Reference API, so we can read the data with interpolation through a texture reference, and write data through a surface re…

---

## [Eigenvalues for lots of small matrices, GPU batched vs CPU eigen](https://discourse.julialang.org/t/eigenvalues-for-lots-of-small-matrices-gpu-batched-vs-cpu-eigen/50792)

<div class="topic-metadata">

**Author:** [@arxiv](https://discourse.julialang.org/u/arxiv)\
**Replies:** 0\
**Last updated:** [November 26, 2020, 2:48am UTC](https://discourse.julialang.org/t/eigenvalues-for-lots-of-small-matrices-gpu-batched-vs-cpu-eigen/50792 "2020-11-26T02:48:31Z")

</div>

I need to diagonalize lots of small matrices of the same size, like 50000 matrices of size 50x50, and wonder if using GPU to diagonalize them in parallel will help. So I set up a small test: using LinearAlgebra using C…

---

## [Sort and collapse a vector with GPU](https://discourse.julialang.org/t/sort-and-collapse-a-vector-with-gpu/50685)

<div class="topic-metadata">

**Author:** [@Ward9250](https://discourse.julialang.org/u/Ward9250)\
**Replies:** 3\
**Last updated:** [November 26, 2020, 2:36am UTC](https://discourse.julialang.org/t/sort-and-collapse-a-vector-with-gpu/50685 "2020-11-26T02:36:08Z")

</div>

As my first attempt at something serious and practical I want to achieve with a GPU, I have a problem where I have an array of elements, each element is a tuple of (value, count\_of\_value). count\_of\_value is initially uni…

---

## [Pkg test CUDA on Windows 10, Julia 1.5.2](https://discourse.julialang.org/t/pkg-test-cuda-on-windows-10-julia-1-5-2/49209)

<div class="topic-metadata">

**Author:** [@arxiv](https://discourse.julialang.org/u/arxiv)\
**Replies:** 2\
**Last updated:** [November 25, 2020, 12:32pm UTC](https://discourse.julialang.org/t/pkg-test-cuda-on-windows-10-julia-1-5-2/49209 "2020-11-25T12:32:12Z")

</div>

I just added CUDA.jl and ran Pkg test, did not pass. Wonder what the issue is. Machine info: Windows 10, GeForce MX150 Julia version info: Julia Version 1.5.2 Commit 539f3ce943 (2020-09-23 23:17 UTC) Platform Info: …

---

## [oneAPI.jl @sync bug?](https://discourse.julialang.org/t/oneapi-jl-sync-bug/50696)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 3\
**Last updated:** [November 24, 2020, 4:38pm UTC](https://discourse.julialang.org/t/oneapi-jl-sync-bug/50696 "2020-11-24T16:38:48Z")

</div>

Hi, I am trying the oneAPI.jl package and I have an issue with timing: The following MWE gives me incredible speed-ups and I guess that oneAPI.@sync may not work properly… using oneAPI using BenchmarkTools n=2^25 on…

---

## [Strange CUDA\_ERROR\_OUT\_OF\_MEMORY when using CUDA on HPC](https://discourse.julialang.org/t/strange-cuda-error-out-of-memory-when-using-cuda-on-hpc/50428)

<div class="topic-metadata">

**Author:** [@UtkarshChemE](https://discourse.julialang.org/u/UtkarshChemE)\
**Replies:** 5\
**Last updated:** [November 23, 2020, 6:45am UTC](https://discourse.julialang.org/t/strange-cuda-error-out-of-memory-when-using-cuda-on-hpc/50428 "2020-11-23T06:45:13Z")

</div>

I am using CUDA.jl v2.3 on a HPC GPU cluster. There is a 50% chance that my job will receive an error of out of memory. Otherwise, the same script will run to completion. Any clue why this is happening. The error stack …

---

## [CUDA.sqrt will not found symbol "\_\_nv\_sqrt"](https://discourse.julialang.org/t/cuda-sqrt-will-not-found-symbol-nv-sqrt/50533)

<div class="topic-metadata">

**Author:** [@HaoxuanGuo](https://discourse.julialang.org/u/HaoxuanGuo)\
**Replies:** 1\
**Last updated:** [November 21, 2020, 4:15pm UTC](https://discourse.julialang.org/t/cuda-sqrt-will-not-found-symbol-nv-sqrt/50533 "2020-11-21T16:15:55Z")

</div>

I think this may be a bug and reported it. https://github.com/JuliaGPU/CUDA.jl/issues/559#issue-748013387 Now I wonder if this a artifact error because other math function like abs are not work too. But, what caused it…

---

## [How to generate a random number in CUDA kernel function](https://discourse.julialang.org/t/how-to-generate-a-random-number-in-cuda-kernel-function/50364)

<div class="topic-metadata">

**Author:** [@HaoxuanGuo](https://discourse.julialang.org/u/HaoxuanGuo)\
**Replies:** 4\
**Last updated:** [November 20, 2020, 1:11am UTC](https://discourse.julialang.org/t/how-to-generate-a-random-number-in-cuda-kernel-function/50364 "2020-11-20T01:11:56Z")

</div>

All the rand like function in CUDA.jl will get a CuArray. But memory allocation is not allowed in a kernel function. Thus, a CuArray can not be generated. So, are there any method to get a pure random number instead of a…

---

## [NVIDIA Tensor Cores not useful for double-precision simulations?](https://discourse.julialang.org/t/nvidia-tensor-cores-not-useful-for-double-precision-simulations/50245)

<div class="topic-metadata">

**Author:** [@Zhong\_Pan](https://discourse.julialang.org/u/Zhong_Pan)\
**Replies:** 12\
**Last updated:** [November 19, 2020, 10:47pm UTC](https://discourse.julialang.org/t/nvidia-tensor-cores-not-useful-for-double-precision-simulations/50245 "2020-11-19T22:47:28Z")

</div>

I am using CUDA.jl to speed up double-precision simulations with large matrix computations and FFT (e.g. Split Step Fourier Method). I heard about Tensor Cores on NVIDIA GPUs and have the following questions: Tensor …

---

## [Gpu\_rand inside @cuda](https://discourse.julialang.org/t/gpu-rand-inside-cuda/50322)

<div class="topic-metadata">

**Author:** [@dgatey](https://discourse.julialang.org/u/dgatey)\
**Replies:** 2\
**Last updated:** [November 18, 2020, 10:41am UTC](https://discourse.julialang.org/t/gpu-rand-inside-cuda/50322 "2020-11-18T10:41:14Z")

</div>

Hey Everyone, I’ve managed to use gpu\_rand via gpu\_call but was wondering if it is possible to use gpu\_rand via @cuda as I’m currently using a 2D block. The @cuda function call only accepts bit types so I’m struggling …

---

## [\`norm\` function error on CuDeviceArray](https://discourse.julialang.org/t/norm-function-error-on-cudevicearray/50273)

<div class="topic-metadata">

**Author:** [@HaoxuanGuo](https://discourse.julialang.org/u/HaoxuanGuo)\
**Replies:** 1\
**Last updated:** [November 17, 2020, 7:12am UTC](https://discourse.julialang.org/t/norm-function-error-on-cudevicearray/50273 "2020-11-17T07:12:21Z")

</div>

This code will get an error about norm function using CUDA using Adapt using LinearAlgebra struct TestType{T\<:AbstractArray} a::T b::T c::Float32 end Adapt.adapt\_structure(to, x::TestType) = TestType(adapt…

---

## [Are there any way to copy a Union Array to GPU with CUDA.jl?](https://discourse.julialang.org/t/are-there-any-way-to-copy-a-union-array-to-gpu-with-cuda-jl/50272)

<div class="topic-metadata">

**Author:** [@HaoxuanGuo](https://discourse.julialang.org/u/HaoxuanGuo)\
**Replies:** 1\
**Last updated:** [November 17, 2020, 7:13am UTC](https://discourse.julialang.org/t/are-there-any-way-to-copy-a-union-array-to-gpu-with-cuda-jl/50272 "2020-11-17T07:13:41Z")

</div>

Look at this example abstract type AbstractTest end struct ATest \<: AbstractTest end struct BTest \<: AbstractTest end struct CTest{T \<: AbstractTest} a::T end using CUDA CuArray(\[CTest(ATest()), CTest(BTest())\]) …

---

## [Are there any way to copy a Dict or a custom datatype which contains an Array to GPU by CUDA?](https://discourse.julialang.org/t/are-there-any-way-to-copy-a-dict-or-a-custom-datatype-which-contains-an-array-to-gpu-by-cuda/50217)

<div class="topic-metadata">

**Author:** [@HaoxuanGuo](https://discourse.julialang.org/u/HaoxuanGuo)\
**Replies:** 6\
**Last updated:** [November 17, 2020, 7:13am UTC](https://discourse.julialang.org/t/are-there-any-way-to-copy-a-dict-or-a-custom-datatype-which-contains-an-array-to-gpu-by-cuda/50217 "2020-11-17T07:13:01Z")

</div>

I want to use the LinearAlgebra library to simplify my programming. So, I warp some Arrays in an struct. But I find I can not copy it to GPU because it is a non-bitstype. Similarly, I want to look up some tables which i…

---

## [Increment elements of array by index](https://discourse.julialang.org/t/increment-elements-of-array-by-index/49694)

<div class="topic-metadata">

**Author:** [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Replies:** 10\
**Last updated:** [November 11, 2020, 9:51pm UTC](https://discourse.julialang.org/t/increment-elements-of-array-by-index/49694 "2020-11-11T21:51:52Z")

</div>

Given an array A, indices I and values v, I want to add elements of v to A at I. Something like this: A = zeros(4) I = \[1, 3\] v = \[1, 1\] # partial solution A\[I\] .+= v Now the hard part: Indices may repeat, e.g. I = …

---

## [CUDA v2 - performance regression on matrix multiplication](https://discourse.julialang.org/t/cuda-v2-performance-regression-on-matrix-multiplication/49763)

<div class="topic-metadata">

**Author:** [@jeremiedb](https://discourse.julialang.org/u/jeremiedb)\
**Replies:** 14\
**Last updated:** [November 10, 2020, 8:55pm UTC](https://discourse.julialang.org/t/cuda-v2-performance-regression-on-matrix-multiplication/49763 "2020-11-10T20:55:38Z")

</div>

Following upgrade of Flux from CUDA 1 to CUDA 2, operations running on CUDA appear to allocate more as well as being slightly slower. For example, on a LSTM, with CUDA 2.1 : 8.572 s (16390042 allocations: 3.92 GiB) CU…

---

## [JuliaGPU CI moving to Buildkite](https://discourse.julialang.org/t/juliagpu-ci-moving-to-buildkite/49925)

<div class="topic-metadata">

**Author:** [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Replies:** 0\
**Last updated:** [November 10, 2020, 5:03pm UTC](https://discourse.julialang.org/t/juliagpu-ci-moving-to-buildkite/49925 "2020-11-10T17:03:40Z")

</div>

Hi all, Because of GitLab limitations (no CI for external PRs, needs a repository mirror that can lose its sync, no real Julia support, only reuse of code through include, etc), Julia’s community GPU CI is moving to Bui…

---

## [CUDA/Flux installation error ubuntu 20, cuda toolkit 11, julia 1.5.2](https://discourse.julialang.org/t/cuda-flux-installation-error-ubuntu-20-cuda-toolkit-11-julia-1-5-2/49812)

<div class="topic-metadata">

**Author:** [@Neurovium](https://discourse.julialang.org/u/Neurovium)\
**Replies:** 4\
**Last updated:** [November 9, 2020, 1:54am UTC](https://discourse.julialang.org/t/cuda-flux-installation-error-ubuntu-20-cuda-toolkit-11-julia-1-5-2/49812 "2020-11-09T01:54:35Z")

</div>

Hi I have updated ubuntu t0 20.04, julia to 1.5.2 and cuda toolkit to 111, and I have trouble with both CUDA and Flux. They both get installed but do not pass test or compile. I removed one tried the other, changed the…

---

## [CUDA.jl with missing data?](https://discourse.julialang.org/t/cuda-jl-with-missing-data/49563)

<div class="topic-metadata">

**Author:** [@zlewko](https://discourse.julialang.org/u/zlewko)\
**Replies:** 4\
**Last updated:** [November 5, 2020, 2:06am UTC](https://discourse.julialang.org/t/cuda-jl-with-missing-data/49563 "2020-11-05T02:06:54Z")

</div>

I’m trying to work with a dataset with missing data using the CUDA.jl. I’d like to skip the missing data in some statistics (mean, covariance etc). Is there any general solution to this that performs well on a GPU? I…

---

## [@cuStaticSharedMem multidimensional indexing seems not to work](https://discourse.julialang.org/t/custaticsharedmem-multidimensional-indexing-seems-not-to-work/49262)

<div class="topic-metadata">

**Author:** [@R366Y](https://discourse.julialang.org/u/R366Y)\
**Replies:** 2\
**Last updated:** [October 30, 2020, 12:47pm UTC](https://discourse.julialang.org/t/custaticsharedmem-multidimensional-indexing-seems-not-to-work/49262 "2020-10-30T12:47:02Z")

</div>

Hi, I’m trying to run a simple kernel with shared static memory having dimension 2. The trouble starts when I try to assing a value to the shared static memory, the kernel fail to compile. module GPU\_SHARED\_BITMAP fun…

---

## [Modifying CuArray elements in-place with index arrays](https://discourse.julialang.org/t/modifying-cuarray-elements-in-place-with-index-arrays/49091)

<div class="topic-metadata">

**Author:** [@berquist](https://discourse.julialang.org/u/berquist)\
**Replies:** 4\
**Last updated:** [October 28, 2020, 8:23am UTC](https://discourse.julialang.org/t/modifying-cuarray-elements-in-place-with-index-arrays/49091 "2020-10-28T08:23:20Z")

</div>

I’m trying to implement the vectorized square root for complex CUDA arrays, and am starting from the commented-out implementation in https://github.com/JuliaLang/julia/blob/5d8225a1116685e449fcc08b207acdd0f5106409/base/c…

---

## [Animated plot and CUDA computations with Makie](https://discourse.julialang.org/t/animated-plot-and-cuda-computations-with-makie/48974)

<div class="topic-metadata">

**Author:** [@R366Y](https://discourse.julialang.org/u/R366Y)\
**Replies:** 2\
**Last updated:** [October 26, 2020, 8:20pm UTC](https://discourse.julialang.org/t/animated-plot-and-cuda-computations-with-makie/48974 "2020-10-26T20:20:39Z")

</div>

Hello everyone , I’m learning GPU programming with Julia and I want to generate a procedurally animated picture inside a window with CUDA , for instance I’m porting the GPU Ripple example from Chapter 5 “Cuda by example…

---

## [Is garbage collection bad for gpu programming?](https://discourse.julialang.org/t/is-garbage-collection-bad-for-gpu-programming/48942)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 15\
**Last updated:** [October 25, 2020, 11:34pm UTC](https://discourse.julialang.org/t/is-garbage-collection-bad-for-gpu-programming/48942 "2020-10-25T23:34:48Z")

</div>

I was hearing this podcast: and the Swift guy at a moment (about minute 56) said something like that no language would replace Python if one of the qualities of Python is not followed, concerning not having garbage co…

---

## [CUDA under julia 1.5.0](https://discourse.julialang.org/t/cuda-under-julia-1-5-0/44789)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 13\
**Last updated:** [October 24, 2020, 6:46am UTC](https://discourse.julialang.org/t/cuda-under-julia-1-5-0/44789 "2020-10-24T06:46:03Z")

</div>

Hi, this is ubuntu 20.04 fresh install, also Julia 1.5.0 add CUDA \[ Info: Resolving package identifier \`CUDA\` as a directory at \`~/CUDA\`. ERROR: Did not find a git repository at \`CUDA\` no CUDA whatsoever… what am I do…

---

## [Plotting images on GPU with ArrayFire](https://discourse.julialang.org/t/plotting-images-on-gpu-with-arrayfire/48676)

<div class="topic-metadata">

**Author:** [@libensvivit](https://discourse.julialang.org/u/libensvivit)\
**Replies:** 7\
**Last updated:** [October 21, 2020, 4:30am UTC](https://discourse.julialang.org/t/plotting-images-on-gpu-with-arrayfire/48676 "2020-10-21T04:30:09Z")

</div>

I’m combining lots of images into a single one and then add custom ticks and labels to the final image using Plots.jl library, then save it on the disk. However, we have millions of images to be processed, and it becomes…

---

## [CUDA Error in constant CuArray with conditional usage](https://discourse.julialang.org/t/cuda-error-in-constant-cuarray-with-conditional-usage/48581)

<div class="topic-metadata">

**Author:** [@ozmaden](https://discourse.julialang.org/u/ozmaden)\
**Replies:** 3\
**Last updated:** [October 19, 2020, 10:37pm UTC](https://discourse.julialang.org/t/cuda-error-in-constant-cuarray-with-conditional-usage/48581 "2020-10-19T22:37:12Z")

</div>

Hi everyone, I am confronted with an error concerning a constant CuArray. Any help would be greatly appreciated. Quick context: I’m one of the developers of the GNSSSignals package, adapting it to do signal processing …

---

## [A newbie can not use CUDA by follow official DOC!](https://discourse.julialang.org/t/a-newbie-can-not-use-cuda-by-follow-official-doc/36010)

<div class="topic-metadata">

**Author:** [@nuclear718](https://discourse.julialang.org/u/nuclear718)\
**Replies:** 33\
**Last updated:** [October 16, 2020, 3:52pm UTC](https://discourse.julialang.org/t/a-newbie-can-not-use-cuda-by-follow-official-doc/36010 "2020-10-16T15:52:13Z")

</div>

New PC, New Julia, New CUDA package and just totally follow ““https://juliagpu.gitlab.io/CUDA.jl/”” but it doesn’t work! using CUDAdrv, CUDAnative, CuArrays get a error: ┌ Info: CUDAnative.jl failed to initialize, GPU…

---

## [Compiling kernel resulted in invalid LLVM IR Reason: unsupported dynamic function invocation](https://discourse.julialang.org/t/compiling-kernel-resulted-in-invalid-llvm-ir-reason-unsupported-dynamic-function-invocation/48452)

<div class="topic-metadata">

**Author:** [@FelixBenning](https://discourse.julialang.org/u/FelixBenning)\
**Replies:** 11\
**Last updated:** [October 16, 2020, 2:58pm UTC](https://discourse.julialang.org/t/compiling-kernel-resulted-in-invalid-llvm-ir-reason-unsupported-dynamic-function-invocation/48452 "2020-10-16T14:58:03Z")

</div>

So I am trying to write an extreme value/ order statistics package for GPUs. The idea is, that getting the maximum of a large number of random variables multiple times in order to get a max distribution should lend itsel…

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

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