Skip to content
This repository has been archived by the owner on Jan 31, 2021. It is now read-only.

Benchmark of CuArrays.jl #4

Open
GiggleLiu opened this issue Oct 19, 2018 · 0 comments
Open

Benchmark of CuArrays.jl #4

GiggleLiu opened this issue Oct 19, 2018 · 0 comments

Comments

@GiggleLiu
Copy link
Member

GiggleLiu commented Oct 19, 2018

Platform:

CuArrays v0.8.0 [3a865a2d]
[0] NVIDIA: GeForce 940MX, 2004 MB
Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz

Float32

julia> a = randn(Float32, 500, 500)
julia> af = cu(a)

MATMUL

julia> @benchmark $af*$af seconds=0.1
BenchmarkTools.Trial: 
  memory estimate:  400 bytes
  allocs estimate:  11
  --------------
  minimum time:     8.079 μs (0.00% GC)
  median time:      10.621 μs (0.00% GC)
  mean time:        125.724 μs (0.00% GC)
  maximum time:     476.358 μs (0.00% GC)
  --------------
  samples:          786
  evals/sample:     1

julia> @benchmark $a*$a seconds=0.1
BenchmarkTools.Trial: 
  memory estimate:  976.64 KiB
  allocs estimate:  2
  --------------
  minimum time:     2.404 ms (0.00% GC)
  median time:      3.594 ms (0.00% GC)
  mean time:        5.354 ms (0.00% GC)
  maximum time:     15.666 ms (0.00% GC)
  --------------
  samples:          20
  evals/sample:     1

FFT

julia> @benchmark fft($af)
BenchmarkTools.Trial: 
  memory estimate:  4.06 KiB
  allocs estimate:  101
  --------------
  minimum time:     927.302 μs (0.00% GC)
  median time:      974.301 μs (0.00% GC)
  mean time:        1.972 ms (35.31% GC)
  maximum time:     118.619 ms (71.07% GC)
  --------------
  samples:          2553
  evals/sample:     1

julia> @benchmark fft($a)
BenchmarkTools.Trial: 
  memory estimate:  3.82 MiB
  allocs estimate:  57
  --------------
  minimum time:     4.199 ms (0.00% GC)
  median time:      4.452 ms (0.00% GC)
  mean time:        4.729 ms (4.61% GC)
  maximum time:     67.616 ms (91.65% GC)
  --------------
  samples:          1056
  evals/sample:     1

ComplexF64

julia> a = randn(ComplexF64, 500, 500)
julia> af = cu(a)

MATMUL

julia> @benchmark $af*$af seconds=0.1
BenchmarkTools.Trial: 
  memory estimate:  400 bytes
  allocs estimate:  11
  --------------
  minimum time:     22.125 μs (0.00% GC)
  median time:      23.201 μs (0.00% GC)
  mean time:        180.813 μs (82.23% GC)
  maximum time:     83.866 ms (97.15% GC)
  --------------
  samples:          548
  evals/sample:     1

julia> @benchmark $a*$a seconds=0.1
BenchmarkTools.Trial: 
  memory estimate:  3.81 MiB
  allocs estimate:  2
  --------------
  minimum time:     16.390 ms (0.00% GC)
  median time:      16.736 ms (0.00% GC)
  mean time:        20.200 ms (15.91% GC)
  maximum time:     35.663 ms (54.06% GC)
  --------------
  samples:          6
  evals/sample:     1

FFT

julia> @benchmark fft($af) seconds=0.1
BenchmarkTools.Trial: 
  memory estimate:  704 bytes
  allocs estimate:  15
  --------------
  minimum time:     762.266 μs (0.00% GC)
  median time:      788.589 μs (0.00% GC)
  mean time:        831.032 μs (0.00% GC)
  maximum time:     1.237 ms (0.00% GC)
  --------------
  samples:          120
  evals/sample:     1

julia> @benchmark fft($a) seconds=0.1
BenchmarkTools.Trial: 
  memory estimate:  3.82 MiB
  allocs estimate:  55
  --------------
  minimum time:     4.197 ms (0.00% GC)
  median time:      5.443 ms (0.00% GC)
  mean time:        11.459 ms (55.55% GC)
  maximum time:     63.728 ms (91.32% GC)
  --------------
  samples:          12
  evals/sample:     1
@GiggleLiu GiggleLiu changed the title BenchMarking CuArrays.jl Benchmark of CuArrays.jl Oct 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant