# # Collective Knowledge: CK-powered Caffe crowdbenchmarking (very early prototyping) # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net # cfg={} # Will be updated by CK (meta description of this module) work={} # Will be updated by CK (temporal data) ck=None # Will be updated by CK (initialized CK kernel) # Local settings line='================================================================' ck_url='http://cknowledge.org/repo/web.php?native_action=show&native_module_uoa=program.optimization&scenario=1eb2f50d4620903e' ck_url1='http://cknowledge.org/repo/web.php?wcid=experiment.bench.dnn:' ffstat='ck-stat-flat-characteristics.json' ffmin='ck-stat-flat-min.json' form_name='wa_web_form' onchange='document.'+form_name+'.submit();' #hextra='
# | \n' h+='Platform | \n' h+='OS | \n' h+='CPU | \n' h+='GPGPU | \n' h+='Type | \n' h+='DNN engine | \n' h+='Model | \n' h+='Choices (env) | \n' h+='FWBW min time (exp time) stat. repetitions | \n'
h+=' FW | \n' h+='BW | \n' h+='Per layer | \n' h+='HW costs | \n' h+='All usage costs (preparation, training, inference, errors, etc) | \n' h+='Model size | \n' h+='Model accuracy on ImageNet | \n' h+='Model topology and parameters | \n' h+='Power consumption (W) min / max | \n'
h+=' Acoustic noise (dB) min / max | \n'
h+=' Memory usage (MB) | \n' h+='Bug detected? | \n' h+='User | \n' h+='Replay | \n' h+='||
'+str(ix)+' | \n' # Platform, etc ... x=plat_name if plat_uid!='': x=''+x+'' h+=''+x+' | \n' x=os_name if os_uid!='': x=''+x+'' h+=''+x+' | \n' x=cpu_name if cpu_uid!='': x=''+x+'' h+=''+x+' | \n' x=gpgpu_name if gpgpu_uid!='': x=''+x+'' h+=''+x+' | \n' # All files uu1=work['self_module_uid'] if cmuoa!='': uu1=cmuoa uu2=str(ix)+') '+duid+'' uu3='[ See raw files ]'+tp+' | \n' # Engine x=d_engine_name if d_engine_package_uoa!='': x=''+x+'' if x!='' and d_engine_ver!='': x+='\n'+x+' '+ver+' | \n'
# Model
x=nn
msize=''
mtop=''
mtop5=''
if d_model_package_uoa!='':
x=''+x+''
# Load features
rx=ck.access({'action':'load',
'module_uoa':'package',
'data_uoa':d_model_package_uoa})
if rx['return']==0:
mft=rx['dict'].get('features',{})
msize=str(mft.get('model_size_mb',''))+' MB'
mtop=str(mft.get('accuracy',''))
mtop5=str(mft.get('accuracy_top5',''))
# if x!='' and d_model_ver!='':
# x+='\n'+x+' | \n' # Choices (for now env) # x='
'+str(k)+'= | '+str(v)+' |
\n' h+='
DNN engine name: | \n' h+=''+lcaffe.get('data_name','')+' | \n' h+='
DNN engine version: | \n' h+=''+lcaffe.get('ver','')+' | \n' h+='
DNN engine type: | \n' h+=''+dmeta.get('dnn_type','')+' | \n' h+='
DNN engine dependencies: | \n' h+=''+x+' | \n' h+='
DNN model name: | \n' h+=''+lmodel.get('data_name','')+' | \n' h+='
DNN model version: | \n' h+=''+lmodel.get('ver','')+' | \n' h+='
Batch size: | \n' h+=''+dchars.get('run',{}).get('REAL_ENV_CK_CAFFE_BATCH_SIZE','')+' | \n' h+='
FWBW time (ms.): | \n' # h+=''+str(dchars.get('run',{}).get('time_bw_ms',''))+' | \n' # h+='
FW time (ms.): | \n' # h+=''+str(dchars.get('run',{}).get('time_fw_ms',''))+' | \n' # h+='
BW time (ms.): | \n' # h+=''+str(dchars.get('run',{}).get('time_bw_ms',''))+' | \n' # h+='
Platform: | \n' h+=''+dmeta.get('plat_name','')+' | \n' h+='
OS: | \n' h+=''+dmeta.get('os_name','')+' | \n' h+='
CPU: | \n' h+=''+dmeta.get('cpu_name','')+' | \n' h+='
GPU: | \n' h+=''+dmeta.get('gpu_name','')+' | \n' h+='
\n' h+='
Name | \n' h+='Direction | \n' h+='Min time (ms.): | \n' h+='Expected time (ms.): | \n' h+='Max time (ms.): | \n' h+='Repetitions: | \n' h+='
'+v2+' | \n' h+=''+v1+' | \n' h+=''+xv3+' | \n' h+=''+xv6+' | \n' h+=''+xv4+' | \n' h+=''+str(v7)+' | \n' h+='