# # Collective Knowledge: CK-powered AI/SW/HW co-design for ReQuEST tournaments # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: Grigori Fursin, cTuning foundation/dividiti # 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) repo_with_validated_results='ck-request-asplos18-results' # Local settings line='================================================================' form_name='request_web_form' onchange='document.'+form_name+'.submit();' hextra='
\n' hextra+=' Beta scoreboard for ReQuEST@ASPLOS\'18 AI/SW/HW co-design competition\n' hextra+=' (see ACM proceedings and results report).\n' #hextra+=' (your feedback)\n' hextra+='
\n' selector=[ {'name':'Results', 'key':'results', 'skip_update':'yes', 'new_line_after':'yes', 'skip_from_reset':'yes'}, # need to skip from reset to be able to get values from other repos {'name':'Algorithm species', 'key':'algorithm_species', 'module_uoa':'1702c3e426ca54c5'}, # {'name':'Competition', 'key':'scenario_module_uoa', 'module_uoa':'032630d041b4fd8a'}, {'name':'Model species', 'key':'model_species', 'module_uoa':'38e7de41acb41d3b'}, {'name':'Precision', 'key':'model_precision'}, {'name':'Dataset species', 'key':'dataset_species', 'new_line':'yes', 'keep_empty':'yes'}, {'name':'Dataset size', 'key':'dataset_size', 'type':'int'}, {'name':'Cloud/farm', 'key':'farm', 'new_line':'yes', 'keep_empty':'yes'}, {'name':'Platform species', 'key':'platform_species'}, {'name':'Platform', 'key':'plat_name'}, {'name':'OS name', 'key':'os_name', 'new_line':'yes'}, {'name':'CPU name', 'key':'cpu_name', 'keep_empty':'yes'}, {'name':'GPGPU name', 'key':'gpgpu_name', 'keep_empty':'yes'} ] selector2=[ {'name':'Algorithm implementation (CK program)', 'key':'##choices#data_uoa#min'}, {'name':'Model design', 'key':'##meta#model_design_name'}, {'name':'Compiler', 'key':'##meta#compiler_name','new_line':'yes', 'keep_empty':'yes'}, {'name':'Library/framework', 'key':'##meta#library_name', 'keep_empty':'yes'}, {'name':'OpenCL driver', 'key':'##features#gpgpu@0#gpgpu_misc#opencl c version#min', 'extra_key':'##features#gpgpu@0#gpgpu_misc#opencl_c_version#min', 'new_line':'yes', 'keep_empty':'yes'}, {'name':'Batch size', 'key':'##features#batch_size#min','type':'int', 'new_line':'yes'}, {'name':'CPU freq (MHz)', 'key':'##features#cpu_freq#min','type':'int', 'keep_empty':'yes'}, {'name':'GPU freq (MHz)', 'key':'##features#gpu_freq#min','type':'int', 'keep_empty':'yes'}, {'name':'Freq (MHz)', 'key':'##features#freq#min','type':'int', 'keep_empty':'yes'} ] selector3=[ {'name':'Plot dimension 1 (X)', 'key':'plot_dimension1'}, {'name':'Show variation', 'key':'plot_variation_dimension1', 'new_line_after':'yes'}, {'name':'Plot dimension 2 (Y)', 'key':'plot_dimension2'}, {'name':'Show variation', 'key':'plot_variation_dimension2', 'new_line_after':'yes'} ] k_hi_uid='highlight_behavior_uid' k_hi_user='highlight_by_user' k_view_all='all' hidden_keys=[k_hi_uid, k_hi_user, k_view_all] dimensions=[ {"key":"experiment", "name":"Experiment number", "skip_from_cache":"yes", "view_key":"__number"}, {"key":"##characteristics#run#prediction_time_avg_s", "name":"Prediction time per 1 image (min, sec.)"}, {"key":"##characteristics#run#inference_latency", "name":"Inference latency for 1 image (min, sec.)"}, {"key":"##characteristics#run#inference_throughput", "name":"Inference throughput (max, images per sec.)", "reverse":"yes"}, {"key":"##characteristics#run#accuracy_top1", "name":"Accuracy on all images (Top1)"}, {"key":"##characteristics#run#accuracy_top5", "name":"Accuracy on all images (Top5)"}, {"key":"##features#model_size", "name":"Model size (B)"}, {"key":"##meta#platform_peak_power", "name":"Platform peak power (W)", "from_meta":"yes"}, {"key":"##meta#platform_price", "name":"Platform price ($)", "from_meta":"yes"}, {"key":"##characteristics#run#usage_cost", "name":"Usage cost ($)"}, {"key":"##meta#platform_species", "name":"Platform species", "from_meta":"yes"}, {"key":"##meta#model_species", "name":"Model species", "from_meta":"yes", 'module_uoa':'38e7de41acb41d3b'}, {"key":"##meta#model_precision", "name":"Model precision", "from_meta":"yes"}, {"key":"##meta#dataset_species", "name":"Dataset species", "from_meta":"yes"}, {"key":"##features#freq", "name":"Device frequency (MHz)"}, {"key":"##features#cpu_freq", "name":"CPU frequency (MHz)"}, {"key":"##features#gpu_freq", "name":"GPU frequency (MHz)"}, {"key":"##features#batch_size", "name":"Batch size"} ] # Only from points (not from entry meta!) view_cache=[ "##choices#data_uoa#min", "##choices#env#*#min", "##pipeline_state#fail_bool#min", "##pipeline_state#fail_reason#min", "##characteristics#compile#compilation_success_bool#min", "##characteristics#run#run_success_bool#min", "##characteristics#run#output_check_failed_bool#min", "##characteristics#run#execution_time#min", "##characteristics#run#execution_time#max", "##features#cpu_freq#min", "##features#gpu_freq#min", "##features#freq#min", "##features#batch_size#min", "##features#gpgpu@0#gpgpu_misc#opencl c version#min" ] table_view=[ {"key":"##meta#algorithm_species", "name":"Algorithm species", 'module_uoa':'1702c3e426ca54c5', "skip_if_key_in_input":"algorithm_species"}, {"key":"##choices#data_uoa#min", "name":"Workload (program,model,library)", "skip_if_the_same_key_in_input":"yes"}, {"key":"##meta#model_species", "name":"Model species", 'module_uoa':'38e7de41acb41d3b', "skip_if_key_in_input":"model_species"}, {"key":"##meta#model_precision", "name":"Precision", "skip_if_key_in_input":"model_precision"}, {"key":"##meta#dataset_species", "name":"Dataset species", "skip_if_key_in_input":"dataset_species"}, {"key":"##meta#dataset_size", "name":"Dataset size", "skip_if_key_in_input":"dataset_size", "type":"int"}, {"key":"##meta#farm", "name":"Farm", "skip_if_key_in_input":"farm"}, {"key":"##meta#platform_species", "name":"Platform species", "skip_if_key_in_input":"platform_species"}, {"key":"##meta#plat_name", "name":"Platform name", "skip_if_key_in_input":"plat_name"}, {'key':'##meta#cpu_name', 'name':'CPU name', "skip_if_key_in_input":"cpu_name"}, {"key":"##features#cpu_freq#min", "name":"CPU freq (MHz)", "skip_if_the_same_key_in_input":"yes"}, {'key':'##meta#gpgpu_name', 'name':'GPGPU name', "skip_if_key_in_input":"gpgpu_name"}, {"key":"##features#gpu_freq#min", "name":"GPU freq (MHz)", "skip_if_the_same_key_in_input":"yes"}, {'key':'##meta#os_name', 'name':'OS name', "skip_if_key_in_input":"os_name"}, {"key":"##meta#versions", "name":"SW deps and versions", "json_and_pre":"yes", "align":"left"}, {"key":"##meta#model_design_name", "name":"Model design", "skip_if_the_same_key_in_input":"yes"}, {"key":"##meta#compiler_name", "name":"Compiler", "skip_if_the_same_key_in_input":"yes"}, {"key":"##meta#library_name", "name":"Library", "skip_if_the_same_key_in_input":"yes"}, {"key":"##choices#env#", "name":"Environment", "starts_with":"yes", "align":"left"}, {"key":"##characteristics#run#prediction_time_avg_s#min", "name":"Classification time per 1 image (sec. min/max)", "check_extra_key":"max", "format":"%.4f"}, {"key":"##characteristics#run#inference_latency#min", "name":"Inference latency for 1 image (min, sec.)", "check_extra_key":"max", "format":"%.4f"}, {"key":"##characteristics#run#inference_throughput#max", "name":"Inference throughput (max, images per sec.)", "check_extra_key":"min", "format":"%.1f"}, {"key":"##extra#accuracy_sum", "name":"Accuracy (Top1 / Top5)"}, {"key":"##features#batch_size#min", "name":"Batch size"}, {"key":"##features#model_size#min", "name":"Model size (B)"}, {"key":"##features#memory_usage#min", "name":"Memory usage (B)"}, {"key":"##meta#platform_peak_power", "name":"Platform peak power (W)", "check_extra_key":"max", "format":"%.3f"}, {"key":"##meta#platform_price_str", "name":"Platform price ($)"}, {"key":"##meta#platform_price_date", "name":"Platform price date"}, {"key":"##characteristics#run#usage_cost#min", "name":"Usage cost per image ($)", "type":"float", "format":"%.2e"}, {"key":"##extra#html_reproducibility", "name":"Reproducibility", "align":"left"} ] artifacts={} artifacts_cache={} prune_first_level=100 prune_second_level=400 ############################################################################## # Initialize module def init(i): """ Input: {} Output: { return - return code = 0, if successful > 0, if error (error) - error text if return > 0 } """ return {'return':0} ############################################################################## # show results def show(i): """ Input: { (crowd_module_uoa) - if rendered from experiment crowdsourcing (crowd_key) - add extra name to Web keys to avoid overlapping with original crowdsourcing HTML (crowd_on_change) - reuse onchange doc from original crowdsourcing HTML (highlight_behavior_uid) - highlight specific result (behavior)! (highlight_by_user) - highlight all results from a given user (refresh_cache) - if 'yes', refresh view cache } Output: { return - return code = 0, if successful > 0, if error (error) - error text if return > 0 } """ import os import copy import time import json # Preparing various parameters to render HTML dashboard st='' view_all=i.get(k_view_all,'') cmuoa=i.get('crowd_module_uoa','') ckey=i.get('crowd_key','') wchoices3={ ckey+'plot_dimension1':[], ckey+'plot_variation_dimension1':[{'name':'no', 'value':'no'}, {'name':'yes', 'value':'yes'}], ckey+'plot_dimension2':[], ckey+'plot_variation_dimension2':[{'name':'no', 'value':'no'}, {'name':'yes', 'value':'yes'}] } if i.get(ckey+'plot_dimension1','')=='': i[ckey+'plot_dimension1']=dimensions[3]['key'] if i.get(ckey+'plot_dimension2','')=='': i[ckey+'plot_dimension2']=dimensions[4]['key'] if 'reset_'+form_name in i: reset=True else: reset=False if 'all_choices_'+form_name in i: all_choices=True else: all_choices=False debug=(i.get('debug','')=='yes') # debug=True conc=i.get('crowd_on_change','') if conc=='': conc=onchange hi_uid=i.get(k_hi_uid,'') hi_user=i.get(k_hi_user,'') refresh_cache=i.get('refresh_cache','') if 'refresh_cache_'+form_name in i: refresh_cache='yes' bd='
Report
\n'
x+='
DOIs
\n'
x+='
ACM badges
\n'
x+='
Review
\n'
x+='
'+y+'
\n'
x+='
\n' artifacts[duid]=x plst1.append(q) plst=plst1 # Sort list *********************************************************************************** dt=time.time() splst=plst # sorted(plst, key=lambda x: ( # x.get('meta',{}).get('meta',{}).get('prog_uoa',''), # x.get('meta',{}).get('meta',{}).get('dataset_uoa',''), # x.get('meta',{}).get('meta',{}).get('plat_name',''), # x.get('meta',{}).get('meta',{}).get('timestamp','') # )) # # if debug: h+='\n
Debug time (sorting table): '+str(time.time()-dt)+' sec.
\n'
# Prune list **********************************************************************************
len_splst=len(splst)
if len_splst>prune_first_level:
splst=splst[:prune_first_level]
h+='\nShowing '+str(prune_first_level)+' of '+str(len_splst)+' entries ...
\n'
# Prepare and cache results for the table
for dim in dimensions:
k=dim['key']
if dim.get('skip_from_cache','')!='yes':
if dim.get('from_meta','')=='yes':
if k not in view_cache:
view_cache.append(k)
else:
k1=k+'#min'
if k1 not in view_cache:
view_cache.append(k1)
k2=k+'#max'
view_cache.append(k2)
r=ck.access({'action':'get_and_cache_results',
'module_uoa':cfg['module_deps']['experiment'],
'lst':splst,
'cache_uid':work['self_module_uid'],
'refresh_cache':refresh_cache,
'view_cache':view_cache,
'table_view':table_view})
if r['return']>0: return
table=r['table']
# Prepare second level of selection with pruning ***********************************************
r=ck.access({'action':'prepare_selector',
'module_uoa':cfg['module_deps']['experiment'],
'original_input':i,
'tags':experiment_tags,
'search_repos':experiment_repos,
'lst':table,
'skip_meta_key':'yes',
'debug': debug,
'selector':selector2,
'crowd_key':ckey,
'crowd_on_change':conc,
'url1':url1,
'form_name':form_name,
'skip_form_init':'yes',
'background_div':bd})
if r['return']>0: return r
h2=r['html']
table=r['pruned_lst']
choices2=r['choices']
wchoices2=r['wchoices']
# Extra fields (customized for this module) *****************************************************************************
for row in table:
duoa=row.get('##data_uid','')
dpoint=row.get('##point_uid','')
# Replay
x=''
if duoa!='' and dpoint!='':
x='ck replay experiment:'+duoa+' --point='+str(dpoint)
y=ck.cfg.get('add_extra_to_replay','')
if y!='':x+=' '+y
xh='
\n' # Move to validated x='' if duoa!='' and dpoint!='': x='ck validate request.asplos18 --experiment='+duoa+' --point='+str(dpoint) xh+='
\n'
xh=artifacts.get(duoa,'')+xh
row['##extra#html_reproducibility']=xh
# Accuracy sum (Top1/Top5)
x=''
x1=row.get('##characteristics#run#accuracy_top1#min','')
x2=row.get('##characteristics#run#accuracy_top5#min','')
if x1!='':
x='%.3f' % x1
if x2!='':
x+=' / '
x+='%.3f' % x2
row['##extra#accuracy_sum']=x
# Images per second
t=row.get('##characteristics#run#prediction_time_avg_s#min','')
if t!=None and t!='':
ips=1/t
row['images_per_second']=ips
# Prune first list based on second selection*****************************************************************************
if all_choices:
nsplst=olst
elif reset:
nsplst=splst
else:
all_uid=[]
for row in table:
duid=row.get('##data_uid','')
if duid!='' and duid not in all_uid:
all_uid.append(duid)
nsplst=[]
for q in splst:
if q['data_uid'] in all_uid:
nsplst.append(q)
# Check if too many *****************************************************************************************************
ltable=len(table)
min_view=False
hx=''
if ltable==0:
hx='\nNo results found!'
# return {'return':0, 'html':h, 'style':st}
elif ltable>prune_second_level and view_all!='yes':
table=table[:prune_second_level]
hx='\nShowing '+str(prune_second_level)+' of '+str(ltable)+' entries ...
\n'
# Get unique values and create html selector 1 (after selector 2)
r=ck.access({'action':'get_unique_keys_from_list',
'module_uoa':cfg['module_deps']['experiment'],
'lst':nsplst,
'selector':selector,
'crowd_key':ckey,
'original_input':i})
if r['return']>0: return
choices1=r['choices']
wchoices1=r['wchoices']
# Check results from papers
x=[
{"name":"only validated","value":""},
# {"name":"all","value":"all"},
{"name":"local","value":"local"},
{"name":"for ReQuEST@ASPLOS'18 workflow \"mobilenets-armcl-opencl\"","value":"ck-request-asplos18-results-mobilenets-armcl-opencl"},
{"name":"for ReQuEST@ASPLOS'18 worklfow \"caffe-intel\"","value":"ck-request-asplos18-results-caffe-intel"},
{"name":"for ReQuEST@ASPLOS'18 workflow \"mobilenets-tvm-arm\"","value":"ck-request-asplos18-results-mobilenets-tvm-arm"},
{"name":"for ReQuEST@ASPLOS'18 workflow \"iot-farm\"","value":"ck-request-asplos18-results-iot-farm"},
{"name":"for ReQuEST@ASPLOS'18 workflow \"resnet-tvm-fpga\"","value":"ck-request-asplos18-results-resnet-tvm-fpga"}
]
wchoices1[ckey+'results']=x
# Prepare selector 1 (based on choices from selector 2)
r=ck.access({'action':'prepare_html_selector',
'module_uoa':cfg['module_deps']['experiment'],
'start_form':'yes',
'url1':url1,
'form_name':form_name,
'background_div':bd,
'selector':selector,
'crowd_key':ckey,
'crowd_on_change':conc,
'wchoices':wchoices1,
'original_input':i})
if r['return']>0: return r
h1=r['html']
h+=h1+'\n'+h2
ltable=len(table)
min_view=False
if ltable==0:
h+=''
# h+='No results found!'
# return {'return':0, 'html':h, 'style':st}
elif ltable>prune_second_level and view_all!='yes':
table=table[:prune_second_level]
h+='\nShowing '+str(prune_second_level)+' of '+str(ltable)+' entries ...
\n'
# Prepare selector 3 (without pruning - about tables and graphs)
arc='yes'
if ck.cfg.get('request_skip_refresh_cache_button','')=='yes': arc=''
# Prepare dimensions
for dim in dimensions:
k=dim['key']
n=dim['name']
wchoices3[ckey+'plot_dimension1'].append({'name':n, 'value':k})
wchoices3[ckey+'plot_dimension2'].append({'name':n, 'value':k})
r=ck.access({'action':'prepare_html_selector',
'module_uoa':cfg['module_deps']['experiment'],
'start_form':'no',
'url1':url1,
'form_name':form_name,
'background_div':bd,
'selector':selector3,
'crowd_key':ckey,
'crowd_on_change':conc,
'wchoices':wchoices3,
'original_input':i,
'add_refresh_cache':arc,
'add_reset':'yes'})
if r['return']>0: return r
h+='\n'+r['html']+'\n'
h+='\n'+hx+'\n'
if ltable==0:
return {'return':0, 'html':h, 'style':st}
# Prepare graph *********************************************************************************************************
bgraph={'0':[], '1':[]}
igraph={'0':[], '1':[]}
# stable=sorted(table, key=lambda row: (
# ck.safe_float(row.get('##characteristics#run#execution_time#min',None),0.0)
# ))
ix=0
kdim1=i.get(ckey+'plot_dimension1','')
kvdim1=i.get(ckey+'plot_variation_dimension1','')
kdim2=i.get(ckey+'plot_dimension2','')
kvdim2=i.get(ckey+'plot_variation_dimension2','')
# Find X/Y names
ndim1=''
ndim2=''
dim1_from_meta=False
dim2_from_meta=False
dim1_module=''
dim2_module=''
dim1_reverse=''
dim2_reverse=''
for k in dimensions:
kk=k['key']
kn=k['name']
if kk==kdim1:
ndim1=kn
if k.get('from_meta','')=='yes':
dim1_from_meta=True
dim1_module=k.get('module_uoa','')
dim1_reverse=k.get('reverse','')
if kk==kdim2:
ndim2=kn
if k.get('from_meta','')=='yes':
dim2_from_meta=True
dim2_module=k.get('module_uoa','')
dim2_reverse=k.get('reverse','')
kdim1min=kdim1
kdim2min=kdim2
kdim1max=kdim1
kdim2max=kdim2
max1=0
# Labels if not int and not float
ldim1={}
ldim2={}
if not dim1_from_meta:
if dim1_reverse!='yes':
kdim1min+='#min'
kdim1max+='#max'
else:
kdim1min+='#max'
kdim1max+='#min'
if not dim2_from_meta:
if dim2_reverse!='yes':
kdim2min+='#min'
kdim2max+='#max'
else:
kdim2min+='#max'
kdim2max+='#min'
for row in table:
ix+=1
six=str(ix)
if kdim1=='experiment':
dim1=ix
else:
v=row.get(kdim1min,None)
if v==None or v=='': continue
v=check_label(v, ldim1)
dim1=v
if dim1>max1: max1=dim1
point=[dim1]
if kdim1!='experiment' and kvdim1=='yes':
v=row.get(kdim1max,None)
if v==None or v=='': continue
v=check_label(v, ldim1)
dim1max=v
delta=0.0
if dim1!=0.0 and dim1max!=0.0:
delta=abs(dim1max-dim1)
if dim1_reverse!='yes':
dm=dim1+delta
else:
dm=dim1-delta
point.append(dm)
if kdim2=='experiment':
dim2=ix
else:
v=row.get(kdim2min,None)
if v==None or v=='': continue
v=check_label(v, ldim2)
dim2=v
point.append(dim2)
if kdim2!='experiment' and kvdim2=='yes':
v=row.get(kdim2max,None)
if v==None or v=='': continue
v=check_label(v, ldim2)
dim2max=v
delta=0.0
if dim2!=0.0 and dim2max!=0.0:
delta=abs(dim2max-dim2)
if dim2_reverse!='yes':
dm=dim2+delta
else:
dm=dim2-delta
point.append(dm)
raw_data_url=url0#+'wcid='+x+':'+duid
ind='0'
ruoa=row.get('##repo_uoa','')
if ruoa==repo_with_validated_results: ind='1'
bgraph[ind].append(point)
igraph[ind].append({'size':4, 'features':row, 'anchor':'id'+six})
#Old
# igraph['0'].append({'size':sizem, 'color':xcol, 'features':row, 'url':'', 'url_ext':raw_data_url})
# igraph['0'].append({'size':4, 'features':row, 'anchor':'id'+six}) #, 'url':'', 'url_ext':''})
if len(bgraph['0'])>0 or len(bgraph['1'])>0:
dt=time.time()
ii={'action':'plot',
'module_uoa':cfg['module_deps']['graph'],
"table":bgraph,
"table_info":igraph,
"xmin":-(float(max1)/20),
"ymin":0,
"ignore_point_if_none":"yes",
"plot_type":"d3_2d_scatter",
"display_x_error_bar2":kvdim1,
"display_y_error_bar2":kvdim2,
"title":"Powered by Collective Knowledge",
"x_ticks_period":10,
"axis_x_desc": ndim1,
"axis_y_desc": ndim2,
"plot_grid":"yes",
"d3_div":"ck_interactive",
"point_style":{"1":{"color":"#0198E1", "connect_lines":"no"},
"0":{"color":"#dc3912", "connect_lines":"no"}},
"image_width":"900",
"image_height":"400",
"wfe_url":url0}
r=ck.access(ii)
if r['return']==0:
x=r.get('html','')
if x!='':
st+=r.get('style','')
h+='
# | \n' for tv in table_view: k=tv['key'] align=tv.get('align','') if align=='': align='center' skip=False kk=tv.get('skip_if_key_in_input','') if kk!='' and i.get(ckey+kk,'')!='': skip=True if not skip and tv.get('skip_if_the_same_key_in_input','')=='yes' and i.get(ckey+k,'')!='': skip=True if not skip: n=tv.get('name','') if n=='': n=k h+=''+n+' | \n' h+='
'+six+' | \n' for tv in table_view: k=tv['key'] align=tv.get('align','') if align=='': align='center' skip=False kk=tv.get('skip_if_key_in_input','') if kk!='' and i.get(ckey+kk,'')!='': skip=True if not skip and tv.get('skip_if_the_same_key_in_input','')=='yes' and i.get(ckey+k,'')!='': skip=True if not skip: v=q.get(k,'') format=tv.get('format','') if format!='' and v!='' and v!=None and v!="None": v=format % float(v) if tv.get('json_and_pre','')=='yes' and v!='' and type(v)==dict: v1='' for kx in v: v1+=kx+'='+str(v[kx])+''+v+' | \n' h+='
Debug time (preparing html of a table): '+str(time.time()-dt)+' sec.
\n'
if cmuoa=='':
h+='\n'
# Add
to be able to select anchor on top
for j in range(0,30):
h+='
\n'
return {'return':0, 'html':h, 'style':st}
##############################################################################
# show info for all layers
def html_viewer(i):
"""
Input: {
data_uoa - CK entry UOA to view
}
Output: {
return - return code = 0, if successful
> 0, if error
(error) - error text if return > 0
}
"""
import os
duoa=i.get('data_uoa','')
# Load entry
r=ck.access({'action':'load',
'module_uoa':work['self_module_uid'],
'data_uoa':duoa})
if r['return']>0: return r
p=r['path']
d=r['dict']
dchars=d.get('characteristics',{})
dchoices=d.get('choices',{})
dmeta=d.get('meta',{})
# Load stats
dstat={}
fstat=os.path.join(p,'ck-stat-flat-characteristics.json')
if os.path.isfile(fstat):
r=ck.load_json_file({'json_file':fstat, 'dict':dstat})
if r['return']>0: return r
dstat=r['dict']
# Prepare table
h=''
# h+='
\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+='