How to use the ck.kernel.out 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.py View on Github external
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)
github ctuning / ck-tensorflow / script / tf-mobilnet-classification-benchmark.py View on Github external
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,
github ctuning / ck-tensorrt / script / explore-accuracy / explore-accuracy.py View on Github external
'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',
github ctuning / ck-tensorrt / script / explore-batch-size-libs-models / benchmark.nvidia-gtx1080.py View on Github external
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',
github ctuning / ck-tensorrt / script / explore-batch-size-libs-models / benchmark.nvidia-gtx1080.py View on Github external
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,
github ctuning / ck-tensorflow / program / image-classification-tf-py / benchmark.nvidia-gtx1080.py View on Github external
'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,
github ctuning / ck-tensorflow / program / image-classification-tf-py / benchmark.nvidia-tx1.py View on Github external
'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',
github ctuning / ck-tensorflow / program / image-classification-tf-py / benchmark.nvidia-gtx1080.py View on Github external
'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',

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 2 months ago

Package Health Score

81 / 100
Full package analysis

Similar packages