# GPU

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

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

**Page:** 27

---

## [ArrayFire and Flux](https://discourse.julialang.org/t/arrayfire-and-flux/42907)

<div class="topic-metadata">

**Author:** [@Ian\_Slagle](https://discourse.julialang.org/u/Ian_Slagle)\
**Replies:** 13\
**Last updated:** [July 13, 2020, 9:19pm UTC](https://discourse.julialang.org/t/arrayfire-and-flux/42907 "2020-07-13T21:19:21Z")

</div>

In part because of having an AMD GPU, the only package I can get to work with it is ArrayFire.jl. ArrayFire v3.7.0 (OpenCL, 64-bit Linux, build a4485443) \[0\] AMD: Ellesmere, 7999 MB -1- INTEL: AMD Ryzen 7 2700X Eight-Co…

---

## [Simple kernel not working](https://discourse.julialang.org/t/simple-kernel-not-working/42831)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 10\
**Last updated:** [July 12, 2020, 12:20pm UTC](https://discourse.julialang.org/t/simple-kernel-not-working/42831 "2020-07-12T12:20:14Z")

</div>

Hi again guys :slight\_smile: this time I’m facing one problem that makes me think that I’m missing something very important in CUDA programming, so maybe somebody can help me out to understand what goes on. Consider thi…

---

## [Performing vector operations on a specific range of a CuArray](https://discourse.julialang.org/t/performing-vector-operations-on-a-specific-range-of-a-cuarray/39706)

<div class="topic-metadata">

**Author:** [@ozmaden](https://discourse.julialang.org/u/ozmaden)\
**Replies:** 2\
**Last updated:** [July 7, 2020, 8:11pm UTC](https://discourse.julialang.org/t/performing-vector-operations-on-a-specific-range-of-a-cuarray/39706 "2020-07-07T20:11:48Z")

</div>

Hello everyone! I’m taking my first steps with Julia and programming GPUs, also this is my first post here. So please forgive me if the question is too banal or has been answered before :slight\_smile: I could not find an…

---

## [Get to know the seed for the next CUDA random number](https://discourse.julialang.org/t/get-to-know-the-seed-for-the-next-cuda-random-number/42363)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 3\
**Last updated:** [July 3, 2020, 2:19pm UTC](https://discourse.julialang.org/t/get-to-know-the-seed-for-the-next-cuda-random-number/42363 "2020-07-03T14:19:57Z")

</div>

Hi, I’m struggling to debug a code that does random sampling, and for that I use CUDA random numbers. In order to be able to reproduce the same numbers in a second run of the code, I set the random number generator usin…

---

## [Getindex without a warning?](https://discourse.julialang.org/t/getindex-without-a-warning/42382)

<div class="topic-metadata">

**Author:** [@sw72](https://discourse.julialang.org/u/sw72)\
**Replies:** 3\
**Last updated:** [July 2, 2020, 7:57pm UTC](https://discourse.julialang.org/t/getindex-without-a-warning/42382 "2020-07-02T19:57:25Z")

</div>

I need to extract a single value from a CuArray for some calculation. Is there a way to do it without getting the “scalar operations” warning?

---

## [CuArrays/CUDAnative PSA: Simplified package loading](https://discourse.julialang.org/t/cuarrays-cudanative-psa-simplified-package-loading/27897)

<div class="topic-metadata">

**Author:** [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Replies:** 17\
**Last updated:** [July 2, 2020, 2:20pm UTC](https://discourse.julialang.org/t/cuarrays-cudanative-psa-simplified-package-loading/27897 "2020-07-02T14:20:31Z")

</div>

Hi all, I’ve just tagged new versions of CuArrays/CUDAnative/… and among the usual slurry of features and bug fixes there’s a major change in how the packages are built and loaded. There used to be a Pkg.build step whic…

---

## [Help Debugging GPU Performance Issue](https://discourse.julialang.org/t/help-debugging-gpu-performance-issue/42274)

<div class="topic-metadata">

**Author:** [@bmit](https://discourse.julialang.org/u/bmit)\
**Replies:** 5\
**Last updated:** [July 1, 2020, 10:07am UTC](https://discourse.julialang.org/t/help-debugging-gpu-performance-issue/42274 "2020-07-01T10:07:43Z")

</div>

I’m having trouble debugging the following issue with CuArrays. I see very different performance using the findmax function when I call it from the REPL vs when I use it in my application. From the REPL I get the desired…

---

## [Statistics functions on GPU?](https://discourse.julialang.org/t/statistics-functions-on-gpu/42245)

<div class="topic-metadata">

**Author:** [@ogoid](https://discourse.julialang.org/u/ogoid)\
**Replies:** 1\
**Last updated:** [July 1, 2020, 8:12am UTC](https://discourse.julialang.org/t/statistics-functions-on-gpu/42245 "2020-07-01T08:12:43Z")

</div>

Are there available any GPU implementations of the Statistics functions (cor, cov etc.)? Many of the functions on the Statistics module throw the “scalar getindex is disallowed” warning/error. Eg: julia\> Statistics.cor(…

---

## [Can't load CuArrays](https://discourse.julialang.org/t/cant-load-cuarrays/31214)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 17\
**Last updated:** [June 22, 2020, 10:42am UTC](https://discourse.julialang.org/t/cant-load-cuarrays/31214 "2020-06-22T10:42:08Z")

</div>

Hi, this is ubuntu 18.04 (I think). I have installed julia and the sysop has installed CUDA, but I get using CuArrays \[ Info: CUDAdrv.jl failed to initialize, GPU functionality unavailable (set JULIA\_CUDA\_SILENT or JU…

---

## [CUDA.jl errors with basic functions](https://discourse.julialang.org/t/cuda-jl-errors-with-basic-functions/41605)

<div class="topic-metadata">

**Author:** [@sw72](https://discourse.julialang.org/u/sw72)\
**Replies:** 1\
**Last updated:** [June 18, 2020, 1:32pm UTC](https://discourse.julialang.org/t/cuda-jl-errors-with-basic-functions/41605 "2020-06-18T13:32:41Z")

</div>

I’m getting ERROR: MethodError: no method matching personality!(::LLVM.Function, ::Nothing) when attempting to multiply a CuArray by a scalar. Any ideas what could be wrong? Full error details below: julia\> using C…

---

## [CUDA device support](https://discourse.julialang.org/t/cuda-device-support/41161)

<div class="topic-metadata">

**Author:** [@martincornejo](https://discourse.julialang.org/u/martincornejo)\
**Replies:** 7\
**Last updated:** [June 11, 2020, 1:42pm UTC](https://discourse.julialang.org/t/cuda-device-support/41161 "2020-06-11T13:42:15Z")

</div>

I have an old Nvidia 610M GPU on my laptop. It is not a powerful GPU but I wanted to play around and learn a bit of GPU computing. Although the GPU supports CUDA (I have version 9.1.112), I seem to encounter some problem…

---

## [PTX JIT compilation failed with Flux and CUDAnative while using Flux](https://discourse.julialang.org/t/ptx-jit-compilation-failed-with-flux-and-cudanative-while-using-flux/41034)

<div class="topic-metadata">

**Author:** [@bafonso](https://discourse.julialang.org/u/bafonso)\
**Replies:** 3\
**Last updated:** [June 9, 2020, 2:37pm UTC](https://discourse.julialang.org/t/ptx-jit-compilation-failed-with-flux-and-cudanative-while-using-flux/41034 "2020-06-09T14:37:55Z")

</div>

This one is a bit weird, not sure it should be here or in Juno? Anyway, this code runs fine via reply from terminal but I get an error running this in Juno once it is using the GPU. The second part errors out. using Flu…

---

## [AMD support is understated?](https://discourse.julialang.org/t/amd-support-is-understated/40152)

<div class="topic-metadata">

**Author:** [@Matt\_Davis](https://discourse.julialang.org/u/Matt_Davis)\
**Replies:** 14\
**Last updated:** [June 4, 2020, 7:52pm UTC](https://discourse.julialang.org/t/amd-support-is-understated/40152 "2020-06-04T19:52:04Z")

</div>

I’ve seen a lot of posts being a little down on support for AMD gpus in Julia. There’s no doubt that the CUDA stack is more mature, but the OpenCL stack seems pretty good. Between OpenCL.jl, CLBlast.jl, and ArrayFire.jl,…

---

## [Accelerate solving many matrix problems](https://discourse.julialang.org/t/accelerate-solving-many-matrix-problems/40500)

<div class="topic-metadata">

**Author:** [@clinton](https://discourse.julialang.org/u/clinton)\
**Replies:** 8\
**Last updated:** [June 3, 2020, 7:17pm UTC](https://discourse.julialang.org/t/accelerate-solving-many-matrix-problems/40500 "2020-06-03T19:17:01Z")

</div>

Say I have a whole lot of independent small matrix problems (posed as regression problems below). Each individual problem is too small for effective CUDA deployment, yet I am wondering if there is an opportunity for subs…

---

## [Free GPU resources?](https://discourse.julialang.org/t/free-gpu-resources/40653)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 1\
**Last updated:** [June 3, 2020, 8:54am UTC](https://discourse.julialang.org/t/free-gpu-resources/40653 "2020-06-03T08:54:07Z")

</div>

Hi, I’m running the same Julia code using CuArrays etc in two machines, one at home and one at work. At home my code works well, this is a 16Gb RAM, Ubuntu 18.04 linux box with a Geoforce 1050Ti, 4Gb RAM. On the compute…

---

## [How to parallerize dual coordinet descent mehods on GPU using CUDA.jl?](https://discourse.julialang.org/t/how-to-parallerize-dual-coordinet-descent-mehods-on-gpu-using-cuda-jl/40344)

<div class="topic-metadata">

**Author:** [@msekino](https://discourse.julialang.org/u/msekino)\
**Replies:** 11\
**Last updated:** [June 1, 2020, 2:11pm UTC](https://discourse.julialang.org/t/how-to-parallerize-dual-coordinet-descent-mehods-on-gpu-using-cuda-jl/40344 "2020-06-01T14:11:43Z")

</div>

Now I want to parallerize something like the following dual coordinate descent method. I’m trying to use CUDA.jl, however I’m stuck for days… # X = (x\[1\], ..., x\[numvec\]) numvec = 500000 lenvec = 50000 xs = \[sprandn(le…

---

## [CUDAnative out of resources, but only when run from Atom/Juno?](https://discourse.julialang.org/t/cudanative-out-of-resources-but-only-when-run-from-atom-juno/40428)

<div class="topic-metadata">

**Author:** [@Alex\_Ellison](https://discourse.julialang.org/u/Alex_Ellison)\
**Replies:** 2\
**Last updated:** [May 29, 2020, 10:20pm UTC](https://discourse.julialang.org/t/cudanative-out-of-resources-but-only-when-run-from-atom-juno/40428 "2020-05-29T22:20:16Z")

</div>

Hey GPU Gang, I have a kernel I’m trying to execute with CUDAnative. I’ve tested it with Nvidia Visual Profiler and it uses 46 registers/thread, and I can achieve the theoretical max of 1024 threads/block when I run it …

---

## [Passing a wrapped array to a kernel](https://discourse.julialang.org/t/passing-a-wrapped-array-to-a-kernel/40254)

<div class="topic-metadata">

**Author:** [@emiwar](https://discourse.julialang.org/u/emiwar)\
**Replies:** 2\
**Last updated:** [May 27, 2020, 1:41pm UTC](https://discourse.julialang.org/t/passing-a-wrapped-array-to-a-kernel/40254 "2020-05-27T13:41:57Z")

</div>

Hi, I’m trying to pass an object with a wrapped CuArray to a kernel: import CUDA struct MyStruct arrayField::CUDA.CuArray{Float32, 1, Nothing} end function f!(obj::MyStruct) id = CUDA.threadIdx().x if id \<=…

---

## [Crashes and high utilization while training with Flux with GPU](https://discourse.julialang.org/t/crashes-and-high-utilization-while-training-with-flux-with-gpu/39626)

<div class="topic-metadata">

**Author:** [@PeterKeffer](https://discourse.julialang.org/u/PeterKeffer)\
**Replies:** 2\
**Last updated:** [May 17, 2020, 12:40pm UTC](https://discourse.julialang.org/t/crashes-and-high-utilization-while-training-with-flux-with-gpu/39626 "2020-05-17T12:40:27Z")

</div>

Hey there lovely Julia community! I’m quite new to Julia, but I’m so excited about all the awesome packages and the wonderful community. I’ve already used PyTorch a lot, also with GPU on several machines, and got it alw…

---

## [Atomic operations issue on StaticArrays with CUDAnative](https://discourse.julialang.org/t/atomic-operations-issue-on-staticarrays-with-cudanative/39576)

<div class="topic-metadata">

**Author:** [@jeremiedb](https://discourse.julialang.org/u/jeremiedb)\
**Replies:** 2\
**Last updated:** [May 17, 2020, 12:52am UTC](https://discourse.julialang.org/t/atomic-operations-issue-on-staticarrays-with-cudanative/39576 "2020-05-17T00:52:31Z")

</div>

Trying to perform a basic per element sum of two Vector of SVector works fine, but using the atomic\_add! resulted in an error. I’m aware that in this particlar case, an atomic operation isn’t needed, but it’s a MWE from …

---

## [Nvidia TF32 format](https://discourse.julialang.org/t/nvidia-tf32-format/39515)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 2\
**Last updated:** [May 16, 2020, 5:44pm UTC](https://discourse.julialang.org/t/nvidia-tf32-format/39515 "2020-05-16T17:44:21Z")

</div>

I guess we have all see they hype avbout the A100. Is this going to be useful for Julia GPU?

---

## [Tiled matrix multiplication](https://discourse.julialang.org/t/tiled-matrix-multiplication/38431)

<div class="topic-metadata">

**Author:** [@Matt\_Davis](https://discourse.julialang.org/u/Matt_Davis)\
**Replies:** 4\
**Last updated:** [May 14, 2020, 3:30am UTC](https://discourse.julialang.org/t/tiled-matrix-multiplication/38431 "2020-05-14T03:30:58Z")

</div>

Hello, I would like to accelerate multiplication of matrices that are larger than can fit in VRAM, but can fit in normal RAM. I would like to eventually extend this to general tensor contractions as well, but for now I …

---

## [InteractiveUtils is not aware of CuDevice type](https://discourse.julialang.org/t/interactiveutils-is-not-aware-of-cudevice-type/39358)

<div class="topic-metadata">

**Author:** [@bocc](https://discourse.julialang.org/u/bocc)\
**Replies:** 2\
**Last updated:** [May 13, 2020, 7:11pm UTC](https://discourse.julialang.org/t/interactiveutils-is-not-aware-of-cudevice-type/39358 "2020-05-13T19:11:20Z")

</div>

Hello there, it seems that the info methods provided by InteractiveUtils do not work with the CuDevice type. For example, in the following code using CUDAdrv dev = first(devices()) methodswith(dev) methods(capabilit…

---

## [How to convert an array to a CuArray efficiently](https://discourse.julialang.org/t/how-to-convert-an-array-to-a-cuarray-efficiently/38612)

<div class="topic-metadata">

**Author:** [@Dustin\_Hess](https://discourse.julialang.org/u/Dustin_Hess)\
**Replies:** 3\
**Last updated:** [May 2, 2020, 11:26pm UTC](https://discourse.julialang.org/t/how-to-convert-an-array-to-a-cuarray-efficiently/38612 "2020-05-02T23:26:40Z")

</div>

Please forgive me as I am taking my first step in using GPU’s in Julia. My use case is I want to do some processioning of electron microscope image stacks from a TEM. So I have everything setup and I have some micrograph…

---

## [Shared memory limitations](https://discourse.julialang.org/t/shared-memory-limitations/38391)

<div class="topic-metadata">

**Author:** [@calebwin](https://discourse.julialang.org/u/calebwin)\
**Replies:** 4\
**Last updated:** [April 29, 2020, 10:16pm UTC](https://discourse.julialang.org/t/shared-memory-limitations/38391 "2020-04-29T22:16:48Z")

</div>

My apologies if this has already been asked. But right now, what all operations are supported for shared memory in CUDANative.jl? is it likely that more stuff can/will be added in the future? or a better question - how h…

---

## [CUDAnative test fails](https://discourse.julialang.org/t/cudanative-test-fails/38085)

<div class="topic-metadata">

**Author:** [@eaubanel](https://discourse.julialang.org/u/eaubanel)\
**Replies:** 2\
**Last updated:** [April 23, 2020, 1:59pm UTC](https://discourse.julialang.org/t/cudanative-test-fails/38085 "2020-04-23T13:59:33Z")

</div>

I’m experienced with C/CUDA, but trying CUDA with Julia for the first time, on a compute node of a research cluster running CentOS Linux release 7.6.1810 and eight Tesla V100-SXM2 GPUs: nvidia-smi±----------------------…

---

## [Error installing CUDAdrv](https://discourse.julialang.org/t/error-installing-cudadrv/37830)

<div class="topic-metadata">

**Author:** [@Mehrdad\_Esfahani](https://discourse.julialang.org/u/Mehrdad_Esfahani)\
**Replies:** 2\
**Last updated:** [April 20, 2020, 1:18pm UTC](https://discourse.julialang.org/t/error-installing-cudadrv/37830 "2020-04-20T13:18:58Z")

</div>

I am very new to CUDA in Julia. When I want to use “CUDAdrv” package I get the following error: using CUDAdrv; ┌ Info: Precompiling CUDAdrv \[c5f51814-7f29-56b8-a69c-e4d8f6be1fde\] └ @ Base loading.jl:1242 ERROR: LoadE…

---

## [Question about CUDA-aware MPI](https://discourse.julialang.org/t/question-about-cuda-aware-mpi/37487)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 1\
**Last updated:** [April 17, 2020, 2:25pm UTC](https://discourse.julialang.org/t/question-about-cuda-aware-mpi/37487 "2020-04-17T14:25:00Z")

</div>

I’d like to make sure I understand how Julia hooks in to CUDA-aware MPI. Basically, is it true that when send/receiving Julia objects which may have a CuArray somewhere in them, that the CuArray is never moved to the CPU…

---

## [How should I approach GPU programming?](https://discourse.julialang.org/t/how-should-i-approach-gpu-programming/37666)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 27\
**Last updated:** [April 17, 2020, 12:16pm UTC](https://discourse.julialang.org/t/how-should-i-approach-gpu-programming/37666 "2020-04-17T12:16:24Z")

</div>

Hello! This is the first time I have really dived into GPU programming. I have followed along this tutorial, https://juliagpu.gitlab.io/CUDA.jl/tutorials/introduction/, and have started getting a feel for how to do some…

---

## [CUDA gradient of gamma PDF](https://discourse.julialang.org/t/cuda-gradient-of-gamma-pdf/37431)

<div class="topic-metadata">

**Author:** [@clinton](https://discourse.julialang.org/u/clinton)\
**Replies:** 4\
**Last updated:** [April 15, 2020, 11:36pm UTC](https://discourse.julialang.org/t/cuda-gradient-of-gamma-pdf/37431 "2020-04-15T23:36:13Z")

</div>

I’m having trouble computing an AD gradient of the gamma PDF using a gpu array. The goal is to use this as part of a Flux project. I am happy to open an issue, but I am new enough to gpu coding that I want to make sure I…

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

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