Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collect palatte to CPU array with valid pointer #57

Merged
merged 1 commit into from
Apr 27, 2022
Merged

Conversation

johnnychen94
Copy link
Member

@johnnychen94 johnnychen94 commented Apr 27, 2022

This currently doesn't work:

index = rand(1:5, 3, 4)
palatte = colorview(RGB{N0f8}, rand(UInt8, 3, 5))
img = IndirectArray(index, palatte)
julia> PNGFiles.save(IOBuffer(), img)
ERROR: conversion to pointer not defined for SubArray{UInt8, 2, Matrix{UInt8}, Tuple{ImageCore.ColorChanPerm{3}, Base.Slice{Base.OneTo{Int64}}}, false}
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] unsafe_convert(#unused#::Type{Ptr{UInt8}}, a::SubArray{UInt8, 2, Matrix{UInt8}, Tuple{ImageCore.ColorChanPerm{3}, Base.Slice{Base.OneTo{Int64}}}, false})
    @ Base ./pointer.jl:67
  [3] unsafe_convert(#unused#::Type{Ptr{RGB{N0f8}}}, a::Base.ReinterpretArray{RGB{N0f8}, 1, UInt8, SubArray{UInt8, 2, Matrix{UInt8}, Tuple{ImageCore.ColorChanPerm{3}, Base.Slice{Base.OneTo{Int64}}}, false}, true})
    @ Base ./reinterpretarray.jl:315
  [4] unsafe_convert(#unused#::Type{Ptr{PNGFiles.png_color_struct}}, a::Base.ReinterpretArray{RGB{N0f8}, 1, UInt8, SubArray{UInt8, 2, Matrix{UInt8}, Tuple{ImageCore.ColorChanPerm{3}, Base.Slice{Base.OneTo{Int64}}}, false}, true})
    @ Base ./pointer.jl:66
  [5] png_set_PLTE(png_ptr::Ptr{Nothing}, info_ptr::Ptr{Nothing}, palette::Base.ReinterpretArray{RGB{N0f8}, 1, UInt8, SubArray{UInt8, 2, Matrix{UInt8}, Tuple{ImageCore.ColorChanPerm{3}, Base.Slice{Base.OneTo{Int64}}}, false}, true}, num_palette::Int64)
    @ PNGFiles ~/Documents/Julia/PNGFiles.jl/gen/libpng/libpng_api.jl:1010
  [6] _save(png_ptr::Ptr{Nothing}, info_ptr::Ptr{Nothing}, image::IndirectArray{RGB{N0f8}, 2, Int64, Matrix{Int64}, Base.ReinterpretArray{RGB{N0f8}, 1, UInt8, SubArray{UInt8, 2, Matrix{UInt8}, Tuple{ImageCore.ColorChanPerm{3}, Base.Slice{Base.OneTo{Int64}}}, false}, true}}; compression_level::Int64, compression_strategy::Int64, filters::Int64, file_gamma::Nothing, background::Nothing)
    @ PNGFiles ~/Documents/Julia/PNGFiles.jl/src/io.jl:451
  [7] (::PNGFiles.var"#9#10"{Int64, Int64, Int64, Nothing, Nothing, IOBuffer, IndirectArray{RGB{N0f8}, 2, Int64, Matrix{Int64}, Base.ReinterpretArray{RGB{N0f8}, 1, UInt8, SubArray{UInt8, 2, Matrix{UInt8}, Tuple{ImageCore.ColorChanPerm{3}, Base.Slice{Base.OneTo{Int64}}}, false}, true}}, Ptr{Nothing}, Ptr{Nothing}})()
    @ PNGFiles ~/Documents/Julia/PNGFiles.jl/src/io.jl:402
  [8] maybe_lock(f::PNGFiles.var"#9#10"{Int64, Int64, Int64, Nothing, Nothing, IOBuffer, IndirectArray{RGB{N0f8}, 2, Int64, Matrix{Int64}, Base.ReinterpretArray{RGB{N0f8}, 1, UInt8, SubArray{UInt8, 2, Matrix{UInt8}, Tuple{ImageCore.ColorChanPerm{3}, Base.Slice{Base.OneTo{Int64}}}, false}, true}}, Ptr{Nothing}, Ptr{Nothing}}, io::IOBuffer)
    @ PNGFiles ~/Documents/Julia/PNGFiles.jl/src/io.jl:62
  [9] save(s::IOBuffer, image::IndirectArray{RGB{N0f8}, 2, Int64, Matrix{Int64}, Base.ReinterpretArray{RGB{N0f8}, 1, UInt8, SubArray{UInt8, 2, Matrix{UInt8}, Tuple{ImageCore.ColorChanPerm{3}, Base.Slice{Base.OneTo{Int64}}}, false}, true}}; compression_level::Int64, compression_strategy::Int64, filters::Int64, file_gamma::Nothing, background::Nothing)
    @ PNGFiles ~/Documents/Julia/PNGFiles.jl/src/io.jl:397
 [10] save(s::IOBuffer, image::IndirectArray{RGB{N0f8}, 2, Int64, Matrix{Int64}, Base.ReinterpretArray{RGB{N0f8}, 1, UInt8, SubArray{UInt8, 2, Matrix{UInt8}, Tuple{ImageCore.ColorChanPerm{3}, Base.Slice{Base.OneTo{Int64}}}, false}, true}})
    @ PNGFiles ~/Documents/Julia/PNGFiles.jl/src/io.jl:389
 [11] top-level scope
    @ REPL[26]:1

This PR fixes it.

@johnnychen94 johnnychen94 added the bug Something isn't working label Apr 27, 2022
@github-actions
Copy link
Contributor

Benchmark result

Judge result

Benchmark Report for /home/runner/work/PNGFiles.jl/PNGFiles.jl

Job Properties

  • Time of benchmarks:
    • Target: 27 Apr 2022 - 14:15
    • Baseline: 27 Apr 2022 - 14:25
  • Package commits:
    • Target: 148f0f
    • Baseline: b886fb
  • Julia commits:
    • Target: bf5349
    • Baseline: bf5349
  • Julia command flags:
    • Target: None
    • Baseline: None
  • Environment variables:
    • Target: None
    • Baseline: None

Results

A ratio greater than 1.0 denotes a possible regression (marked with ❌), while a ratio less
than 1.0 denotes a possible improvement (marked with ✅). Only significant results - results
that indicate possible regressions or improvements - are shown below (thus, an empty table means that all
benchmark results remained invariant between builds).

ID time ratio memory ratio
["synth_imgs", "Float64_0", "save"] 0.95 (5%) ✅ 1.00 (1%)

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • ["synth_imgs", "ARGB32"]
  • ["synth_imgs", "Bool_0"]
  • ["synth_imgs", "Bool_1"]
  • ["synth_imgs", "Bool_2"]
  • ["synth_imgs", "Bool_3"]
  • ["synth_imgs", "Bool_4"]
  • ["synth_imgs", "Float64_0"]
  • ["synth_imgs", "Float64_1"]
  • ["synth_imgs", "Float64_2"]
  • ["synth_imgs", "Float64_3"]
  • ["synth_imgs", "Float64_4"]
  • ["synth_imgs", "Gray"]
  • ["synth_imgs", "Gray-Float64"]
  • ["synth_imgs", "Gray-N0f16"]
  • ["synth_imgs", "Gray-N0f8"]
  • ["synth_imgs", "GrayA"]
  • ["synth_imgs", "GrayA-Float64"]
  • ["synth_imgs", "GrayA-N0f16"]
  • ["synth_imgs", "GrayA-N0f8"]
  • ["synth_imgs", "N0f16_0"]
  • ["synth_imgs", "N0f16_1"]
  • ["synth_imgs", "N0f16_2"]
  • ["synth_imgs", "N0f16_3"]
  • ["synth_imgs", "N0f16_4"]
  • ["synth_imgs", "N0f8_0"]
  • ["synth_imgs", "N0f8_1"]
  • ["synth_imgs", "N0f8_2"]
  • ["synth_imgs", "N0f8_3"]
  • ["synth_imgs", "N0f8_4"]
  • ["synth_imgs", "RGB"]
  • ["synth_imgs", "RGB-Float64"]
  • ["synth_imgs", "RGB-N0f16"]
  • ["synth_imgs", "RGB-N0f8"]
  • ["synth_imgs", "RGBA"]
  • ["synth_imgs", "RGBA-Float64"]
  • ["synth_imgs", "RGBA-N0f16"]
  • ["synth_imgs", "RGBA-N0f8"]
  • ["synth_imgs", "UInt16_0"]
  • ["synth_imgs", "UInt16_1"]
  • ["synth_imgs", "UInt16_2"]
  • ["synth_imgs", "UInt16_3"]
  • ["synth_imgs", "UInt16_4"]
  • ["synth_imgs", "UInt8_0"]
  • ["synth_imgs", "UInt8_1"]
  • ["synth_imgs", "UInt8_2"]
  • ["synth_imgs", "UInt8_3"]
  • ["synth_imgs", "UInt8_4"]

Julia versioninfo

Target

Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      Ubuntu 20.04.4 LTS
  uname: Linux 5.13.0-1021-azure #24~20.04.1-Ubuntu SMP Tue Mar 29 15:34:22 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz: 
              speed         user         nice          sys         idle          irq
       #1  2593 MHz        472 s          0 s        118 s       6638 s          0 s
       #2  2593 MHz       6399 s          0 s        418 s        462 s          0 s
       
  Memory: 6.783611297607422 GB (3599.41015625 MB free)
  Uptime: 731.34 sec
  Load Avg:  1.09  0.99  0.62
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake-avx512)

Baseline

Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      Ubuntu 20.04.4 LTS
  uname: Linux 5.13.0-1021-azure #24~20.04.1-Ubuntu SMP Tue Mar 29 15:34:22 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz: 
              speed         user         nice          sys         idle          irq
       #1  2593 MHz        556 s          0 s        130 s      12289 s          0 s
       #2  2593 MHz      11831 s          0 s        699 s        527 s          0 s
       
  Memory: 6.783611297607422 GB (3469.35546875 MB free)
  Uptime: 1309.11 sec
  Load Avg:  1.02  1.03  0.83
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake-avx512)

Target result

Benchmark Report for /home/runner/work/PNGFiles.jl/PNGFiles.jl

Job Properties

  • Time of benchmark: 27 Apr 2022 - 14:15
  • Package commit: 148f0f
  • Julia commit: bf5349
  • Julia command flags: None
  • Environment variables: None

Results

Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the ID column have the structure [parent_group, child_group, ..., key], and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.

ID time GC time memory allocations
["synth_imgs", "ARGB32", "load"] 417.304 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "ARGB32", "save"] 2.297 ms (5%) 256.16 KiB (1%) 5
["synth_imgs", "Bool_0", "load"] 456.005 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Bool_0", "save"] 565.007 μs (5%) 64.94 KiB (1%) 6
["synth_imgs", "Bool_1", "load"] 457.302 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Bool_1", "save"] 566.701 μs (5%) 65.11 KiB (1%) 11
["synth_imgs", "Bool_2", "load"] 723.908 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "Bool_2", "save"] 1.259 ms (5%) 192.53 KiB (1%) 10
["synth_imgs", "Bool_3", "load"] 858.010 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "Bool_3", "save"] 1.877 ms (5%) 288.16 KiB (1%) 10
["synth_imgs", "Bool_4", "load"] 1.030 ms (5%) 256.64 KiB (1%) 17
["synth_imgs", "Bool_4", "save"] 2.445 ms (5%) 383.78 KiB (1%) 10
["synth_imgs", "Float64_0", "load"] 216.202 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Float64_0", "save"] 629.907 μs (5%) 64.91 KiB (1%) 5
["synth_imgs", "Float64_1", "load"] 216.102 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Float64_1", "save"] 632.107 μs (5%) 65.11 KiB (1%) 11
["synth_imgs", "Float64_2", "load"] 358.604 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "Float64_2", "save"] 1.332 ms (5%) 192.53 KiB (1%) 10
["synth_imgs", "Float64_3", "load"] 380.204 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "Float64_3", "save"] 1.959 ms (5%) 288.16 KiB (1%) 10
["synth_imgs", "Float64_4", "load"] 419.404 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "Float64_4", "save"] 2.520 ms (5%) 383.78 KiB (1%) 10
["synth_imgs", "Gray", "load"] 216.002 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Gray", "save"] 618.007 μs (5%) 64.91 KiB (1%) 5
["synth_imgs", "Gray-Float64", "load"] 215.203 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Gray-Float64", "save"] 618.907 μs (5%) 64.91 KiB (1%) 5
["synth_imgs", "Gray-N0f16", "load"] 354.804 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "Gray-N0f16", "save"] 1.144 ms (5%) 64.86 KiB (1%) 3
["synth_imgs", "Gray-N0f8", "load"] 214.203 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Gray-N0f8", "save"] 569.307 μs (5%) 32.98 KiB (1%) 3
["synth_imgs", "GrayA", "load"] 358.804 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "GrayA", "save"] 1.242 ms (5%) 128.66 KiB (1%) 5
["synth_imgs", "GrayA-Float64", "load"] 358.804 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "GrayA-Float64", "save"] 1.244 ms (5%) 128.66 KiB (1%) 5
["synth_imgs", "GrayA-N0f16", "load"] 435.305 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "GrayA-N0f16", "save"] 2.233 ms (5%) 128.61 KiB (1%) 3
["synth_imgs", "GrayA-N0f8", "load"] 355.304 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "GrayA-N0f8", "save"] 1.144 ms (5%) 64.86 KiB (1%) 3
["synth_imgs", "N0f16_0", "load"] 355.204 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "N0f16_0", "save"] 1.191 ms (5%) 128.69 KiB (1%) 6
["synth_imgs", "N0f16_1", "load"] 354.902 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "N0f16_1", "save"] 1.194 ms (5%) 128.86 KiB (1%) 11
["synth_imgs", "N0f16_2", "load"] 436.205 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "N0f16_2", "save"] 2.345 ms (5%) 383.78 KiB (1%) 10
["synth_imgs", "N0f16_3", "load"] 996.011 μs (5%) 384.14 KiB (1%) 17
["synth_imgs", "N0f16_3", "save"] 3.555 ms (5%) 575.03 KiB (1%) 10
["synth_imgs", "N0f16_4", "load"] 1.307 ms (5%) 511.64 KiB (1%) 17
["synth_imgs", "N0f16_4", "save"] 4.765 ms (5%) 766.25 KiB (1%) 9
["synth_imgs", "N0f8_0", "load"] 213.902 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "N0f8_0", "save"] 594.606 μs (5%) 64.91 KiB (1%) 5
["synth_imgs", "N0f8_1", "load"] 213.902 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "N0f8_1", "save"] 594.407 μs (5%) 65.11 KiB (1%) 11
["synth_imgs", "N0f8_2", "load"] 355.702 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "N0f8_2", "save"] 1.228 ms (5%) 192.53 KiB (1%) 10
["synth_imgs", "N0f8_3", "load"] 382.804 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "N0f8_3", "save"] 1.835 ms (5%) 288.16 KiB (1%) 10
["synth_imgs", "N0f8_4", "load"] 421.404 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "N0f8_4", "save"] 2.372 ms (5%) 383.78 KiB (1%) 10
["synth_imgs", "RGB", "load"] 382.404 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "RGB", "save"] 1.862 ms (5%) 192.41 KiB (1%) 5
["synth_imgs", "RGB-Float64", "load"] 376.404 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "RGB-Float64", "save"] 1.872 ms (5%) 192.41 KiB (1%) 5
["synth_imgs", "RGB-N0f16", "load"] 999.712 μs (5%) 384.14 KiB (1%) 17
["synth_imgs", "RGB-N0f16", "save"] 3.403 ms (5%) 192.36 KiB (1%) 3
["synth_imgs", "RGB-N0f8", "load"] 378.905 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "RGB-N0f8", "save"] 1.713 ms (5%) 96.73 KiB (1%) 3
["synth_imgs", "RGBA", "load"] 426.304 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "RGBA", "save"] 2.413 ms (5%) 256.16 KiB (1%) 5
["synth_imgs", "RGBA-Float64", "load"] 420.600 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "RGBA-Float64", "save"] 2.405 ms (5%) 256.16 KiB (1%) 5
["synth_imgs", "RGBA-N0f16", "load"] 1.321 ms (5%) 511.64 KiB (1%) 17
["synth_imgs", "RGBA-N0f16", "save"] 4.575 ms (5%) 256.14 KiB (1%) 4
["synth_imgs", "RGBA-N0f8", "load"] 412.998 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "RGBA-N0f8", "save"] 2.217 ms (5%) 128.61 KiB (1%) 3
["synth_imgs", "UInt16_0", "load"] 355.403 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "UInt16_0", "save"] 1.157 ms (5%) 64.86 KiB (1%) 3
["synth_imgs", "UInt16_1", "load"] 355.004 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "UInt16_1", "save"] 1.161 ms (5%) 65.22 KiB (1%) 14
["synth_imgs", "UInt16_2", "load"] 438.905 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "UInt16_2", "save"] 2.306 ms (5%) 256.22 KiB (1%) 8
["synth_imgs", "UInt16_3", "load"] 1.007 ms (5%) 384.14 KiB (1%) 17
["synth_imgs", "UInt16_3", "save"] 3.478 ms (5%) 383.72 KiB (1%) 8
["synth_imgs", "UInt16_4", "load"] 1.313 ms (5%) 511.64 KiB (1%) 17
["synth_imgs", "UInt16_4", "save"] 4.696 ms (5%) 511.19 KiB (1%) 7
["synth_imgs", "UInt8_0", "load"] 213.602 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "UInt8_0", "save"] 560.206 μs (5%) 33.02 KiB (1%) 4
["synth_imgs", "UInt8_1", "load"] 213.202 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "UInt8_1", "save"] 595.006 μs (5%) 33.34 KiB (1%) 14
["synth_imgs", "UInt8_2", "load"] 353.304 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "UInt8_2", "save"] 1.191 ms (5%) 128.72 KiB (1%) 8
["synth_imgs", "UInt8_3", "load"] 381.905 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "UInt8_3", "save"] 1.767 ms (5%) 192.47 KiB (1%) 8
["synth_imgs", "UInt8_4", "load"] 424.204 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "UInt8_4", "save"] 2.278 ms (5%) 256.22 KiB (1%) 8

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • ["synth_imgs", "ARGB32"]
  • ["synth_imgs", "Bool_0"]
  • ["synth_imgs", "Bool_1"]
  • ["synth_imgs", "Bool_2"]
  • ["synth_imgs", "Bool_3"]
  • ["synth_imgs", "Bool_4"]
  • ["synth_imgs", "Float64_0"]
  • ["synth_imgs", "Float64_1"]
  • ["synth_imgs", "Float64_2"]
  • ["synth_imgs", "Float64_3"]
  • ["synth_imgs", "Float64_4"]
  • ["synth_imgs", "Gray"]
  • ["synth_imgs", "Gray-Float64"]
  • ["synth_imgs", "Gray-N0f16"]
  • ["synth_imgs", "Gray-N0f8"]
  • ["synth_imgs", "GrayA"]
  • ["synth_imgs", "GrayA-Float64"]
  • ["synth_imgs", "GrayA-N0f16"]
  • ["synth_imgs", "GrayA-N0f8"]
  • ["synth_imgs", "N0f16_0"]
  • ["synth_imgs", "N0f16_1"]
  • ["synth_imgs", "N0f16_2"]
  • ["synth_imgs", "N0f16_3"]
  • ["synth_imgs", "N0f16_4"]
  • ["synth_imgs", "N0f8_0"]
  • ["synth_imgs", "N0f8_1"]
  • ["synth_imgs", "N0f8_2"]
  • ["synth_imgs", "N0f8_3"]
  • ["synth_imgs", "N0f8_4"]
  • ["synth_imgs", "RGB"]
  • ["synth_imgs", "RGB-Float64"]
  • ["synth_imgs", "RGB-N0f16"]
  • ["synth_imgs", "RGB-N0f8"]
  • ["synth_imgs", "RGBA"]
  • ["synth_imgs", "RGBA-Float64"]
  • ["synth_imgs", "RGBA-N0f16"]
  • ["synth_imgs", "RGBA-N0f8"]
  • ["synth_imgs", "UInt16_0"]
  • ["synth_imgs", "UInt16_1"]
  • ["synth_imgs", "UInt16_2"]
  • ["synth_imgs", "UInt16_3"]
  • ["synth_imgs", "UInt16_4"]
  • ["synth_imgs", "UInt8_0"]
  • ["synth_imgs", "UInt8_1"]
  • ["synth_imgs", "UInt8_2"]
  • ["synth_imgs", "UInt8_3"]
  • ["synth_imgs", "UInt8_4"]

Julia versioninfo

Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      Ubuntu 20.04.4 LTS
  uname: Linux 5.13.0-1021-azure #24~20.04.1-Ubuntu SMP Tue Mar 29 15:34:22 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz: 
              speed         user         nice          sys         idle          irq
       #1  2593 MHz        472 s          0 s        118 s       6638 s          0 s
       #2  2593 MHz       6399 s          0 s        418 s        462 s          0 s
       
  Memory: 6.783611297607422 GB (3599.41015625 MB free)
  Uptime: 731.34 sec
  Load Avg:  1.09  0.99  0.62
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake-avx512)

Baseline result

Benchmark Report for /home/runner/work/PNGFiles.jl/PNGFiles.jl

Job Properties

  • Time of benchmark: 27 Apr 2022 - 14:25
  • Package commit: b886fb
  • Julia commit: bf5349
  • Julia command flags: None
  • Environment variables: None

Results

Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the ID column have the structure [parent_group, child_group, ..., key], and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.

ID time GC time memory allocations
["synth_imgs", "ARGB32", "load"] 417.405 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "ARGB32", "save"] 2.295 ms (5%) 256.16 KiB (1%) 5
["synth_imgs", "Bool_0", "load"] 456.303 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Bool_0", "save"] 554.603 μs (5%) 64.94 KiB (1%) 6
["synth_imgs", "Bool_1", "load"] 456.305 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Bool_1", "save"] 557.906 μs (5%) 65.11 KiB (1%) 11
["synth_imgs", "Bool_2", "load"] 723.008 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "Bool_2", "save"] 1.262 ms (5%) 192.53 KiB (1%) 10
["synth_imgs", "Bool_3", "load"] 858.610 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "Bool_3", "save"] 1.881 ms (5%) 288.16 KiB (1%) 10
["synth_imgs", "Bool_4", "load"] 1.029 ms (5%) 256.64 KiB (1%) 17
["synth_imgs", "Bool_4", "save"] 2.441 ms (5%) 383.78 KiB (1%) 10
["synth_imgs", "Float64_0", "load"] 215.901 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Float64_0", "save"] 666.306 μs (5%) 64.91 KiB (1%) 5
["synth_imgs", "Float64_1", "load"] 215.902 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Float64_1", "save"] 622.106 μs (5%) 65.11 KiB (1%) 11
["synth_imgs", "Float64_2", "load"] 358.804 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "Float64_2", "save"] 1.323 ms (5%) 192.53 KiB (1%) 10
["synth_imgs", "Float64_3", "load"] 378.004 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "Float64_3", "save"] 1.953 ms (5%) 288.16 KiB (1%) 10
["synth_imgs", "Float64_4", "load"] 424.305 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "Float64_4", "save"] 2.519 ms (5%) 383.78 KiB (1%) 10
["synth_imgs", "Gray", "load"] 216.303 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Gray", "save"] 617.906 μs (5%) 64.91 KiB (1%) 5
["synth_imgs", "Gray-Float64", "load"] 215.201 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Gray-Float64", "save"] 617.402 μs (5%) 64.91 KiB (1%) 5
["synth_imgs", "Gray-N0f16", "load"] 363.404 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "Gray-N0f16", "save"] 1.148 ms (5%) 64.86 KiB (1%) 3
["synth_imgs", "Gray-N0f8", "load"] 213.802 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "Gray-N0f8", "save"] 565.507 μs (5%) 32.98 KiB (1%) 3
["synth_imgs", "GrayA", "load"] 358.304 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "GrayA", "save"] 1.241 ms (5%) 128.66 KiB (1%) 5
["synth_imgs", "GrayA-Float64", "load"] 359.704 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "GrayA-Float64", "save"] 1.240 ms (5%) 128.66 KiB (1%) 5
["synth_imgs", "GrayA-N0f16", "load"] 432.505 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "GrayA-N0f16", "save"] 2.229 ms (5%) 128.61 KiB (1%) 3
["synth_imgs", "GrayA-N0f8", "load"] 353.505 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "GrayA-N0f8", "save"] 1.141 ms (5%) 64.86 KiB (1%) 3
["synth_imgs", "N0f16_0", "load"] 363.502 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "N0f16_0", "save"] 1.185 ms (5%) 128.69 KiB (1%) 6
["synth_imgs", "N0f16_1", "load"] 364.204 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "N0f16_1", "save"] 1.189 ms (5%) 128.86 KiB (1%) 11
["synth_imgs", "N0f16_2", "load"] 443.205 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "N0f16_2", "save"] 2.334 ms (5%) 383.78 KiB (1%) 10
["synth_imgs", "N0f16_3", "load"] 1.012 ms (5%) 384.14 KiB (1%) 17
["synth_imgs", "N0f16_3", "save"] 3.541 ms (5%) 575.03 KiB (1%) 10
["synth_imgs", "N0f16_4", "load"] 1.320 ms (5%) 511.64 KiB (1%) 17
["synth_imgs", "N0f16_4", "save"] 4.755 ms (5%) 766.25 KiB (1%) 9
["synth_imgs", "N0f8_0", "load"] 213.402 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "N0f8_0", "save"] 582.406 μs (5%) 64.91 KiB (1%) 5
["synth_imgs", "N0f8_1", "load"] 213.902 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "N0f8_1", "save"] 577.506 μs (5%) 65.11 KiB (1%) 11
["synth_imgs", "N0f8_2", "load"] 356.304 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "N0f8_2", "save"] 1.223 ms (5%) 192.53 KiB (1%) 10
["synth_imgs", "N0f8_3", "load"] 383.102 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "N0f8_3", "save"] 1.811 ms (5%) 288.16 KiB (1%) 10
["synth_imgs", "N0f8_4", "load"] 430.305 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "N0f8_4", "save"] 2.343 ms (5%) 383.78 KiB (1%) 10
["synth_imgs", "RGB", "load"] 384.304 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "RGB", "save"] 1.858 ms (5%) 192.41 KiB (1%) 5
["synth_imgs", "RGB-Float64", "load"] 377.004 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "RGB-Float64", "save"] 1.854 ms (5%) 192.41 KiB (1%) 5
["synth_imgs", "RGB-N0f16", "load"] 1.012 ms (5%) 384.14 KiB (1%) 17
["synth_imgs", "RGB-N0f16", "save"] 3.400 ms (5%) 192.36 KiB (1%) 3
["synth_imgs", "RGB-N0f8", "load"] 382.306 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "RGB-N0f8", "save"] 1.712 ms (5%) 96.73 KiB (1%) 3
["synth_imgs", "RGBA", "load"] 420.104 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "RGBA", "save"] 2.402 ms (5%) 256.16 KiB (1%) 5
["synth_imgs", "RGBA-Float64", "load"] 422.305 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "RGBA-Float64", "save"] 2.400 ms (5%) 256.16 KiB (1%) 5
["synth_imgs", "RGBA-N0f16", "load"] 1.321 ms (5%) 511.64 KiB (1%) 17
["synth_imgs", "RGBA-N0f16", "save"] 4.570 ms (5%) 256.14 KiB (1%) 4
["synth_imgs", "RGBA-N0f8", "load"] 418.105 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "RGBA-N0f8", "save"] 2.214 ms (5%) 128.61 KiB (1%) 3
["synth_imgs", "UInt16_0", "load"] 363.904 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "UInt16_0", "save"] 1.154 ms (5%) 64.86 KiB (1%) 3
["synth_imgs", "UInt16_1", "load"] 363.604 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "UInt16_1", "save"] 1.163 ms (5%) 65.22 KiB (1%) 14
["synth_imgs", "UInt16_2", "load"] 444.202 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "UInt16_2", "save"] 2.284 ms (5%) 256.22 KiB (1%) 8
["synth_imgs", "UInt16_3", "load"] 994.906 μs (5%) 384.14 KiB (1%) 17
["synth_imgs", "UInt16_3", "save"] 3.495 ms (5%) 383.72 KiB (1%) 8
["synth_imgs", "UInt16_4", "load"] 1.325 ms (5%) 511.64 KiB (1%) 17
["synth_imgs", "UInt16_4", "save"] 4.685 ms (5%) 511.19 KiB (1%) 7
["synth_imgs", "UInt8_0", "load"] 213.802 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "UInt8_0", "save"] 559.605 μs (5%) 33.02 KiB (1%) 4
["synth_imgs", "UInt8_1", "load"] 212.901 μs (5%) 65.39 KiB (1%) 17
["synth_imgs", "UInt8_1", "save"] 573.703 μs (5%) 33.34 KiB (1%) 14
["synth_imgs", "UInt8_2", "load"] 352.603 μs (5%) 129.14 KiB (1%) 17
["synth_imgs", "UInt8_2", "save"] 1.190 ms (5%) 128.72 KiB (1%) 8
["synth_imgs", "UInt8_3", "load"] 382.704 μs (5%) 192.89 KiB (1%) 17
["synth_imgs", "UInt8_3", "save"] 1.766 ms (5%) 192.47 KiB (1%) 8
["synth_imgs", "UInt8_4", "load"] 421.404 μs (5%) 256.64 KiB (1%) 17
["synth_imgs", "UInt8_4", "save"] 2.275 ms (5%) 256.22 KiB (1%) 8

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • ["synth_imgs", "ARGB32"]
  • ["synth_imgs", "Bool_0"]
  • ["synth_imgs", "Bool_1"]
  • ["synth_imgs", "Bool_2"]
  • ["synth_imgs", "Bool_3"]
  • ["synth_imgs", "Bool_4"]
  • ["synth_imgs", "Float64_0"]
  • ["synth_imgs", "Float64_1"]
  • ["synth_imgs", "Float64_2"]
  • ["synth_imgs", "Float64_3"]
  • ["synth_imgs", "Float64_4"]
  • ["synth_imgs", "Gray"]
  • ["synth_imgs", "Gray-Float64"]
  • ["synth_imgs", "Gray-N0f16"]
  • ["synth_imgs", "Gray-N0f8"]
  • ["synth_imgs", "GrayA"]
  • ["synth_imgs", "GrayA-Float64"]
  • ["synth_imgs", "GrayA-N0f16"]
  • ["synth_imgs", "GrayA-N0f8"]
  • ["synth_imgs", "N0f16_0"]
  • ["synth_imgs", "N0f16_1"]
  • ["synth_imgs", "N0f16_2"]
  • ["synth_imgs", "N0f16_3"]
  • ["synth_imgs", "N0f16_4"]
  • ["synth_imgs", "N0f8_0"]
  • ["synth_imgs", "N0f8_1"]
  • ["synth_imgs", "N0f8_2"]
  • ["synth_imgs", "N0f8_3"]
  • ["synth_imgs", "N0f8_4"]
  • ["synth_imgs", "RGB"]
  • ["synth_imgs", "RGB-Float64"]
  • ["synth_imgs", "RGB-N0f16"]
  • ["synth_imgs", "RGB-N0f8"]
  • ["synth_imgs", "RGBA"]
  • ["synth_imgs", "RGBA-Float64"]
  • ["synth_imgs", "RGBA-N0f16"]
  • ["synth_imgs", "RGBA-N0f8"]
  • ["synth_imgs", "UInt16_0"]
  • ["synth_imgs", "UInt16_1"]
  • ["synth_imgs", "UInt16_2"]
  • ["synth_imgs", "UInt16_3"]
  • ["synth_imgs", "UInt16_4"]
  • ["synth_imgs", "UInt8_0"]
  • ["synth_imgs", "UInt8_1"]
  • ["synth_imgs", "UInt8_2"]
  • ["synth_imgs", "UInt8_3"]
  • ["synth_imgs", "UInt8_4"]

Julia versioninfo

Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      Ubuntu 20.04.4 LTS
  uname: Linux 5.13.0-1021-azure #24~20.04.1-Ubuntu SMP Tue Mar 29 15:34:22 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz: 
              speed         user         nice          sys         idle          irq
       #1  2593 MHz        556 s          0 s        130 s      12289 s          0 s
       #2  2593 MHz      11831 s          0 s        699 s        527 s          0 s
       
  Memory: 6.783611297607422 GB (3469.35546875 MB free)
  Uptime: 1309.11 sec
  Load Avg:  1.02  1.03  0.83
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake-avx512)

Runtime information

Runtime Info
BLAS #threads 2
BLAS.vendor() openblas64
Sys.CPU_THREADS 2

lscpu output:

Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   46 bits physical, 48 bits virtual
CPU(s):                          2
On-line CPU(s) list:             0,1
Thread(s) per core:              1
Core(s) per socket:              2
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           85
Model name:                      Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
Stepping:                        7
CPU MHz:                         2593.908
BogoMIPS:                        5187.81
Hypervisor vendor:               Microsoft
Virtualization type:             full
L1d cache:                       64 KiB
L1i cache:                       64 KiB
L2 cache:                        2 MiB
L3 cache:                        35.8 MiB
NUMA node0 CPU(s):               0,1
Vulnerability Itlb multihit:     KVM: Mitigation: VMX unsupported
Vulnerability L1tf:              Mitigation; PTE Inversion
Vulnerability Mds:               Mitigation; Clear CPU buffers; SMT Host state unknown
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Retpolines, STIBP disabled, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Mitigation; Clear CPU buffers; SMT Host state unknown
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt avx512cd avx512bw avx512vl xsaveopt xsavec xsaves md_clear
Cpu Property Value
Brand Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
Vendor :Intel
Architecture :Skylake
Model Family: 0x06, Model: 0x55, Stepping: 0x07, Type: 0x00
Cores 2 physical cores, 2 logical cores (on executing CPU)
No Hyperthreading hardware capability detected
Clock Frequencies Not supported by CPU
Data Cache Level 1:3 : (32, 1024, 36608) kbytes
64 byte cache line size
Address Size 48 bits virtual, 46 bits physical
SIMD 512 bit = 64 byte max. SIMD vector size
Time Stamp Counter TSC is accessible via rdtsc
TSC increased at every clock cycle (non-invariant TSC)
Perf. Monitoring Performance Monitoring Counters (PMC) are not supported
Hypervisor Yes, Microsoft

Copy link
Member

@Drvi Drvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@johnnychen94 johnnychen94 merged commit 370dd32 into master Apr 27, 2022
@johnnychen94 johnnychen94 deleted the jc/indexed branch April 27, 2022 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants