Skip to content

Commit

Permalink
added soft,package and program for FAI-PEP
Browse files Browse the repository at this point in the history
  • Loading branch information
gfursin committed Nov 26, 2018
1 parent cf262f8 commit b69f069
Show file tree
Hide file tree
Showing 20 changed files with 255 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* 2018.11.26 - [FGG] added soft,package and program for FAI-PEP

* 2018.09.25 - [FGG] added package:lib-opencv-3.4.3

* 2018.07.09 - [FGG] moved package:lib-openmpi-1.10.3-universal to ck-env
Expand Down
1 change: 1 addition & 0 deletions package/.cm/alias-a-bench-fai-pep-master
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7e8f441ac9d7fe0c
1 change: 1 addition & 0 deletions package/.cm/alias-u-7e8f441ac9d7fe0c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bench-fai-pep-master
1 change: 1 addition & 0 deletions package/bench-fai-pep-master/.cm/desc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
21 changes: 21 additions & 0 deletions package/bench-fai-pep-master/.cm/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"backup_data_uid": "7e8f441ac9d7fe0c",
"backup_module_uid": "1dc07ee0f4742028",
"backup_module_uoa": "package",
"control": {
"author": "cTuning foundation",
"author_email": "admin@cTuning.org",
"author_webpage": "http://cTuning.org",
"copyright": "See CK COPYRIGHT.txt for copyright details",
"engine": "CK",
"iso_datetime": "2018-11-26T15:55:49.407800",
"license": "See CK LICENSE.txt for licensing details",
"version": [
"1",
"9",
"6",
"1"
]
},
"data_name": "bench-fai-pep-master"
}
38 changes: 38 additions & 0 deletions package/bench-fai-pep-master/.cm/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"customize": {
"extra_dir": "",
"git_src_dir": "src",
"install_env": {
"PACKAGE_AUTOGEN": "NO",
"PACKAGE_GIT": "YES",
"PACKAGE_SKIP_LINUX_MAKE": "YES",
"PACKAGE_SUB_DIR": "src",
"PACKAGE_SUB_DIR1": "src",
"PACKAGE_URL": "https://github.com/facebook/FAI-PEP"
},
"use_git_revision": "yes",
"version": "master"
},
"end_full_path_universal": "src$#sep#$benchmarking$#sep#$run_bench.py",
"need_cpu_info": "no",
"only_for_host_os_tags": [
"linux"
],
"only_for_target_os_tags": [
"linux"
],
"package_extra_name": "",
"process_script": "install",
"soft_uoa": "1a869d84eb1a1fe5",
"suggested_path": "bench-fai-pep",
"tags": [
"bench",
"facebook",
"fai-pep",
"vmaster"
],
"use_scripts_from_another_entry": {
"data_uoa": "cd9ccc74060b3d18",
"module_uoa": "script"
}
}
1 change: 1 addition & 0 deletions package/bench-fai-pep-master/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/facebook/FAI-PEP
1 change: 1 addition & 0 deletions package/lib-lapack-3.4.2-shared/.cm/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"only_for_target_os_tags": [
"linux"
],
"package_extra_name": " (shared)",
"process_script": "process",
"soft_uoa": "4069972dfce0f22d",
"suggested_path": "lapack",
Expand Down
1 change: 1 addition & 0 deletions program/.cm/alias-a-fai-pep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b28273356e4b90a9
1 change: 1 addition & 0 deletions program/.cm/alias-u-b28273356e4b90a9
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fai-pep
1 change: 1 addition & 0 deletions program/fai-pep/.cm/desc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
21 changes: 21 additions & 0 deletions program/fai-pep/.cm/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"backup_data_uid": "b28273356e4b90a9",
"backup_module_uid": "b0ac08fe1d3c2615",
"backup_module_uoa": "program",
"control": {
"author": "cTuning foundation",
"author_email": "admin@cTuning.org",
"author_webpage": "http://cTuning.org",
"copyright": "See CK COPYRIGHT.txt for copyright details",
"engine": "CK",
"iso_datetime": "2018-11-26T16:07:44.939307",
"license": "See CK LICENSE.txt for licensing details",
"version": [
"1",
"9",
"6",
"1"
]
},
"data_name": "fai-pep"
}
35 changes: 35 additions & 0 deletions program/fai-pep/.cm/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"backup_data_uid": "b28273356e4b90a9",
"data_name": "fai-pep",
"no_compile": "yes",
"no_target_file": "yes",
"only_for_target_os_tags": [
"linux"
],
"program": "yes",
"process_in_tmp": "yes",
"run_cmds": {
"shufflenet": {
"run_deps": {
"bench-fai-pep": {
"local": "yes",
"name": "FAI-PEP AI benchmark",
"sort": 20,
"tags": "bench,fai-pep"
},
"python": {
"local": "yes",
"name": "Python",
"sort": 10,
"tags": "compiler,python"
}
},
"run_time": {
"run_cmd_main": "../ck_run_shufflenet.sh"
}
}
},
"tags": [
"fai-pep"
]
}
5 changes: 5 additions & 0 deletions program/fai-pep/ck_run_shufflenet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

cd ${CK_ENV_BENCH_FAI_PEP}

${CK_ENV_COMPILER_PYTHON_FILE} benchmarking/run_bench.py -b specifications/models/caffe2/shufflenet/shufflenet.json
1 change: 1 addition & 0 deletions soft/.cm/alias-a-bench.fai-pep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1a869d84eb1a1fe5
1 change: 1 addition & 0 deletions soft/.cm/alias-u-1a869d84eb1a1fe5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bench.fai-pep
1 change: 1 addition & 0 deletions soft/bench.fai-pep/.cm/desc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
16 changes: 16 additions & 0 deletions soft/bench.fai-pep/.cm/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"backup_data_uid": "1a869d84eb1a1fe5",
"backup_module_uid": "5e1100048ab875d7",
"backup_module_uoa": "soft",
"control": {
"engine": "CK",
"iso_datetime": "2018-11-26T15:48:27.402206",
"version": [
"1",
"9",
"6",
"1"
]
},
"data_name": "bench.fai-pep"
}
19 changes: 19 additions & 0 deletions soft/bench.fai-pep/.cm/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"auto_detect": "yes",
"customize": {
"check_that_exists": "yes",
"ck_version": 10,
"env_prefix": "CK_ENV_BENCH_FAI_PEP",
"limit_recursion_dir_search": {
"linux": 4,
"win": 4
},
"soft_file_universal": "benchmarking/run_bench.py"
},
"soft_name": "AI benchmark from Facebook (FEI-PEP)",
"tags": [
"bench",
"facebook",
"fai-pep"
]
}
87 changes: 87 additions & 0 deletions soft/bench.fai-pep/customize.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#
# Collective Knowledge (individual environment - setup)
#
# See CK LICENSE.txt for licensing details
# See CK COPYRIGHT.txt for copyright details
#
# Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net
#

import os

##############################################################################
# setup environment setup

def setup(i):
"""
Input: {
cfg - meta of this soft entry
self_cfg - meta of module soft
ck_kernel - import CK kernel module (to reuse functions)
host_os_uoa - host OS UOA
host_os_uid - host OS UID
host_os_dict - host OS meta
target_os_uoa - target OS UOA
target_os_uid - target OS UID
target_os_dict - target OS meta
target_device_id - target device ID (if via ADB)
tags - list of tags used to search this entry
env - updated environment vars from meta
customize - updated customize vars from meta
deps - resolved dependencies for this soft
interactive - if 'yes', can ask questions, otherwise quiet
}
Output: {
return - return code = 0, if successful
> 0, if error
(error) - error text if return > 0
bat - prepared string for bat file
}
"""

import os

# Get variables
ck=i['ck_kernel']
s=''

iv=i.get('interactive','')

cus=i.get('customize',{})
fp=cus.get('full_path','')

hosd=i['host_os_dict']
tosd=i['target_os_dict']

sdirs=hosd.get('dir_sep','')

# Check platform
hplat=hosd.get('ck_name','')

hproc=hosd.get('processor','')
tproc=tosd.get('processor','')

remote=tosd.get('remote','')
tbits=tosd.get('bits','')

env=i['env']

p1=os.path.dirname(fp)
pi=os.path.dirname(p1)

install_env = cus.get('install_env', {})

ep=cus['env_prefix']
env[ep]=pi

return {'return':0, 'bat':s}

0 comments on commit b69f069

Please sign in to comment.