Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (55 sloc) 2.5 KB
#
# Collective Knowledge (platform - Neural Network accelerator)
#
# 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
##############################################################################
# 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}
##############################################################################
# Detect Neural Network Accelerator
def detect(i):
"""
Input: {
(target) - if specified, use info from 'machine' module
(host_os) - host OS (detect, if omitted)
(os) or (target_os) - OS module to check (if omitted, analyze host)
(device_id) - device id if remote (such as adb)
(skip_device_init) - if 'yes', do not initialize device
(print_device_info) - if 'yes', print extra device info
(skip_info_collection) - if 'yes', do not collect info (particularly for remote)
(skip_print_os_info) - if 'yes', do not print OS info
(exchange) - if 'yes', exchange info with some repo (by default, remote-ck)
(share) - the same as 'exchange'
(exchange_repo) - which repo to record/update info (remote-ck by default)
(exchange_subrepo) - if remote, remote repo UOA
(exchange_locally) - if 'yes', exchange locally
(extra_info) - extra info about author, etc (see add from CK kernel)
}
Output: {
return - return code = 0, if successful
> 0, if error
(error) - error text if return > 0
features = {
nn - Neural Network Accelerator features (properties), unified
nn_misc - assorted Neural Network Accelerator features (properties), platform dependent
}
}
"""
return {'return':1, 'error':'TBD'}