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

fix planar error #414

Merged
merged 4 commits into from
May 14, 2024
Merged

fix planar error #414

merged 4 commits into from
May 14, 2024

Conversation

prbzrg
Copy link
Member

@prbzrg prbzrg commented May 14, 2024

No description provided.

Comment on lines 1 to 11
@inline function apply_act(::typeof(identity), x::Any)
x
end

@inline function apply_act(activation::Any, x::Number)
activation(x)
end

@inline function apply_act(activation::Any, x::AbstractArray)
activation.(x)
end
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
@inline function apply_act(::typeof(identity), x::Any)
x
end
@inline function apply_act(activation::Any, x::Number)
activation(x)
end
@inline function apply_act(activation::Any, x::AbstractArray)
activation.(x)
end
@inline function apply_act(::typeof(identity), x::Any)
x
end
@inline function apply_act(activation::Any, x::Number)
activation(x)
end
@inline function apply_act(activation::Any, x::AbstractArray)
activation.(x)
end

Copy link

codecov bot commented May 14, 2024

Codecov Report

Attention: Patch coverage is 22.22222% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 85.45%. Comparing base (355fa2c) to head (539be3c).

Files Patch % Lines
src/layers/planar_layer.jl 25.00% 6 Missing ⚠️
src/layers/mul_layer.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #414   +/-   ##
=======================================
  Coverage   85.45%   85.45%           
=======================================
  Files          15       15           
  Lines         674      674           
=======================================
  Hits          576      576           
  Misses         98       98           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 1 to 11
@inline function apply_act(::typeof(identity), x::Union{Number, AbstractArray})
x
end

@inline function apply_act(activation::Function, x::Number)
activation(x)
end

@inline function apply_act(activation::Function, x::AbstractArray)
activation.(x)
end
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
@inline function apply_act(::typeof(identity), x::Union{Number, AbstractArray})
x
end
@inline function apply_act(activation::Function, x::Number)
activation(x)
end
@inline function apply_act(activation::Function, x::AbstractArray)
activation.(x)
end
@inline function apply_act(::typeof(identity), x::Union{Number, AbstractArray})
x
end
@inline function apply_act(activation::Function, x::Number)
activation(x)
end
@inline function apply_act(activation::Function, x::AbstractArray)
activation.(x)
end

@prbzrg prbzrg merged commit b45e114 into main May 14, 2024
12 of 14 checks passed
@prbzrg prbzrg deleted the fix-planar-1 branch May 14, 2024 23:51
Copy link
Contributor

Benchmark result

Judge result

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

Job Properties

  • Time of benchmarks:
    • Target: 14 May 2024 - 23:37
    • Baseline: 15 May 2024 - 01:54
  • Package commits:
    • Target: 1844e5
    • Baseline: 355fa2
  • Julia commits:
    • Target: 0b4590
    • Baseline: 0b4590
  • 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
["main", "inplace", "AD-1-order", "train"] 1.01 (5%) 1.02 (1%) ❌
["main", "no_inplace", "AD-1-order", "train"] 1.00 (5%) 0.95 (1%) ✅

Benchmark Group List

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

  • ["main", "inplace", "AD-1-order"]
  • ["main", "inplace", "direct"]
  • ["main", "no_inplace", "AD-1-order"]
  • ["main", "no_inplace", "direct"]

Julia versioninfo

Target

Julia Version 1.10.3
Commit 0b4590a5507 (2024-04-30 10:59 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.4 LTS
  uname: Linux 6.5.0-1018-azure #19~22.04.2-Ubuntu SMP Thu Mar 21 16:45:46 UTC 2024 x86_64 x86_64
  CPU: AMD EPYC 7763 64-Core Processor: 
              speed         user         nice          sys         idle          irq
       #1  2533 MHz      22724 s          0 s       1552 s      68033 s          0 s
       #2  3203 MHz      25388 s          0 s       1677 s      65264 s          0 s
       #3  3243 MHz      24685 s          0 s       1513 s      66132 s          0 s
       #4  2445 MHz      26953 s          0 s       1600 s      63780 s          0 s
  Memory: 15.606494903564453 GB (12069.671875 MB free)
  Uptime: 9252.86 sec
  Load Avg:  1.0  1.0  1.0
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

Baseline

Julia Version 1.10.3
Commit 0b4590a5507 (2024-04-30 10:59 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.4 LTS
  uname: Linux 6.5.0-1018-azure #19~22.04.2-Ubuntu SMP Thu Mar 21 16:45:46 UTC 2024 x86_64 x86_64
  CPU: AMD EPYC 7763 64-Core Processor: 
              speed         user         nice          sys         idle          irq
       #1  2445 MHz      42492 s          0 s       2680 s     129216 s          0 s
       #2  3208 MHz      48266 s          0 s       2874 s     123290 s          0 s
       #3  3241 MHz      43153 s          0 s       2641 s     128623 s          0 s
       #4  3258 MHz      46638 s          0 s       2694 s     125091 s          0 s
  Memory: 15.606494903564453 GB (11877.8828125 MB free)
  Uptime: 17478.45 sec
  Load Avg:  1.04  1.03  1.0
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

Target result

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

Job Properties

  • Time of benchmark: 14 May 2024 - 23:37
  • Package commit: 1844e5
  • Julia commit: 0b4590
  • 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
["main", "inplace", "AD-1-order", "test"] 216.678 s (5%) 8.359 s 290.25 GiB (1%) 733770321
["main", "inplace", "AD-1-order", "train"] 30.524 s (5%) 835.656 ms 34.28 GiB (1%) 122209900
["main", "inplace", "direct", "test"] 37.583 ms (5%) 56.36 MiB (1%) 138576
["main", "inplace", "direct", "train"] 5.169 ms (5%) 6.07 MiB (1%) 20782
["main", "no_inplace", "AD-1-order", "test"] 849.255 s (5%) 42.369 s 3323.57 GiB (1%) 2231461917
["main", "no_inplace", "AD-1-order", "train"] 340.458 s (5%) 25.359 s 2792.13 GiB (1%) 319576153
["main", "no_inplace", "direct", "test"] 38.683 ms (5%) 63.66 MiB (1%) 141330
["main", "no_inplace", "direct", "train"] 6.385 ms (5%) 14.19 MiB (1%) 23230

Benchmark Group List

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

  • ["main", "inplace", "AD-1-order"]
  • ["main", "inplace", "direct"]
  • ["main", "no_inplace", "AD-1-order"]
  • ["main", "no_inplace", "direct"]

Julia versioninfo

Julia Version 1.10.3
Commit 0b4590a5507 (2024-04-30 10:59 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.4 LTS
  uname: Linux 6.5.0-1018-azure #19~22.04.2-Ubuntu SMP Thu Mar 21 16:45:46 UTC 2024 x86_64 x86_64
  CPU: AMD EPYC 7763 64-Core Processor: 
              speed         user         nice          sys         idle          irq
       #1  2533 MHz      22724 s          0 s       1552 s      68033 s          0 s
       #2  3203 MHz      25388 s          0 s       1677 s      65264 s          0 s
       #3  3243 MHz      24685 s          0 s       1513 s      66132 s          0 s
       #4  2445 MHz      26953 s          0 s       1600 s      63780 s          0 s
  Memory: 15.606494903564453 GB (12069.671875 MB free)
  Uptime: 9252.86 sec
  Load Avg:  1.0  1.0  1.0
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

Baseline result

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

Job Properties

  • Time of benchmark: 15 May 2024 - 1:54
  • Package commit: 355fa2
  • Julia commit: 0b4590
  • 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
["main", "inplace", "AD-1-order", "test"] 222.274 s (5%) 8.274 s 290.25 GiB (1%) 733770873
["main", "inplace", "AD-1-order", "train"] 30.212 s (5%) 869.542 ms 33.60 GiB (1%) 119799237
["main", "inplace", "direct", "test"] 37.876 ms (5%) 56.36 MiB (1%) 138576
["main", "inplace", "direct", "train"] 5.203 ms (5%) 6.07 MiB (1%) 20782
["main", "no_inplace", "AD-1-order", "test"] 855.600 s (5%) 41.472 s 3323.57 GiB (1%) 2231461916
["main", "no_inplace", "AD-1-order", "train"] 341.697 s (5%) 33.178 s 2931.44 GiB (1%) 335516100
["main", "no_inplace", "direct", "test"] 39.301 ms (5%) 63.66 MiB (1%) 141330
["main", "no_inplace", "direct", "train"] 6.526 ms (5%) 14.19 MiB (1%) 23230

Benchmark Group List

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

  • ["main", "inplace", "AD-1-order"]
  • ["main", "inplace", "direct"]
  • ["main", "no_inplace", "AD-1-order"]
  • ["main", "no_inplace", "direct"]

Julia versioninfo

Julia Version 1.10.3
Commit 0b4590a5507 (2024-04-30 10:59 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.4 LTS
  uname: Linux 6.5.0-1018-azure #19~22.04.2-Ubuntu SMP Thu Mar 21 16:45:46 UTC 2024 x86_64 x86_64
  CPU: AMD EPYC 7763 64-Core Processor: 
              speed         user         nice          sys         idle          irq
       #1  2445 MHz      42492 s          0 s       2680 s     129216 s          0 s
       #2  3208 MHz      48266 s          0 s       2874 s     123290 s          0 s
       #3  3241 MHz      43153 s          0 s       2641 s     128623 s          0 s
       #4  3258 MHz      46638 s          0 s       2694 s     125091 s          0 s
  Memory: 15.606494903564453 GB (11877.8828125 MB free)
  Uptime: 17478.45 sec
  Load Avg:  1.04  1.03  1.0
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)

Runtime information

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

lscpu output:

Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Address sizes:                      48 bits physical, 48 bits virtual
Byte Order:                         Little Endian
CPU(s):                             4
On-line CPU(s) list:                0-3
Vendor ID:                          AuthenticAMD
Model name:                         AMD EPYC 7763 64-Core Processor
CPU family:                         25
Model:                              1
Thread(s) per core:                 2
Core(s) per socket:                 2
Socket(s):                          1
Stepping:                           1
BogoMIPS:                           4890.83
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext invpcid_single vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr rdpru arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload umip vaes vpclmulqdq rdpid fsrm
Virtualization:                     AMD-V
Hypervisor vendor:                  Microsoft
Virtualization type:                full
L1d cache:                          64 KiB (2 instances)
L1i cache:                          64 KiB (2 instances)
L2 cache:                           1 MiB (2 instances)
L3 cache:                           32 MiB (1 instance)
NUMA node(s):                       1
NUMA node0 CPU(s):                  0-3
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      Not affected
Vulnerability Retbleed:             Not affected
Vulnerability Spec rstack overflow: Vulnerable: Safe RET, no microcode
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, PBRSB-eIBRS Not affected
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected
Cpu Property Value
Brand AMD EPYC 7763 64-Core Processor
Vendor :AMD
Architecture :Unknown
Model Family: 0xaf, Model: 0x01, Stepping: 0x01, Type: 0x00
Cores 16 physical cores, 16 logical cores (on executing CPU)
No Hyperthreading hardware capability detected
Clock Frequencies Not supported by CPU
Data Cache Level 1:3 : (32, 512, 32768) kbytes
64 byte cache line size
Address Size 48 bits virtual, 48 bits physical
SIMD 256 bit = 32 byte max. SIMD vector size
Time Stamp Counter TSC is accessible via rdtsc
TSC runs at constant rate (invariant from clock frequency)
Perf. Monitoring Performance Monitoring Counters (PMC) are not supported
Hypervisor Yes, Microsoft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant