# Julia version/CUDA compatibility with Quadro K4100 compute capbility of 3

**URL:** https://discourse.julialang.org/t/julia-version-cuda-compatibility-with-quadro-k4100-compute-capbility-of-3/58053
**Category:** GPU
**Created:** [March 26, 2021, 10:38pm UTC](https://discourse.julialang.org/t/julia-version-cuda-compatibility-with-quadro-k4100-compute-capbility-of-3/58053 "2021-03-26T22:38:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![wizebt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wizebt/32/12256_2.png) [@wizebt](https://discourse.julialang.org/u/wizebt)
#### Post date: [March 26, 2021, 10:38pm UTC](https://discourse.julialang.org/t/julia-version-cuda-compatibility-with-quadro-k4100-compute-capbility-of-3/58053/1 "2021-03-26T22:38:19Z")

</div>

Hi,  
I’m really struggling to find a compatible combination of versions: nVidia TK, Julia, CUDA.jl to execute a simple linear shift and add (see fct below) to efficiently run on my old Quadro K4100m GPU with compute capability of 3.

```julia
julia> versioninfo()
Julia Version 1.5.4
Commit 69fcb5745b (2021-03-11 19:13 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-4940MX CPU @ 3.10GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, haswell)
Environment:
  JULIA_NUM_THREADS = 4

julia> CUDA.device()
CuDevice(0): Quadro K4100M

```

```julia
function saad(Sd::CuArray{T}, Id::CuArray{T}, d::Int) where {T<:UInt16}
    Sd[1+d:end] .+= Id[1:end-d]
end

```

Found TK 10.1 w driver 418 is the latest for compute capability 3  
Currently running Julia 1.5.4 CUDA@v1.3.3  
GPU runs 100% but perf are less than similar code using a single thread loop on CPU.

```julia
function saa(S::Array{T}, I::Array{T}, d::Int) where {T<:UInt16}
    n = length(S)
    for i=1+d:n
        @inbounds S[i] += I[i-d]
    end
end

```

I suspect broadcast and thread usage is not optimal on GPU ?  
So far cannot find any compatibility doc to combine Julia and CUDA version to optimally use this old GPU.

Thanks for your guidance  
The following are my test data

```julia
using BenchmarkTools
n = 60 * 10^6
S = zeros(UInt16, n)
Sd = CuArray(S)
I = rand(UInt16.(1:9), n)
Id = CuArray(I)
d = 1
iter = 720

```

---

<div class="post-metadata">

### Author: ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)
#### Post date: [March 29, 2021, 5:49am UTC](https://discourse.julialang.org/t/julia-version-cuda-compatibility-with-quadro-k4100-compute-capbility-of-3/58053/2 "2021-03-29T05:49:16Z")

</div>

> [@wizebt](#):
>
> I suspect broadcast and thread usage is not optimal on GPU ?

You’re broadcasting a much too simple operation, and the GPU needs some arithmetic complexity to hide the latency of memory operations.
