Computational species "bw filter simplified less" (CID=45741e3fbcf4024b:1db78910464c9d05)
Contents
Notes
This computation species (kernel) is a threshold filter (CID=45741e3fbcf4024b:1db78910464c9d05) - it is used in image processing and neuron activation functions (part of artificial neural networks).
Some cost-aware experiments (execution time, size, energy, compilation time) performed by Grigori Fursin using Collective Mind framework and artifacts from the public repository to be reproducible. It supports our collaborative research on continuous performance tracking, code optimization and compiler benchmarking (regression detection). If you find any mistakes or would like to extend this page, please help us!
cM repositories online:
- Part1: download repo from github , browse repo at cMind , view nteractive graphs at cMind
- Part2: download repo from github , browse repo at cMind , view interactive graphs at cMind
- Part3: download repo from github , browse repo at cMind , view interactive graphs at cMind
Used artifacts
Datasets
- D1 = grayscale image 1 (CID=8a7141c59cd335f5:c8848a1b1fb1775e), size=1536x1536~2.4E6 (pixels or neurons)
- D2 = grayscale image 2 (CID=8a7141c59cd335f5:0045c9b59e84318b), size=1536x1536~2.4E6 (pixels or neurons)
Systems
- S1 = Dell Laptop Latitude E6320, Processor=P1, Memory = 8Gb, Storage=256Gb (SSD), Max power consumption=52W, Cost (year of purchase 2011)~1200 euros (CID=cb7e6b406491a11c:0d84339816de0271)
- S2 = Samsung Mobile Galaxy Duos GT-S6312, Processor=P2, Memory = 0.8Gb, Storage=4Gb, Battery=1300 mAh / 3.9V / up to 250 hours, Max power consumption~5W, Cost (year of purchase 2013)~200 euros (CID=cb7e6b406491a11c:a9740acbe06bcd1e)
- S3 = Polaroid Tablet Executive 9" MID0927, Processor=P3, Memory=1Gb, Storage=16Gb, Battery=3500 mAh / 3.9V / up to 80 hours, Max power consumption~13W, Cost (year of purchase 2014)~100 euros (CID=cb7e6b406491a11c:3419444faf22f3d0)
- S4 = Semiconductor neural network, PSpice simulation (year of development = 1993-1997)
Processors
- P1 = Intel Core i5-2540M, 2.60GHz, 2 cores (CID=54cd38490124ef51:425ae4e3483c82e8)
- P2 = Qualcomm MSM7625A FFA, ARM Cortex A5, ARMv7, 1 GHz, 1 core(CID=54cd38490124ef51:ae17889f40209ae7)
- P3 = Allwinner A20 (sun7i), Dual-Core ARM Cortex A7, ARMv7, 1.6GHz, Mali400 GPU, 2 core (CID=54cd38490124ef51:fc020ce2e4d44f3d)
- P4 = NVidia Quadro NVS 135M, 16 cores, 400MHz, 10Watt, 210 Million transistors (TBD)
Processor mode
- W1 = 32 bit
- W2 = 64 bit
OSs
- O1 = Windows 7 Pro SP1, cost~170 euros (CID=c4d3ce728f46eea2:10c4f7484446b689)
- O2 = O1, MinGW32
- O2 = OpenSuse 12.1, Kernel 3.1.10, cost=free (CID=c4d3ce728f46eea2:29ce89f1a1446e89)
- O3 = Android 4.1.2, Kernel 3.4.0, cost=free (CID=c4d3ce728f46eea2:e734c48d5a5824c1)
- O4 = Android 4.2.2, Kernel 3.3.0, cost=free (CID=c4d3ce728f46eea2:d3e9b97f6994444b)
Compilers
- X1 = GCC 4.1.1, number of optimization flags available~60+130, release date=2006 (CID=cff49b38f4c2395d:ac263305247d3953)
- X2 = GCC 4.4.1, number of optimization flags available~100+170, release date=2009 (CID=cff49b38f4c2395d:15a583ed9eb54b57)
- X3 = GCC 4.4.4, number of optimization flags available~100+170, release date=2010 (CID=0247b19de472d7d0:03a91d01a54ef7f5, CID=cff49b38f4c2395d:15a583ed9eb54b57)
- X4 = GCC 4.6.3, number of optimization flags available~120+200 (including polyhedral and lto), release date=2012 (CID=0247b19de472d7d0:fc7b8424bbecc4d1, CID=cff49b38f4c2395d:2454492134ed4b73)
- X5 = GCC 4.7.2, number of optimization flags available~130+210, release date=2012 (CID=0247b19de472d7d0:a1b38095ce254cd2, CID=cff49b38f4c2395d:9c1310b41c9a2b38)
- X6 = GCC 4.8.3, number of optimization flags available~135+215, release date=2014 (CID=cff49b38f4c2395d:3474da936450dd7a)
- X7 = GCC 4.9.1, number of optimization flags available~140+220, release date=2014 (CID=cff49b38f4c2395d:264156bb24190a99)
- X8 = LLVM 3.1, number of optimization flags available=TBD, release date=2012 (CID=0247b19de472d7d0:697ad401bfc43c5b, CID=cff49b38f4c2395d:ad6b41ddae73bbd4)
- X9 = LLVM 3.4.2, number of optimization flags available=TBD, release date=2014 (CID=cff49b38f4c2395d:b1e488aa91274cb6)
- X10 = Open64 5.0, number of optimization flags available=TBD, release date=2011 (CID=0247b19de472d7d0:0599ca2a3b34a6b8, CID=cff49b38f4c2395d:48d5baa4569f59a8)
- X11 = PathScale 2.3.1, number of optimization flags available=TBD, release date=2006 (CID=cff49b38f4c2395d:164c4aaff2b69279)
- X12 = NVidia CUDA Toolkit 5.0, number of optimization flags available=TBD, release date=2012 (CID=0247b19de472d7d0:89e947f8430eaa37, CID=cff49b38f4c2395d:48d5baa4569f59a8)
- X13 = Intel Composer XE 2011, number of optimization flags available=TBD, release date=2011, cost = ~800euro (CID=0247b19de472d7d0:e985f0596b1b1d9e, CID=cff49b38f4c2395d:42eab7eefa890ddc)
- X14 = Microsoft Visual Studio 2013, number of optimization flags available=TBD, release date=2013,cost = has free minimal version (CID=cff49b38f4c2395d:5e35f4112bf996c5)
Compiler optimization level
- Y1 = Performance (usually -O3)
- Y2 = Size (usually -Os)
- Y3 = -O3 -fmodulo-sched -funroll-all-loops
- Y4 = -O3 -funroll-all-loops
- Y5 = -O3 -fprefecth-loop-arrays
- Y6 = -O3 -fno-if-conversion
- Y7 = Auto-tuning with more than 6 flags (-fif-conversion)
- Y8 = Auto-tuning with more than 6 flags (-fno-if-conversion)
Number of run-time code repetitions (for example, processing steps in neural networks)
- R1 = 4000
- R2 = 1000
- R3 = 400
Total number of computations (processed neurons or pixels)
- T1 ~ 9.6E9
- T2 ~ 2.4E9
- T3 ~ 1.0E9
Costs
- C1= Execution time
- C2 = Energy
- C3 = Code size
- C4 = Compilation time
- C5 = System size
- C6 = Hardware price
- C7 = Software price
- C8 = (Auto-)tuning price
- C9 = Development time
- C10 = Validation and testing time
Example of continuosly evolving advice (combination of decision trees and models)
def advice(i):
if i['usage_scenario']['need_fastest_code']=='yes': if i['cost']['can_afford_specialized_hardware']=='yes': if i['cost']['can_afford_specialized_hardware']=='yes': i['advice']='S4' else: i['advice']='P4' else: if i['resources']['p1']['available']=='yes': if i['resources']['p1']['cores']=='1': if i['cost']['can_afford_auto_tuning']=='yes': if i['dataset']['feature']=='D2': i['advice']='Solution 11' else: i['advice']='Solution 4' else: i['advice']='Solution 5' elif i['resources']['p1']['cores']=='2': if i['cost']['can_afford_auto_tuning']=='yes': i['advice']='Solution 7' else: i['advice']='Solution 6' else: i['advice']='Ask for more resources' elif i['usage_scenario']['need_most_energy_efficient_code']=='yes': if i['cost']['can_afford_specialized_hardware']=='yes': i['advice']='P4' else: i['advice']='P2' elif i['usage_scenario']['need_cheapest_hardware']=='yes': i['advice']='P3' elif i['usage_scenario']['need_smallest_code']=='yes': i['advice']='Solution 9' elif i['usage_scenario']['need_fastest_compilation_and_good_speed']=='yes': i['advice']='X4'
return i
Notes
Energy: 1Wh = 3600 joules
W = mAh * V / 1000 = 1300 * 3.9 / 1000 ~ 5W