Last active
April 6, 2017 19:40
-
-
Save ilkerkesen/4ebb8aa91fbbc877a8b0468a8600271c to your computer and use it in GitHub Desktop.
Knet Reduction Timings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6-element Array{Tuple{Int64,Int64},1}: | |
(100,100) | |
(500,500) | |
(100,1000) | |
(1000,100) | |
(100,60000) | |
(60000,100) | |
julia> a = randn(Float32, ds[1]...); | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 240 bytes | |
allocs estimate: 9 | |
-------------- | |
minimum time: 4.098 μs (0.00% GC) | |
median time: 4.594 μs (0.00% GC) | |
mean time: 4.629 μs (0.00% GC) | |
maximum time: 14.002 μs (0.00% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
BenchmarkTools.Trial: | |
memory estimate: 528 bytes | |
allocs estimate: 17 | |
-------------- | |
minimum time: 5.114 μs (0.00% GC) | |
median time: 5.965 μs (0.00% GC) | |
mean time: 6.115 μs (0.87% GC) | |
maximum time: 1.129 ms (46.89% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 6 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> a = randn(Float32, ds[2]...); | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 272 bytes | |
allocs estimate: 11 | |
-------------- | |
minimum time: 4.197 μs (0.00% GC) | |
median time: 11.985 μs (0.00% GC) | |
mean time: 11.803 μs (0.48% GC) | |
maximum time: 1.522 ms (37.52% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
BenchmarkTools.Trial: | |
memory estimate: 560 bytes | |
allocs estimate: 19 | |
-------------- | |
minimum time: 5.114 μs (0.00% GC) | |
median time: 53.434 μs (0.00% GC) | |
mean time: 52.513 μs (0.18% GC) | |
maximum time: 1.561 ms (59.62% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 6 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> a = randn(Float32, ds[3]...); | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 336 bytes | |
allocs estimate: 15 | |
-------------- | |
minimum time: 4.206 μs (0.00% GC) | |
median time: 12.313 μs (0.00% GC) | |
mean time: 12.120 μs (0.42% GC) | |
maximum time: 1.293 ms (39.80% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
BenchmarkTools.Trial: | |
memory estimate: 528 bytes | |
allocs estimate: 17 | |
-------------- | |
minimum time: 5.052 μs (0.00% GC) | |
median time: 25.351 μs (0.00% GC) | |
mean time: 24.905 μs (0.21% GC) | |
maximum time: 1.113 ms (46.85% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 6 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> a = randn(Float32, ds[4]...); | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 256 bytes | |
allocs estimate: 10 | |
-------------- | |
minimum time: 4.178 μs (0.00% GC) | |
median time: 6.223 μs (0.00% GC) | |
mean time: 6.407 μs (1.00% GC) | |
maximum time: 1.527 ms (41.92% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
a = randn(Float32, ds[5]...); | |
BenchmarkTools.Trial: | |
memory estimate: 624 bytes | |
allocs estimate: 23 | |
-------------- | |
minimum time: 5.145 μs (0.00% GC) | |
median time: 27.112 μs (0.00% GC) | |
mean time: 26.636 μs (0.36% GC) | |
maximum time: 1.025 ms (48.13% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 6 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 336 bytes | |
allocs estimate: 15 | |
-------------- | |
minimum time: 4.737 μs (0.00% GC) | |
median time: 554.659 μs (0.00% GC) | |
mean time: 527.203 μs (0.00% GC) | |
maximum time: 1.264 ms (0.00% GC) | |
-------------- | |
samples: 9403 | |
evals/sample: 1 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
BenchmarkTools.Trial: | |
memory estimate: 528 bytes | |
allocs estimate: 17 | |
-------------- | |
minimum time: 5.738 μs (0.00% GC) | |
median time: 1.446 ms (0.00% GC) | |
mean time: 1.367 ms (0.00% GC) | |
maximum time: 1.601 ms (0.00% GC) | |
-------------- | |
samples: 610 | |
evals/sample: 6 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> a = randn(Float32, ds[6]...); | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 256 bytes | |
allocs estimate: 10 | |
-------------- | |
minimum time: 4.316 μs (0.00% GC) | |
median time: 172.717 μs (0.00% GC) | |
mean time: 166.780 μs (0.00% GC) | |
maximum time: 173.993 μs (0.00% GC) | |
-------------- | |
samples: 4264 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
BenchmarkTools.Trial: | |
memory estimate: 624 bytes | |
allocs estimate: 23 | |
-------------- | |
minimum time: 5.593 μs (0.00% GC) | |
median time: 1.489 ms (0.00% GC) | |
mean time: 1.424 ms (0.00% GC) | |
maximum time: 1.489 ms (0.00% GC) | |
-------------- | |
samples: 585 | |
evals/sample: 6 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6-element Array{Tuple{Int64,Int64},1}: | |
(100,100) | |
(500,500) | |
(100,1000) | |
(1000,100) | |
(100,60000) | |
(60000,100) | |
julia> | |
julia> a = randn(Float32, ds[1]...); | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 96 bytes | |
allocs estimate: 3 | |
-------------- | |
minimum time: 3.926 μs (0.00% GC) | |
median time: 5.041 μs (0.00% GC) | |
mean time: 5.062 μs (0.00% GC) | |
maximum time: 12.898 μs (0.00% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
BenchmarkTools.Trial: | |
memory estimate: 384 bytes | |
allocs estimate: 11 | |
-------------- | |
minimum time: 4.675 μs (0.00% GC) | |
median time: 6.425 μs (0.00% GC) | |
mean time: 6.577 μs (0.76% GC) | |
maximum time: 1.161 ms (42.95% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> a = randn(Float32, ds[2]...); | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 128 bytes | |
allocs estimate: 5 | |
-------------- | |
minimum time: 3.978 μs (0.00% GC) | |
median time: 14.334 μs (0.00% GC) | |
mean time: 14.111 μs (0.00% GC) | |
maximum time: 16.470 μs (0.00% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
BenchmarkTools.Trial: | |
memory estimate: 416 bytes | |
allocs estimate: 13 | |
-------------- | |
minimum time: 4.764 μs (0.00% GC) | |
median time: 56.472 μs (0.00% GC) | |
mean time: 55.516 μs (0.10% GC) | |
maximum time: 1.299 ms (43.10% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 6 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> a = randn(Float32, ds[3]...); | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 128 bytes | |
allocs estimate: 5 | |
-------------- | |
minimum time: 4.006 μs (0.00% GC) | |
median time: 16.098 μs (0.00% GC) | |
mean time: 15.856 μs (0.00% GC) | |
maximum time: 17.634 μs (0.00% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
BenchmarkTools.Trial: | |
memory estimate: 384 bytes | |
allocs estimate: 11 | |
-------------- | |
minimum time: 4.735 μs (0.00% GC) | |
median time: 26.163 μs (0.00% GC) | |
mean time: 25.771 μs (0.20% GC) | |
maximum time: 1.159 ms (43.67% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> a = randn(Float32, ds[4]...); | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 96 bytes | |
allocs estimate: 3 | |
-------------- | |
minimum time: 4.021 μs (0.00% GC) | |
median time: 7.369 μs (0.00% GC) | |
mean time: 7.245 μs (0.00% GC) | |
maximum time: 12.383 μs (0.00% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
BenchmarkTools.Trial: | |
memory estimate: 416 bytes | |
allocs estimate: 13 | |
-------------- | |
minimum time: 4.729 μs (0.00% GC) | |
median time: 32.814 μs (0.00% GC) | |
mean time: 32.321 μs (0.15% GC) | |
maximum time: 1.114 ms (44.75% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> a = randn(Float32, ds[5]...); | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 128 bytes | |
allocs estimate: 5 | |
-------------- | |
minimum time: 4.038 μs (0.00% GC) | |
median time: 763.446 μs (0.00% GC) | |
mean time: 729.050 μs (0.00% GC) | |
maximum time: 1.396 ms (0.00% GC) | |
-------------- | |
samples: 6813 | |
evals/sample: 1 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
a = randn(Float32, ds[6]...); | |
BenchmarkTools.Trial: | |
memory estimate: 384 bytes | |
allocs estimate: 11 | |
-------------- | |
minimum time: 5.064 μs (0.00% GC) | |
median time: 1.469 ms (0.00% GC) | |
mean time: 1.388 ms (0.00% GC) | |
maximum time: 1.579 ms (0.00% GC) | |
-------------- | |
samples: 515 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 96 bytes | |
allocs estimate: 3 | |
-------------- | |
minimum time: 4.082 μs (0.00% GC) | |
median time: 257.741 μs (0.00% GC) | |
mean time: 246.487 μs (0.00% GC) | |
maximum time: 259.281 μs (0.00% GC) | |
-------------- | |
samples: 2530 | |
evals/sample: 8 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
BenchmarkTools.Trial: | |
memory estimate: 416 bytes | |
allocs estimate: 13 | |
-------------- | |
minimum time: 5.112 μs (0.00% GC) | |
median time: 1.730 ms (0.00% GC) | |
mean time: 1.655 ms (0.00% GC) | |
maximum time: 1.750 ms (0.00% GC) | |
-------------- | |
samples: 432 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6-element Array{Tuple{Int64,Int64},1}: | |
(100,100) | |
(500,500) | |
(100,1000) | |
(1000,100) | |
(100,60000) | |
(60000,100) | |
julia> a = randn(Float32, ds[1]...); | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 240 bytes | |
allocs estimate: 9 | |
-------------- | |
minimum time: 4.087 μs (0.00% GC) | |
median time: 4.795 μs (0.00% GC) | |
mean time: 4.850 μs (0.00% GC) | |
maximum time: 14.486 μs (0.00% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
BenchmarkTools.Trial: | |
memory estimate: 528 bytes | |
allocs estimate: 17 | |
-------------- | |
minimum time: 5.029 μs (0.00% GC) | |
median time: 6.055 μs (0.00% GC) | |
mean time: 6.244 μs (1.21% GC) | |
maximum time: 1.305 ms (58.06% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 6 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> a = randn(Float32, ds[2]...); | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 272 bytes | |
allocs estimate: 11 | |
-------------- | |
minimum time: 4.113 μs (0.00% GC) | |
median time: 14.870 μs (0.00% GC) | |
mean time: 14.636 μs (0.59% GC) | |
maximum time: 1.749 ms (49.04% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
BenchmarkTools.Trial: | |
memory estimate: 560 bytes | |
allocs estimate: 19 | |
-------------- | |
minimum time: 5.160 μs (0.00% GC) | |
median time: 56.003 μs (0.00% GC) | |
mean time: 55.045 μs (0.17% GC) | |
maximum time: 1.521 ms (62.01% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 6 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> a = randn(Float32, ds[3]...); | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 336 bytes | |
allocs estimate: 15 | |
-------------- | |
minimum time: 4.250 μs (0.00% GC) | |
median time: 16.657 μs (0.00% GC) | |
mean time: 16.407 μs (0.32% GC) | |
maximum time: 1.245 ms (42.08% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
BenchmarkTools.Trial: | |
memory estimate: 528 bytes | |
allocs estimate: 17 | |
-------------- | |
minimum time: 5.104 μs (0.00% GC) | |
median time: 25.693 μs (0.00% GC) | |
mean time: 25.243 μs (0.21% GC) | |
maximum time: 1.095 ms (49.05% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 6 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> a = randn(Float32, ds[4]...); | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 256 bytes | |
allocs estimate: 10 | |
-------------- | |
minimum time: 4.091 μs (0.00% GC) | |
median time: 6.459 μs (0.00% GC) | |
mean time: 6.588 μs (0.93% GC) | |
maximum time: 1.445 ms (42.24% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
BenchmarkTools.Trial: | |
memory estimate: 624 bytes | |
allocs estimate: 23 | |
-------------- | |
minimum time: 5.278 μs (0.00% GC) | |
median time: 31.534 μs (0.00% GC) | |
mean time: 30.976 μs (0.32% GC) | |
maximum time: 1.020 ms (51.32% GC) | |
-------------- | |
samples: 10000 | |
evals/sample: 6 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> a = randn(Float32, ds[5]...); | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 336 bytes | |
allocs estimate: 15 | |
-------------- | |
minimum time: 4.506 μs (0.00% GC) | |
median time: 810.902 μs (0.00% GC) | |
mean time: 762.506 μs (0.00% GC) | |
maximum time: 1.746 ms (0.00% GC) | |
-------------- | |
samples: 6521 | |
evals/sample: 1 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
BenchmarkTools.Trial: | |
memory estimate: 528 bytes | |
allocs estimate: 17 | |
-------------- | |
minimum time: 5.408 μs (0.00% GC) | |
median time: 1.589 ms (0.00% GC) | |
mean time: 1.519 ms (0.00% GC) | |
maximum time: 1.734 ms (0.00% GC) | |
-------------- | |
samples: 549 | |
evals/sample: 6 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> a = randn(Float32, ds[6]...); | |
julia> k = KnetArray(a); | |
julia> @benchmark sum(k,1) | |
BenchmarkTools.Trial: | |
memory estimate: 256 bytes | |
allocs estimate: 10 | |
-------------- | |
minimum time: 4.286 μs (0.00% GC) | |
median time: 173.004 μs (0.00% GC) | |
mean time: 167.080 μs (0.00% GC) | |
maximum time: 174.756 μs (0.00% GC) | |
-------------- | |
samples: 4258 | |
evals/sample: 7 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% | |
julia> @benchmark sum(k,2) | |
BenchmarkTools.Trial: | |
memory estimate: 624 bytes | |
allocs estimate: 23 | |
-------------- | |
minimum time: 5.744 μs (0.00% GC) | |
median time: 1.723 ms (0.00% GC) | |
mean time: 1.648 ms (0.00% GC) | |
maximum time: 1.758 ms (0.00% GC) | |
-------------- | |
samples: 506 | |
evals/sample: 6 | |
time tolerance: 5.00% | |
memory tolerance: 1.00% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment