Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ck.out('OpenCL device: '+str(q[6]))
ck.out('Compiler: '+str(q[8]))
# Convert to csv
ii={"action":"convert_table_to_csv",
"module_uoa":"experiment",
"table":table,
"keys":real_keys,
"file_name":"start_analysis_tmp.csv"}
r=ck.access(ii)
if r['return']>0: ck.err(r)
# Finish
ck.out('')
ck.out('Thank you for using CK!')
exit(0)
ii={'action':'load',
'module_uoa':'env',
'data_uoa':model_uoa}
r=ck.access(ii)
if r['return']>0: return r
model_name=r['data_name']
if 'mobilenet' not in r['dict']['tags']:
continue
alpha = float(r['dict']['env']['CK_ENV_TENSORFLOW_MODEL_MOBILENET_MULTIPLIER'])
rho = int(r['dict']['env']['CK_ENV_TENSORFLOW_MODEL_MOBILENET_RESOLUTION'])
record_repo='local'
record_uoa='mobilenets-'+experiment_type+'-'+str(rho)+'-'+str(alpha)+'-tensorflow-'+lib_tags
# Prepare pipeline.
ck.out('---------------------------------------------------------------------------------------')
ck.out('%s - %s' % (lib_name, lib_uoa))
ck.out('%s - %s' % (model_name, model_uoa))
ck.out('Experiment - %s:%s' % (record_repo, record_uoa))
# Prepare autotuning input.
cpipeline=copy.deepcopy(pipeline)
# Reset deps and change UOA.
new_deps={'library':copy.deepcopy(depl),
'weights':copy.deepcopy(depm)}
new_deps['library']['uoa']=lib_uoa
new_deps['weights']['uoa']=model_uoa
jj={'action':'resolve',
'module_uoa':'env',
'host_os':hos,
'target_os':tos,
'module_uoa':'env',
'data_uoa':model_uoa}
r=ck.access(ii)
if r['return']>0: return r
# Get the tags from e.g. 'Caffe model (net and weights) (deepscale, squeezenet, 1.1)'
model_name=r['data_name']
model_tags = re.match('Caffe model \(net and weights\) \((?P.*)\)', model_name)
model_tags = model_tags.group('tags').replace(' ', '').replace(',', '-')
# Skip some models with "in [..]" or "not in [..]".
if model_tags not in ['nvidia-googlenet']: continue
record_repo='local'
record_uoa='imagenet-val-accuracy-'+model_tags+'-'+lib_tags
# Prepare pipeline.
ck.out('---------------------------------------------------------------------------------------')
ck.out('%s - %s' % (lib_name, lib_uoa))
ck.out('%s - %s' % (model_name, model_uoa))
ck.out('Experiment - %s:%s' % (record_repo, record_uoa))
# Prepare autotuning input.
cpipeline=copy.deepcopy(pipeline)
# Reset deps and change UOA.
new_deps={#'lib-caffe':copy.deepcopy(depl),
'caffemodel':copy.deepcopy(depm)}
#new_deps['lib-caffe']['uoa']=lib_uoa
new_deps['caffemodel']['uoa']=model_uoa
jj={'action':'resolve',
'module_uoa':'env',
if model_tags:
model_tags = model_tags.group('tags').replace(' ', '').replace(',', '-')
else:
model_tags=''
for tag in r['dict']['tags']:
if model_tags!='': model_tags+='-'
model_tags+=tag
# Skip some models with "in [..]" or "not in [..]".
if model_tags not in ['bvlc-alexnet','bvlc-googlenet','deepscale-squeezenet-1.1']: continue
record_repo='local'
record_uoa=model_tags+'-'+lib_tags
# Prepare pipeline.
ck.out('---------------------------------------------------------------------------------------')
ck.out('%s - %s' % (lib_name, lib_uoa))
ck.out('%s - %s' % (model_name, model_uoa))
ck.out('Experiment - %s:%s' % (record_repo, record_uoa))
# Prepare autotuning input.
cpipeline=copy.deepcopy(pipeline)
# Reset deps and change UOA.
new_deps={'lib-tensorrt':copy.deepcopy(depl),
'caffemodel':copy.deepcopy(depm)}
new_deps['lib-tensorrt']['uoa']=lib_uoa
new_deps['caffemodel']['uoa']=model_uoa
jj={'action':'resolve',
'module_uoa':'env',
model_tags = model_tags.group('tags').replace(' ', '').replace(',', '-')
else:
model_tags=''
for tag in r['dict']['tags']:
if model_tags!='': model_tags+='-'
model_tags+=tag
# Skip some models with "in [..]" or "not in [..]".
if model_tags not in ['bvlc-alexnet','bvlc-googlenet','deepscale-squeezenet-1.1']: continue
record_repo='local'
record_uoa=model_tags+'-'+lib_tags
# Prepare pipeline.
ck.out('---------------------------------------------------------------------------------------')
ck.out('%s - %s' % (lib_name, lib_uoa))
ck.out('%s - %s' % (model_name, model_uoa))
ck.out('Experiment - %s:%s' % (record_repo, record_uoa))
# Prepare autotuning input.
cpipeline=copy.deepcopy(pipeline)
# Reset deps and change UOA.
new_deps={'lib-tensorrt':copy.deepcopy(depl),
'caffemodel':copy.deepcopy(depm)}
new_deps['lib-tensorrt']['uoa']=lib_uoa
new_deps['caffemodel']['uoa']=model_uoa
jj={'action':'resolve',
'module_uoa':'env',
'host_os':hos,
'data_uoa':model_uoa}
r=ck.access(ii)
if r['return']>0: return r
# Get the tags from e.g. 'TensorFlow python model and weights (squeezenet)'.
model_name=r['data_name']
model_tags = re.match('TensorFlow python model and weights \((?P.*)\)', model_name)
model_tags = model_tags.group('tags').replace(' ', '').replace(',', '-').lower()
# Skip some models with "in [..]" or "not in [..]".
if model_tags not in [ 'squeezenet', 'googlenet', 'alexnet' ]: continue
record_repo='local'
record_uoa=model_tags+'-'+lib_tags
# Prepare pipeline.
ck.out('---------------------------------------------------------------------------------------')
ck.out('%s - %s' % (lib_name, lib_uoa))
ck.out('%s - %s' % (model_name, model_uoa))
ck.out('Experiment - %s:%s' % (record_repo, record_uoa))
# Prepare autotuning input.
cpipeline=copy.deepcopy(pipeline)
# Reset deps and change UOA.
new_deps={'lib-tensorflow':copy.deepcopy(depl),
'squeezedet':copy.deepcopy(depm)}
new_deps['lib-tensorflow']['uoa']=lib_uoa
new_deps['squeezedet']['uoa']=model_uoa
jj={'action':'resolve',
'module_uoa':'env',
'host_os':hos,
'module_uoa':'env',
'data_uoa':model_uoa}
r=ck.access(ii)
if r['return']>0: return r
# Get the tags from e.g. 'TensorFlow python model and weights (squeezenet)'.
model_name=r['data_name']
model_tags = re.match('TensorFlow python model and weights \((?P.*)\)', model_name)
model_tags = model_tags.group('tags').replace(' ', '').replace(',', '-').lower()
# Skip some models with "in [..]" or "not in [..]".
if model_tags not in [ 'squeezenet', 'googlenet', 'mobilenet-1.0-224' ]: continue # 'alexnet'
record_repo='local'
record_uoa=model_tags+'-'+lib_tags
# Prepare pipeline.
ck.out('---------------------------------------------------------------------------------------')
ck.out('%s - %s' % (lib_name, lib_uoa))
ck.out('%s - %s' % (model_name, model_uoa))
ck.out('Experiment - %s:%s' % (record_repo, record_uoa))
# Prepare autotuning input.
cpipeline=copy.deepcopy(pipeline)
# Reset deps and change UOA.
new_deps={'lib-tensorflow':copy.deepcopy(depl),
'squeezedet':copy.deepcopy(depm)}
new_deps['lib-tensorflow']['uoa']=lib_uoa
new_deps['squeezedet']['uoa']=model_uoa
jj={'action':'resolve',
'module_uoa':'env',
'module_uoa':'env',
'data_uoa':model_uoa}
r=ck.access(ii)
if r['return']>0: return r
# Get the tags from e.g. 'TensorFlow python model and weights (squeezenet)'.
model_name=r['data_name']
model_tags = re.match('TensorFlow python model and weights \((?P.*)\)', model_name)
model_tags = model_tags.group('tags').replace(' ', '').replace(',', '-').lower()
# Skip some models with "in [..]" or "not in [..]".
if model_tags not in [ 'squeezenet', 'googlenet', 'alexnet' ]: continue
record_repo='local'
record_uoa=model_tags+'-'+lib_tags
# Prepare pipeline.
ck.out('---------------------------------------------------------------------------------------')
ck.out('%s - %s' % (lib_name, lib_uoa))
ck.out('%s - %s' % (model_name, model_uoa))
ck.out('Experiment - %s:%s' % (record_repo, record_uoa))
# Prepare autotuning input.
cpipeline=copy.deepcopy(pipeline)
# Reset deps and change UOA.
new_deps={'lib-tensorflow':copy.deepcopy(depl),
'squeezedet':copy.deepcopy(depm)}
new_deps['lib-tensorflow']['uoa']=lib_uoa
new_deps['squeezedet']['uoa']=model_uoa
jj={'action':'resolve',
'module_uoa':'env',