Skip to content

Conversation

@aviatesk
Copy link
Owner

This PR set-ups ignored_patterns interface to ignore certain patterns
of reports, which can be configured by users extensively.

ignored_patterns is supposed to be an iterator of predicate function
and if any of given ignored_patterns matches a report in question,
the report will just be ignored (and nor cached).
The predicate function will be called before a report is actually
constructed for the possible cut-off of the computational cost to
construct the report. Thus its signature is: (T::Type{<:InferenceErrorReport}, interp::JETInterpreter, sv::InferenceState, spec_args::Tuple), where:

  • T specifies the kind of report
  • interp gives the context of whole analysis
  • sv::InferenceState gives the local context of analysis
  • and spec_args will be report-specific arguments

To inject predicate checks, now each report is constructed via @report!
macro, which first checks if the report matches any of ignored_patterns,
and if not, constructs the report and pushes it to JETInterpreter as
the previous report! function did.

This PR also defines DEFAULT_IGNORED_PATTERNS, namely ignored_patterns
applied by default. Currently it consists of ignore_corecompiler_undefglobal,
which ignores undefined global names in Core.Compiler, and it should
have some positive effects, like reduce false positive error reports
involved with Base.return_types and its family in general, improve
analysis performance for JET's self-profiling, etc.

The support of user-predicate functions specified via .JET configuration
file is somewhat tricky, but currently this PR uses RuntimeGeneratedFunctions.jl
and it seems to work. I'm not sure if @nospecialize notations works
correctly in RuntimeGeneratedFunctions, so some insights or benchmarks
on it will be very welcomed.

@aviatesk aviatesk force-pushed the ignore branch 2 times, most recently from 16a6ef4 to 6c17ab3 Compare May 27, 2021 18:44
@codecov-commenter
Copy link

codecov-commenter commented May 27, 2021

Codecov Report

Merging #204 (66ffa27) into master (ceb5026) will increase coverage by 0.14%.
The diff coverage is 98.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #204      +/-   ##
==========================================
+ Coverage   87.35%   87.50%   +0.14%     
==========================================
  Files          12       12              
  Lines        1542     1568      +26     
==========================================
+ Hits         1347     1372      +25     
- Misses        195      196       +1     
Impacted Files Coverage Δ
src/abstractinterpreterinterface.jl 72.27% <96.42%> (+7.34%) ⬆️
src/JET.jl 73.21% <100.00%> (ø)
src/abstractinterpretation.jl 95.47% <100.00%> (ø)
src/reports.jl 90.10% <100.00%> (ø)
src/tfuncs.jl 98.11% <100.00%> (ø)
src/typeinfer.jl 90.81% <100.00%> (ø)
src/virtualprocess.jl 98.10% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ceb5026...66ffa27. Read the comment docs.

@aviatesk aviatesk force-pushed the ignore branch 2 times, most recently from 362c2f3 to 3c9f852 Compare May 28, 2021 04:04
@aviatesk aviatesk changed the title wip: fix #203, allow configurations to ignore reports wip: fix #203, setup configuration interface to ignore reports May 28, 2021
@aviatesk aviatesk force-pushed the ignore branch 2 times, most recently from 07cb770 to 46db6a5 Compare May 29, 2021 05:18
Repository owner deleted a comment from github-actions bot May 29, 2021
@github-actions
Copy link

github-actions bot commented May 29, 2021

JET Benchmark Result

Judge result

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

Job Properties

  • Time of benchmarks:
  • Target: 29 May 2021 - 07:59
  • Baseline: 29 May 2021 - 08:17
  • Package commits:
  • Target: 59a27d
  • Baseline: 53c14f
  • Julia commits:
  • Target: fb42ea
  • Baseline: fb42ea
  • 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
["a bit complex"] 1.10 (5%) ❌ 1.00 (1%)
["cached easy"] 3.02 (5%) ❌ 1.00 (1%)
["end to end"] 1.03 (5%) 0.07 (1%) ✅
["self analysis"] 0.94 (5%) ✅ 1.00 (1%)

Benchmark Group List

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

  • []

Julia versioninfo

Target

Julia Version 1.7.0-DEV.1195
Commit fb42ea57c2 (2021-05-29 03:53 UTC)
Platform Info:
 OS: Linux (x86_64-pc-linux-gnu)
 Ubuntu 20.04.2 LTS
 uname: Linux 5.4.0-1047-azure #49-Ubuntu SMP Thu Apr 22 14:30:37 UTC 2021 x86_64 x86_64
 CPU: Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz: 
 speed user nice sys idle irq
 #1 2397 MHz 6206 s 2 s 351 s 6954 s 0 s
 #2 2397 MHz 6416 s 0 s 377 s 6742 s 0 s
 
 Memory: 6.791339874267578 GB (3799.72265625 MB free)
 Uptime: 1360.0 sec
 Load Avg: 1.0 1.05 0.89
 WORD_SIZE: 64
 LIBM: libopenlibm
 LLVM: libLLVM-12.0.0 (ORCJIT, haswell)

Baseline

Julia Version 1.7.0-DEV.1195
Commit fb42ea57c2 (2021-05-29 03:53 UTC)
Platform Info:
 OS: Linux (x86_64-pc-linux-gnu)
 Ubuntu 20.04.2 LTS
 uname: Linux 5.4.0-1047-azure #49-Ubuntu SMP Thu Apr 22 14:30:37 UTC 2021 x86_64 x86_64
 CPU: Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz: 
 speed user nice sys idle irq
 #1 2397 MHz 11974 s 2 s 588 s 12004 s 0 s
 #2 2397 MHz 11784 s 0 s 610 s 12194 s 0 s
 
 Memory: 6.791339874267578 GB (3636.984375 MB free)
 Uptime: 2469.0 sec
 Load Avg: 1.02 1.06 1.01
 WORD_SIZE: 64
 LIBM: libopenlibm
 LLVM: libLLVM-12.0.0 (ORCJIT, haswell)

Target result

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

Job Properties

  • Time of benchmark: 29 May 2021 - 7:59
  • Package commit: 59a27d
  • Julia commit: fb42ea
  • 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
["a bit complex"] 9.348 s (5%) 704 bytes (1%) 18
["cached easy"] 14.903 ms (5%) 704 bytes (1%) 18
["easy"] 1.864 s (5%) 704 bytes (1%) 18
["end to end"] 18.468 s (5%) 9.28 KiB (1%) 234
["first time"] 5.390 s (5%) 1.00 KiB (1%) 20
["invalidation"] 6.021 s (5%) 1.03 KiB (1%) 30
["package loading"] 328.159 ms (5%) 704 bytes (1%) 19
["self analysis"] 23.127 s (5%) 928 bytes (1%) 18
["top-level first time"] 11.113 s (5%) 1.89 KiB (1%) 20
["top-level"] 10.215 s (5%) 1.03 KiB (1%) 18

Benchmark Group List

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

  • []

Julia versioninfo

Julia Version 1.7.0-DEV.1195
Commit fb42ea57c2 (2021-05-29 03:53 UTC)
Platform Info:
 OS: Linux (x86_64-pc-linux-gnu)
 Ubuntu 20.04.2 LTS
 uname: Linux 5.4.0-1047-azure #49-Ubuntu SMP Thu Apr 22 14:30:37 UTC 2021 x86_64 x86_64
 CPU: Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz: 
 speed user nice sys idle irq
 #1 2397 MHz 6206 s 2 s 351 s 6954 s 0 s
 #2 2397 MHz 6416 s 0 s 377 s 6742 s 0 s
 
 Memory: 6.791339874267578 GB (3799.72265625 MB free)
 Uptime: 1360.0 sec
 Load Avg: 1.0 1.05 0.89
 WORD_SIZE: 64
 LIBM: libopenlibm
 LLVM: libLLVM-12.0.0 (ORCJIT, haswell)

Baseline result

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

Job Properties

  • Time of benchmark: 29 May 2021 - 8:17
  • Package commit: 53c14f
  • Julia commit: fb42ea
  • 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
["a bit complex"] 8.464 s (5%) 704 bytes (1%) 18
["cached easy"] 4.940 ms (5%) 704 bytes (1%) 18
["easy"] 1.875 s (5%) 704 bytes (1%) 18
["end to end"] 17.958 s (5%) 136.75 KiB (1%) 225
["first time"] 5.494 s (5%) 1.00 KiB (1%) 20
["invalidation"] 6.292 s (5%) 1.03 KiB (1%) 30
["package loading"] 335.918 ms (5%) 704 bytes (1%) 19
["self analysis"] 24.525 s (5%) 928 bytes (1%) 18
["top-level first time"] 10.778 s (5%) 1.89 KiB (1%) 20
["top-level"] 10.489 s (5%) 1.03 KiB (1%) 18

Benchmark Group List

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

  • []

Julia versioninfo

Julia Version 1.7.0-DEV.1195
Commit fb42ea57c2 (2021-05-29 03:53 UTC)
Platform Info:
 OS: Linux (x86_64-pc-linux-gnu)
 Ubuntu 20.04.2 LTS
 uname: Linux 5.4.0-1047-azure #49-Ubuntu SMP Thu Apr 22 14:30:37 UTC 2021 x86_64 x86_64
 CPU: Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz: 
 speed user nice sys idle irq
 #1 2397 MHz 11974 s 2 s 588 s 12004 s 0 s
 #2 2397 MHz 11784 s 0 s 610 s 12194 s 0 s
 
 Memory: 6.791339874267578 GB (3636.984375 MB free)
 Uptime: 2469.0 sec
 Load Avg: 1.02 1.06 1.01
 WORD_SIZE: 64
 LIBM: libopenlibm
 LLVM: libLLVM-12.0.0 (ORCJIT, haswell)

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: 63
Model name: Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
Stepping: 2
CPU MHz: 2397.224
BogoMIPS: 4794.44
Hypervisor vendor: Microsoft
Virtualization type: full
L1d cache: 64 KiB
L1i cache: 64 KiB
L2 cache: 512 KiB
L3 cache: 30 MiB
NUMA node0 CPU(s): 0,1
Vulnerability Itlb multihit: KVM: Vulnerable
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; Full generic retpoline, STIBP disabled, RSB filling
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
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 invpcid_single pti fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt md_clear

Cpu Property Value
Brand Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
Vendor :Intel
Architecture :Haswell
Model Family: 0x06, Model: 0x3f, Stepping: 0x02, 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, 256, 30720) kbytes
64 byte cache line size
Address Size 48 bits virtual, 46 bits physical
SIMD 256 bit = 32 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
JET Benchmark Result

Judge result

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

Job Properties

  • Time of benchmarks:
  • Target: 29 May 2021 - 12:59
  • Baseline: 29 May 2021 - 13:17
  • Package commits:
  • Target: 84acc1
  • Baseline: ceb502
  • Julia commits:
  • Target: 840246
  • Baseline: 840246
  • 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
["a bit complex"] 1.10 (5%) ❌ 1.00 (1%)
["cached easy"] 3.04 (5%) ❌ 1.00 (1%)
["end to end"] 1.05 (5%) ❌ 1.00 (1%)
["top-level first time"] 1.08 (5%) ❌ 1.00 (1%)

Benchmark Group List

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

  • []

Julia versioninfo

Target

Julia Version 1.7.0-DEV.1197
Commit 8402463c93 (2021-05-29 04:28 UTC)
Platform Info:
 OS: Linux (x86_64-pc-linux-gnu)
 Ubuntu 20.04.2 LTS
 uname: Linux 5.4.0-1047-azure #49-Ubuntu SMP Thu Apr 22 14:30:37 UTC 2021 x86_64 x86_64
 CPU: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz: 
 speed user nice sys idle irq
 #1 2593 MHz 5804 s 1 s 346 s 5788 s 0 s
 #2 2593 MHz 5981 s 1 s 368 s 5587 s 0 s
 
 Memory: 6.791339874267578 GB (3795.97265625 MB free)
 Uptime: 1199.0 sec
 Load Avg: 1.0 1.0 0.82
 WORD_SIZE: 64
 LIBM: libopenlibm
 LLVM: libLLVM-12.0.0 (ORCJIT, skylake-avx512)

Baseline

Julia Version 1.7.0-DEV.1197
Commit 8402463c93 (2021-05-29 04:28 UTC)
Platform Info:
 OS: Linux (x86_64-pc-linux-gnu)
 Ubuntu 20.04.2 LTS
 uname: Linux 5.4.0-1047-azure #49-Ubuntu SMP Thu Apr 22 14:30:37 UTC 2021 x86_64 x86_64
 CPU: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz: 
 speed user nice sys idle irq
 #1 2593 MHz 11185 s 1 s 612 s 10832 s 0 s
 #2 2593 MHz 11396 s 1 s 632 s 10604 s 0 s
 
 Memory: 6.791339874267578 GB (3625.6796875 MB free)
 Uptime: 2270.0 sec
 Load Avg: 1.08 1.08 1.01
 WORD_SIZE: 64
 LIBM: libopenlibm
 LLVM: libLLVM-12.0.0 (ORCJIT, skylake-avx512)

Target result

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

Job Properties

  • Time of benchmark: 29 May 2021 - 12:59
  • Package commit: 84acc1
  • Julia commit: 840246
  • 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
["a bit complex"] 6.435 s (5%) 704 bytes (1%) 18
["cached easy"] 11.827 ms (5%) 704 bytes (1%) 18
["easy"] 1.328 s (5%) 704 bytes (1%) 18
["end to end"] 12.989 s (5%) 138.56 KiB (1%) 293
["first time"] 3.824 s (5%) 1.00 KiB (1%) 20
["invalidation"] 4.277 s (5%) 1.03 KiB (1%) 30
["package loading"] 261.190 ms (5%) 704 bytes (1%) 19
["self analysis"] 15.467 s (5%) 928 bytes (1%) 18
["top-level first time"] 7.944 s (5%) 1.89 KiB (1%) 20
["top-level"] 7.067 s (5%) 1.03 KiB (1%) 18

Benchmark Group List

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

  • []

Julia versioninfo

Julia Version 1.7.0-DEV.1197
Commit 8402463c93 (2021-05-29 04:28 UTC)
Platform Info:
 OS: Linux (x86_64-pc-linux-gnu)
 Ubuntu 20.04.2 LTS
 uname: Linux 5.4.0-1047-azure #49-Ubuntu SMP Thu Apr 22 14:30:37 UTC 2021 x86_64 x86_64
 CPU: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz: 
 speed user nice sys idle irq
 #1 2593 MHz 5804 s 1 s 346 s 5788 s 0 s
 #2 2593 MHz 5981 s 1 s 368 s 5587 s 0 s
 
 Memory: 6.791339874267578 GB (3795.97265625 MB free)
 Uptime: 1199.0 sec
 Load Avg: 1.0 1.0 0.82
 WORD_SIZE: 64
 LIBM: libopenlibm
 LLVM: libLLVM-12.0.0 (ORCJIT, skylake-avx512)

Baseline result

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

Job Properties

  • Time of benchmark: 29 May 2021 - 13:17
  • Package commit: ceb502
  • Julia commit: 840246
  • 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
["a bit complex"] 5.830 s (5%) 704 bytes (1%) 18
["cached easy"] 3.891 ms (5%) 704 bytes (1%) 18
["easy"] 1.313 s (5%) 704 bytes (1%) 18
["end to end"] 12.332 s (5%) 138.36 KiB (1%) 284
["first time"] 3.797 s (5%) 1.00 KiB (1%) 20
["invalidation"] 4.330 s (5%) 1.03 KiB (1%) 30
["package loading"] 261.050 ms (5%) 704 bytes (1%) 19
["self analysis"] 16.061 s (5%) 928 bytes (1%) 18
["top-level first time"] 7.325 s (5%) 1.89 KiB (1%) 20
["top-level"] 7.073 s (5%) 1.03 KiB (1%) 18

Benchmark Group List

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

  • []

Julia versioninfo

Julia Version 1.7.0-DEV.1197
Commit 8402463c93 (2021-05-29 04:28 UTC)
Platform Info:
 OS: Linux (x86_64-pc-linux-gnu)
 Ubuntu 20.04.2 LTS
 uname: Linux 5.4.0-1047-azure #49-Ubuntu SMP Thu Apr 22 14:30:37 UTC 2021 x86_64 x86_64
 CPU: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz: 
 speed user nice sys idle irq
 #1 2593 MHz 11185 s 1 s 612 s 10832 s 0 s
 #2 2593 MHz 11396 s 1 s 632 s 10604 s 0 s
 
 Memory: 6.791339874267578 GB (3625.6796875 MB free)
 Uptime: 2270.0 sec
 Load Avg: 1.08 1.08 1.01
 WORD_SIZE: 64
 LIBM: libopenlibm
 LLVM: libLLVM-12.0.0 (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.907
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: Vulnerable
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; Full generic retpoline, 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

aviatesk added 2 commits June 1, 2021 14:59
This PR set-ups `ignored_patterns` interface to ignore certain patterns
of reports, which can be configured by users extensively.

`ignored_patterns` is supposed to be an iterator of predicate function
and if any of given `ignored_patterns` matches a report in question,
the report will just be ignored (and nor cached).
The predicate function will be called _before_ a report is actually
constructed for the possible cut-off of the computational cost to
construct the report. Thus its signature is:
`(T::Type{<:InferenceErrorReport}, interp::JETInterpreter, sv::InferenceState, spec_args::Tuple)`, where:
- `T` specifies the kind of report
- `interp` gives the context of whole analysis
- `sv::InferenceState` gives the local context of analysis
- and `spec_args` will be report-specific arguments

To inject predicate checks, now each report is constructed via `@report!`
macro, which first checks if the report matches any of `ignored_patterns`,
and if not, constructs the report and pushes it to `JETInterpreter` as
the previous `report!` function did.

This PR also defines `DEFAULT_IGNORED_PATTERNS`, namely `ignored_patterns`
applied by default. Currently it consists of `ignore_corecompiler_undefglobal`,
which ignores undefined global names in `Core.Compiler`, and it should
have some positive effects, like reduce false positive error reports
involved with `Base.return_types` and its family in general, improve
analysis performance for JET's self-profiling, etc.

The support of user-predicate functions specified via .JET configuration
file is somewhat tricky, but currently this PR uses RuntimeGeneratedFunctions.jl
and it seems to work. I'm not sure if `@nospecialize` notations works
correctly in `RuntimeGeneratedFunction`s, so some insights or benchmarks
on it will be very welcomed.
aviatesk added a commit that referenced this pull request Jun 1, 2021
This is an alternative for #204, and will supersedes it.

This PR setups `report_pass::ReportPass` interface, which controls
overall `JETInterpreter`'s error report analysis and can be extensively
configured by trait overloads; now users can implement their own report
pass and set up new report logic, ignore existing reports, etc.
By default, JET offers `BasicPass<:ReportPass` and `SoundPass<:ReportPass`,
but the latter is still in very WIP.

Also, the configuration support via TOML file would be really hard given
this PR. I think we will move to Julia file based configuration support.

This interface also suggests the possibility of pluggable analysis
requested #169, by allowing users to subtype `JETInterpreter`.

The changes are kinda really big, and so maybe I will focus on coding in
this PR and leave documentation and examples to another PR.
aviatesk added a commit that referenced this pull request Jun 1, 2021
This is an alternative for #204, and will supersedes it.

This PR setups `report_pass::ReportPass` interface, which controls
overall `JETInterpreter`'s error report analysis and can be extensively
configured by trait overloads; now users can implement their own report
pass and set up new report logic, ignore existing reports, etc.
By default, JET offers `BasicPass<:ReportPass` and
`SoundPass<:ReportPass`,
but the latter is still in very WIP.

Also, the configuration support via TOML file would be really hard given
this PR. I think we will move to Julia file based configuration support.

This interface also suggests the possibility of pluggable analysis
requested #169, by allowing users to subtype `JETInterpreter`.

The changes are kinda really big, and so maybe I will focus on coding in
this PR and leave documentation and examples to another PR.
aviatesk added a commit that referenced this pull request Jun 2, 2021
This is an alternative for #204, and will supersedes it.

This PR setups `report_pass::ReportPass` interface, which controls
overall `JETInterpreter`'s error report analysis and can be extensively
configured by trait overloads; now users can implement their own report
pass and set up new report logic, ignore existing reports, etc.
By default, JET offers `BasicPass<:ReportPass` and
`SoundPass<:ReportPass`,
but the latter is still in very WIP.

Also, the configuration support via TOML file would be really hard given
this PR. I think we will move to Julia file based configuration support.

This interface also suggests the possibility of pluggable analysis
requested #169, by allowing users to subtype `JETInterpreter`.

The changes are kinda really big, and so maybe I will focus on coding in
this PR and leave documentation and examples to another PR.
@aviatesk aviatesk closed this Jun 2, 2021
@aviatesk aviatesk reopened this Jun 2, 2021
aviatesk added a commit that referenced this pull request Jun 3, 2021
This is an alternative for #204, and will supersedes it.

This PR setups `report_pass::ReportPass` interface, which controls
overall `JETInterpreter`'s error report analysis and can be extensively
configured by trait overloads; now users can implement their own report
pass and set up new report logic, ignore existing reports, etc.
By default, JET offers `BasicPass<:ReportPass` and
`SoundPass<:ReportPass`,
but the latter is still in very WIP.

Also, the configuration support via TOML file would be really hard given
this PR. I think we will move to Julia file based configuration support.

This interface also suggests the possibility of pluggable analysis
requested #169, by allowing users to subtype `JETInterpreter`.

The changes are kinda really big, and so maybe I will focus on coding in
this PR and leave documentation and examples to another PR.
@aviatesk
Copy link
Owner Author

aviatesk commented Jun 3, 2021

Closing this in a favor of #208

@aviatesk aviatesk closed this Jun 3, 2021
@aviatesk aviatesk deleted the ignore branch June 3, 2021 05:30
aviatesk added a commit that referenced this pull request Jun 3, 2021
This is an alternative for #204, and will supersedes it.

This PR setups both `ReportPass` and `AbstractAnalyzer` interfaces.
The former allow us to extensibly customize JET's default analysis (error detection),
and the latter enables us to implement arbitrary pluggable analysis.

By using `ReportPass` interface, now users can set up new report 
construction logic, ignore existing reports, etc., by implementing a new
report pass.
By default, JET implements `BasicPass<:ReportPass` and `SoundPass<:ReportPass`,
which I believe their names are enough descriptive, but the latter is 
still in very WIP.

The `AbstractAnalyzer` interface allows more extensive customization, 
and enables pluggable analysis as requested #169.
Now we can implement arbitrary new analyzer, which may implement its 
own abstract interpretation based analysis, while still utilizing 
JET's report cache logic and top-level analysis logic, etc.
The example plugin analyzers are kept in `/examples` directory, and also
included into the documentation.

One limitation to notice is that we still can't implement our own lattice
logic, and thus the `AbstractAnalyzer` interface can't analyze stuff that
can't be expressed by the lattice implementation designed for type 
inference and optimization performed by Julia compiler.
This should be addressed in upstream, especially as requested at <JuliaLang/julia#40992>

---

The changes are kinda really big, and so I focused on coding in this PR
and leave documentation update and more example implementations to 
another PR.

Also now TOML based configuration won't fit given the overload-based 
customizations enabled by this PR, so we will move to Julia format based
configuration support in the future.

---

* fix #203, setup report passes, enable customized report strategies

* fix #169, implement experimental pluggable analysis interface (#209)

* fix #169, implement experimental pluggable analysis interface

* example: find_unstable_api.jl

* wip: include plugins documentation

* setup `JETInterfaces`, which allows to use the pluggable analysis framework more easily

* API docs

* add simple tests for the pluggable-analysis framework
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.

3 participants