How to use the ck.kernel.err function in ck

To help you get started, we’ve selected a few ck examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ctuning / ck-clsmith / script / explore-datasets / start_analysis_from_remote.py View on Github external
ck.out('Dataset  UOA:    '+str(q[1]))
    ck.out('Dataset file:    '+str(q[2]))
    ck.out('Target OS:       '+str(q[4]))
    ck.out('OpenCL platform: '+str(q[5]))
    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_from_remote_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)
github ctuning / ck-analytics / demo / ask-advice-via-ck-ai / use_dnn_to_classify_image.py View on Github external
import ck.kernel as ck

image='use_dnn_to_classify_image.jpg'

r=ck.access({'action':'ask',
             'module_uoa':'advice',
             'to':'classify_image',
             'image':image})
if r['return']>0: ck.err(r)
github ctuning / ck-tensorflow / script / tf-mobilnet-classification-benchmark.py View on Github external
### end pipeline
    return {'return':0}

##############################################################################################
parser = argparse.ArgumentParser(description='Pipeline')
parser.add_argument("--target_os", action="store", dest="tos")
parser.add_argument("--device_id", action="store", dest="did")
parser.add_argument("--accuracy", action="store_true", default=False, dest="accuracy")
parser.add_argument("--repetitions", action="store", default=10, dest="repetitions")
parser.add_argument("--random_name", action="store_true", default=False, dest="random_name")
parser.add_argument("--share_platform", action="store_true", default=False, dest="share_platform")

myarg=parser.parse_args()

r=do({}, myarg)
if r['return']>0: ck.err(r)
github ctuning / ck-clsmith / script / explore-datasets / start_analysis.py View on Github external
"##choices#target_os", 
      "##characteristics#run#run_time_state#opencl_platform", 
      "##characteristics#run#run_time_state#opencl_device", 
      "##characteristics#run#run_time_state#opencl_device_units", 
      "##features#compiler_version#raw@0", 
      "##choices#cmd_key",
      "##characteristics#run#return_code",
      "##characteristics#run#run_time_state#positive_results",
      "##characteristics#run#run_time_state#negative_results"
    ],
    "flat_keys_list_ext":"#min",

    "ignore_graph_separation":"yes"}

r=ck.access(ii)
if r['return']>0: ck.err(r)

table=r['table'].get('0',[])
real_keys=r.get('real_keys',[])

# Print failures
for q in table:
    ck.out('')
    ck.out('Dataset  UOA:    '+str(q[1]))
    ck.out('Dataset file:    '+str(q[2]))
    ck.out('Target OS:       '+str(q[4]))
    ck.out('OpenCL platform: '+str(q[5]))
    ck.out('OpenCL device:   '+str(q[6]))
    ck.out('Compiler:        '+str(q[8]))

# Convert to csv
ii={"action":"convert_table_to_csv",
github ctuning / ck-tensorflow / program / image-classification-tf-py / benchmark.nvidia-gtx1080.py View on Github external
r=ck.access(ii)
                if r['return']>0: return r
                fail=r.get('fail','')
                if fail=='yes':
                    return {'return':10, 'error':'pipeline failed ('+r.get('fail_reason','')+')'}

    return {'return':0}

parser = argparse.ArgumentParser(description='Pipeline')
parser.add_argument("--target_os", action="store", dest="tos")
parser.add_argument("--device_id", action="store", dest="did")
myarg=parser.parse_args()


r=do({}, myarg)
if r['return']>0: ck.err(r)
github ctuning / ck-tensorrt / script / explore-accuracy / explore-accuracy.py View on Github external
'tags':['accuracy', 'imagenet-val', model_tags, lib_tags],

                'pipeline':cpipeline,
                'out':'con'}

            r=ck.access(ii)
            if r['return']>0: return r

            fail=r.get('fail','')
            if fail=='yes':
                return {'return':10, 'error':'pipeline failed ('+r.get('fail_reason','')+')'}

    return {'return':0}

r=do({})
if r['return']>0: ck.err(r)
github ctuning / ck-tensorrt / script / explore-batch-size-libs-models / benchmark.nvidia-gtx1080.py View on Github external
'tags':['explore-batch-size-libs-models', platform_tags, model_tags, lib_tags],

                'pipeline':cpipeline,
                'out':'con'}

            r=ck.access(ii)
            if r['return']>0: return r

            fail=r.get('fail','')
            if fail=='yes':
                return {'return':10, 'error':'pipeline failed ('+r.get('fail_reason','')+')'}

    return {'return':0}

r=do({})
if r['return']>0: ck.err(r)
github ctuning / ck-tensorflow / program / image-classification-tf-py / benchmark.nvidia-tx1.py View on Github external
r=ck.access(ii)
                if r['return']>0: return r
                fail=r.get('fail','')
                if fail=='yes':
                    return {'return':10, 'error':'pipeline failed ('+r.get('fail_reason','')+')'}

    return {'return':0}

parser = argparse.ArgumentParser(description='Pipeline')
parser.add_argument("--target_os", action="store", dest="tos")
parser.add_argument("--device_id", action="store", dest="did")
myarg=parser.parse_args()


r=do({}, myarg)
if r['return']>0: ck.err(r)

ck

Collective Knowledge - a lightweight knowledge manager to organize, cross-link, share and reuse artifacts and workflows based on FAIR principles

Apache-2.0
Latest version published 4 months ago

Package Health Score

78 / 100
Full package analysis

Similar packages