├── .cm ├── alias-a-soft ├── alias-u-5e1100048ab875d7 ├── alias-a-dataset ├── alias-a-module ├── alias-a-package ├── alias-a-program ├── alias-a-script ├── alias-u-032630d041b4fd8a ├── alias-u-1dc07ee0f4742028 ├── alias-u-84e27ad9dd12e734 ├── alias-u-8a7141c59cd335f5 └── alias-u-b0ac08fe1d3c2615 ├── module ├── caffe2 │ ├── .cm │ │ ├── desc.json │ │ ├── updates.json │ │ ├── info.json │ │ └── meta.json │ └── module.py ├── .cm │ ├── alias-a-caffe2 │ ├── alias-u-95a1719259c1a699 │ ├── alias-a-experiment.bench.caffe2 │ └── alias-u-75114c4997197226 └── experiment.bench.caffe2 │ └── .cm │ ├── desc.json │ ├── info.json │ └── meta.json ├── program ├── caffe2 │ ├── .cm │ │ ├── desc.json │ │ ├── info.json │ │ └── meta.json │ ├── README.txt │ ├── preprocess.py │ ├── postprocess_time.py │ ├── classify.py │ └── convnet_benchmarks.py.LICENSE └── .cm │ ├── alias-a-caffe2 │ └── alias-u-883cc4dde19eb5b8 ├── soft ├── lib.caffe2 │ ├── .cm │ │ ├── desc.json │ │ ├── meta.json │ │ └── info.json │ └── customize.py ├── model.caffe2 │ ├── .cm │ │ ├── desc.json │ │ ├── meta.json │ │ └── info.json │ └── customize.py └── .cm │ ├── alias-a-lib.caffe2 │ ├── alias-u-54c5b933f17fb81c │ ├── alias-a-model.caffe2 │ └── alias-u-0512081c543edb2e ├── .gitignore ├── dataset ├── caffe2-benchmark-alexnet │ └── .cm │ │ ├── desc.json │ │ ├── meta.json │ │ └── info.json ├── caffe2-benchmark-mlp │ └── .cm │ │ ├── desc.json │ │ ├── meta.json │ │ └── info.json ├── caffe2-benchmark-vgga │ └── .cm │ │ ├── desc.json │ │ ├── meta.json │ │ └── info.json ├── caffe2-benchmark-inception │ └── .cm │ │ ├── desc.json │ │ ├── meta.json │ │ └── info.json ├── caffe2-benchmark-overfeat │ └── .cm │ │ ├── desc.json │ │ ├── meta.json │ │ └── info.json └── .cm │ ├── alias-a-caffe2-benchmark-mlp │ ├── alias-a-caffe2-benchmark-vgga │ ├── alias-u-1b8d4f4697e31bea │ ├── alias-u-e3b914761bf14309 │ ├── alias-a-caffe2-benchmark-alexnet │ ├── alias-a-caffe2-benchmark-inception │ ├── alias-a-caffe2-benchmark-overfeat │ ├── alias-u-64019b561efe8297 │ ├── alias-u-aed66a134c4a92d4 │ └── alias-u-da5fee88c9ae98f9 ├── package ├── caffemodel2-bvlc-alexnet │ ├── .cm │ │ ├── desc.json │ │ ├── info.json │ │ └── meta.json │ ├── predict_net.pb │ ├── solver.prototxt │ ├── readme.md │ ├── deploy.prototxt │ └── train_val.prototxt ├── caffemodel2-resnet50 │ ├── .cm │ │ ├── desc.json │ │ ├── info.json │ │ └── meta.json │ ├── predict_net.pb │ ├── ResNet_mean.binaryproto │ └── README.md ├── caffemodel2-bvlc-googlenet │ ├── .cm │ │ ├── desc.json │ │ ├── info.json │ │ └── meta.json │ ├── predict_net.pb │ ├── quick_solver.prototxt │ ├── solver.prototxt │ └── readme.md ├── .cm │ ├── alias-a-caffemodel2-resnet50 │ ├── alias-u-018d8924975b3d69 │ ├── alias-a-caffemodel2-bvlc-alexnet │ ├── alias-a-caffemodel2-bvlc-googlenet │ ├── alias-u-1d4b2f6fff794929 │ ├── alias-u-56aa9e005f933b89 │ ├── alias-a-caffemodel2-deepscale-squeezenet-1.1 │ ├── alias-a-lib-caffe2-0.8.1-eigen-cpu-universal │ ├── alias-a-lib-caffe2-0.8.1-eigen-cuda-universal │ ├── alias-a-lib-caffe2-master-eigen-cpu-universal │ ├── alias-u-4a4171b8dfb942b5 │ ├── alias-u-d1d03644761868f6 │ ├── alias-u-e18b4816ef492b92 │ ├── alias-u-eb13a3d954b27963 │ ├── alias-a-lib-caffe2-master-eigen-cuda-universal │ └── alias-u-4d08a4158b5c2d98 ├── caffemodel2-deepscale-squeezenet-1.1 │ ├── .cm │ │ ├── desc.json │ │ ├── info.json │ │ └── meta.json │ ├── solver.prototxt │ ├── LICENSE │ ├── README.md │ ├── predict_net.pb │ └── deploy.prototxt ├── lib-caffe2-0.8.1-eigen-cpu-universal │ ├── .cm │ │ ├── desc.json │ │ ├── info.json │ │ └── meta.json │ ├── README.md │ ├── patch.win │ │ └── patch │ ├── scripts.win │ │ ├── patch-mkdir │ │ ├── install.bat.arc │ │ ├── install.bat │ │ └── install.bat.arc2 │ └── scripts.linux │ │ └── install.sh ├── lib-caffe2-0.8.1-eigen-cuda-universal │ ├── .cm │ │ ├── desc.json │ │ ├── info.json │ │ └── meta.json │ ├── README.md │ ├── patch.win │ │ └── patch │ ├── scripts.win │ │ ├── patch-mkdir │ │ └── install.bat │ └── scripts.linux │ │ └── install.sh ├── lib-caffe2-master-eigen-cpu-universal │ ├── .cm │ │ ├── desc.json │ │ ├── info.json │ │ └── meta.json │ ├── README.md │ ├── scripts.win │ │ ├── patch-mkdir │ │ ├── install.bat.arc5 │ │ ├── install.bat │ │ ├── install.bat.arc │ │ ├── install.bat.arc3 │ │ └── install.bat.arc2 │ └── scripts.linux │ │ └── install.sh └── lib-caffe2-master-eigen-cuda-universal │ ├── .cm │ ├── desc.json │ ├── info.json │ └── meta.json │ ├── README.md │ ├── scripts.win │ ├── patch-mkdir │ └── install.bat │ └── scripts.linux │ └── install.sh ├── COPYRIGHT ├── script ├── explore-batch-size-unified-and-customized │ ├── .cm │ │ ├── desc.json │ │ ├── meta.json │ │ └── info.json │ ├── autotune_simple.bat │ ├── autotune_customized.bat │ ├── autotune_customized_universal.bat │ ├── autotune_customized.json │ └── autotune_customized_universal.json └── .cm │ ├── alias-a-explore-batch-size-unified-and-customized │ └── alias-u-5a89a4a4f359122b ├── AUTHORS ├── CONTRIBUTIONS ├── .ckr.json ├── CHANGES ├── LICENSE └── README.md /.cm/alias-a-soft: -------------------------------------------------------------------------------- 1 | 5e1100048ab875d7 2 | -------------------------------------------------------------------------------- /.cm/alias-u-5e1100048ab875d7: -------------------------------------------------------------------------------- 1 | soft 2 | -------------------------------------------------------------------------------- /module/caffe2/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /program/caffe2/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /soft/lib.caffe2/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /soft/model.caffe2/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.cm/alias-a-dataset: -------------------------------------------------------------------------------- 1 | 8a7141c59cd335f5 2 | -------------------------------------------------------------------------------- /.cm/alias-a-module: -------------------------------------------------------------------------------- 1 | 032630d041b4fd8a 2 | -------------------------------------------------------------------------------- /.cm/alias-a-package: -------------------------------------------------------------------------------- 1 | 1dc07ee0f4742028 2 | -------------------------------------------------------------------------------- /.cm/alias-a-program: -------------------------------------------------------------------------------- 1 | b0ac08fe1d3c2615 2 | -------------------------------------------------------------------------------- /.cm/alias-a-script: -------------------------------------------------------------------------------- 1 | 84e27ad9dd12e734 2 | -------------------------------------------------------------------------------- /.cm/alias-u-032630d041b4fd8a: -------------------------------------------------------------------------------- 1 | module 2 | -------------------------------------------------------------------------------- /.cm/alias-u-1dc07ee0f4742028: -------------------------------------------------------------------------------- 1 | package 2 | -------------------------------------------------------------------------------- /.cm/alias-u-84e27ad9dd12e734: -------------------------------------------------------------------------------- 1 | script 2 | -------------------------------------------------------------------------------- /.cm/alias-u-8a7141c59cd335f5: -------------------------------------------------------------------------------- 1 | dataset 2 | -------------------------------------------------------------------------------- /.cm/alias-u-b0ac08fe1d3c2615: -------------------------------------------------------------------------------- 1 | program 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | tmp* 3 | __pycache__ 4 | -------------------------------------------------------------------------------- /module/.cm/alias-a-caffe2: -------------------------------------------------------------------------------- 1 | 95a1719259c1a699 2 | -------------------------------------------------------------------------------- /module/.cm/alias-u-95a1719259c1a699: -------------------------------------------------------------------------------- 1 | caffe2 2 | -------------------------------------------------------------------------------- /program/.cm/alias-a-caffe2: -------------------------------------------------------------------------------- 1 | 883cc4dde19eb5b8 2 | -------------------------------------------------------------------------------- /program/.cm/alias-u-883cc4dde19eb5b8: -------------------------------------------------------------------------------- 1 | caffe2 2 | -------------------------------------------------------------------------------- /soft/.cm/alias-a-lib.caffe2: -------------------------------------------------------------------------------- 1 | 54c5b933f17fb81c 2 | -------------------------------------------------------------------------------- /soft/.cm/alias-u-54c5b933f17fb81c: -------------------------------------------------------------------------------- 1 | lib.caffe2 2 | -------------------------------------------------------------------------------- /dataset/caffe2-benchmark-alexnet/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /dataset/caffe2-benchmark-mlp/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /dataset/caffe2-benchmark-vgga/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /module/experiment.bench.caffe2/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /package/caffemodel2-bvlc-alexnet/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /package/caffemodel2-resnet50/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /soft/.cm/alias-a-model.caffe2: -------------------------------------------------------------------------------- 1 | 0512081c543edb2e 2 | -------------------------------------------------------------------------------- /soft/.cm/alias-u-0512081c543edb2e: -------------------------------------------------------------------------------- 1 | model.caffe2 2 | -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | 2017-2018 (C)opyright cTuning foundation 2 | -------------------------------------------------------------------------------- /dataset/caffe2-benchmark-inception/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /dataset/caffe2-benchmark-overfeat/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /package/caffemodel2-bvlc-googlenet/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /dataset/.cm/alias-a-caffe2-benchmark-mlp: -------------------------------------------------------------------------------- 1 | e3b914761bf14309 2 | -------------------------------------------------------------------------------- /dataset/.cm/alias-a-caffe2-benchmark-vgga: -------------------------------------------------------------------------------- 1 | 1b8d4f4697e31bea 2 | -------------------------------------------------------------------------------- /dataset/.cm/alias-u-1b8d4f4697e31bea: -------------------------------------------------------------------------------- 1 | caffe2-benchmark-vgga 2 | -------------------------------------------------------------------------------- /dataset/.cm/alias-u-e3b914761bf14309: -------------------------------------------------------------------------------- 1 | caffe2-benchmark-mlp 2 | -------------------------------------------------------------------------------- /module/.cm/alias-a-experiment.bench.caffe2: -------------------------------------------------------------------------------- 1 | 75114c4997197226 2 | -------------------------------------------------------------------------------- /module/.cm/alias-u-75114c4997197226: -------------------------------------------------------------------------------- 1 | experiment.bench.caffe2 2 | -------------------------------------------------------------------------------- /package/.cm/alias-a-caffemodel2-resnet50: -------------------------------------------------------------------------------- 1 | 018d8924975b3d69 2 | -------------------------------------------------------------------------------- /package/.cm/alias-u-018d8924975b3d69: -------------------------------------------------------------------------------- 1 | caffemodel2-resnet50 2 | -------------------------------------------------------------------------------- /dataset/.cm/alias-a-caffe2-benchmark-alexnet: -------------------------------------------------------------------------------- 1 | 64019b561efe8297 2 | -------------------------------------------------------------------------------- /dataset/.cm/alias-a-caffe2-benchmark-inception: -------------------------------------------------------------------------------- 1 | aed66a134c4a92d4 2 | -------------------------------------------------------------------------------- /dataset/.cm/alias-a-caffe2-benchmark-overfeat: -------------------------------------------------------------------------------- 1 | da5fee88c9ae98f9 2 | -------------------------------------------------------------------------------- /dataset/.cm/alias-u-64019b561efe8297: -------------------------------------------------------------------------------- 1 | caffe2-benchmark-alexnet 2 | -------------------------------------------------------------------------------- /dataset/.cm/alias-u-aed66a134c4a92d4: -------------------------------------------------------------------------------- 1 | caffe2-benchmark-inception 2 | -------------------------------------------------------------------------------- /dataset/.cm/alias-u-da5fee88c9ae98f9: -------------------------------------------------------------------------------- 1 | caffe2-benchmark-overfeat 2 | -------------------------------------------------------------------------------- /package/.cm/alias-a-caffemodel2-bvlc-alexnet: -------------------------------------------------------------------------------- 1 | 56aa9e005f933b89 2 | -------------------------------------------------------------------------------- /package/.cm/alias-a-caffemodel2-bvlc-googlenet: -------------------------------------------------------------------------------- 1 | 1d4b2f6fff794929 2 | -------------------------------------------------------------------------------- /package/.cm/alias-u-1d4b2f6fff794929: -------------------------------------------------------------------------------- 1 | caffemodel2-bvlc-googlenet 2 | -------------------------------------------------------------------------------- /package/.cm/alias-u-56aa9e005f933b89: -------------------------------------------------------------------------------- 1 | caffemodel2-bvlc-alexnet 2 | -------------------------------------------------------------------------------- /package/caffemodel2-deepscale-squeezenet-1.1/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cpu-universal/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cuda-universal/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cpu-universal/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cuda-universal/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /script/explore-batch-size-unified-and-customized/.cm/desc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /script/explore-batch-size-unified-and-customized/.cm/meta.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /package/.cm/alias-a-caffemodel2-deepscale-squeezenet-1.1: -------------------------------------------------------------------------------- 1 | d1d03644761868f6 2 | -------------------------------------------------------------------------------- /package/.cm/alias-a-lib-caffe2-0.8.1-eigen-cpu-universal: -------------------------------------------------------------------------------- 1 | e18b4816ef492b92 2 | -------------------------------------------------------------------------------- /package/.cm/alias-a-lib-caffe2-0.8.1-eigen-cuda-universal: -------------------------------------------------------------------------------- 1 | eb13a3d954b27963 2 | -------------------------------------------------------------------------------- /package/.cm/alias-a-lib-caffe2-master-eigen-cpu-universal: -------------------------------------------------------------------------------- 1 | 4a4171b8dfb942b5 2 | -------------------------------------------------------------------------------- /package/.cm/alias-u-4a4171b8dfb942b5: -------------------------------------------------------------------------------- 1 | lib-caffe2-master-eigen-cpu-universal 2 | -------------------------------------------------------------------------------- /package/.cm/alias-u-d1d03644761868f6: -------------------------------------------------------------------------------- 1 | caffemodel2-deepscale-squeezenet-1.1 2 | -------------------------------------------------------------------------------- /package/.cm/alias-u-e18b4816ef492b92: -------------------------------------------------------------------------------- 1 | lib-caffe2-0.8.1-eigen-cpu-universal 2 | -------------------------------------------------------------------------------- /package/.cm/alias-u-eb13a3d954b27963: -------------------------------------------------------------------------------- 1 | lib-caffe2-0.8.1-eigen-cuda-universal 2 | -------------------------------------------------------------------------------- /package/.cm/alias-a-lib-caffe2-master-eigen-cuda-universal: -------------------------------------------------------------------------------- 1 | 4d08a4158b5c2d98 2 | -------------------------------------------------------------------------------- /package/.cm/alias-u-4d08a4158b5c2d98: -------------------------------------------------------------------------------- 1 | lib-caffe2-master-eigen-cuda-universal 2 | -------------------------------------------------------------------------------- /script/.cm/alias-a-explore-batch-size-unified-and-customized: -------------------------------------------------------------------------------- 1 | 5a89a4a4f359122b 2 | -------------------------------------------------------------------------------- /script/.cm/alias-u-5a89a4a4f359122b: -------------------------------------------------------------------------------- 1 | explore-batch-size-unified-and-customized 2 | -------------------------------------------------------------------------------- /script/explore-batch-size-unified-and-customized/autotune_simple.bat: -------------------------------------------------------------------------------- 1 | ck autotune caffe2 2 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cpu-universal/README.md: -------------------------------------------------------------------------------- 1 | CK workflows for https://github.com/caffe2/caffe2 2 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cuda-universal/README.md: -------------------------------------------------------------------------------- 1 | CK workflows for https://github.com/caffe2/caffe2 2 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cuda-universal/README.md: -------------------------------------------------------------------------------- 1 | CK workflows for https://github.com/caffe2/caffe2 2 | -------------------------------------------------------------------------------- /package/caffemodel2-resnet50/predict_net.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dividiti/ck-caffe2/master/package/caffemodel2-resnet50/predict_net.pb -------------------------------------------------------------------------------- /package/caffemodel2-bvlc-alexnet/predict_net.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dividiti/ck-caffe2/master/package/caffemodel2-bvlc-alexnet/predict_net.pb -------------------------------------------------------------------------------- /package/caffemodel2-bvlc-googlenet/predict_net.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dividiti/ck-caffe2/master/package/caffemodel2-bvlc-googlenet/predict_net.pb -------------------------------------------------------------------------------- /package/caffemodel2-resnet50/ResNet_mean.binaryproto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dividiti/ck-caffe2/master/package/caffemodel2-resnet50/ResNet_mean.binaryproto -------------------------------------------------------------------------------- /script/explore-batch-size-unified-and-customized/autotune_customized.bat: -------------------------------------------------------------------------------- 1 | ck autotune program:caffe2 @autotune_customized.json --new --skip_collaborative --extra_tags=dnn 2 | -------------------------------------------------------------------------------- /program/caffe2/README.txt: -------------------------------------------------------------------------------- 1 | Example is taken from https://caffe2.ai/docs/tutorial-loading-pre-trained-models.html 2 | and converted to CK format by Grigori Fursin (2017 May) 3 | 4 | -------------------------------------------------------------------------------- /dataset/caffe2-benchmark-mlp/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "tags": [ 3 | "dataset", 4 | "benchmark", 5 | "caffe2", 6 | "mlp", 7 | "vcpu", 8 | "vcuda" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /dataset/caffe2-benchmark-vgga/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "tags":[ 3 | "dataset", 4 | "benchmark", 5 | "caffe2", 6 | "vgga", 7 | "vcpu", 8 | "vcuda" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /dataset/caffe2-benchmark-alexnet/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "tags":[ 3 | "dataset", 4 | "benchmark", 5 | "caffe2", 6 | "alexnet", 7 | "vcpu", 8 | "vcuda" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /dataset/caffe2-benchmark-overfeat/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "tags":[ 3 | "dataset", 4 | "benchmark", 5 | "caffe2", 6 | "overfeat", 7 | "vcpu", 8 | "vcuda" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /dataset/caffe2-benchmark-inception/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "tags":[ 3 | "dataset", 4 | "benchmark", 5 | "caffe2", 6 | "inception", 7 | "vcpu", 8 | "vcuda" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cpu-universal/README.md: -------------------------------------------------------------------------------- 1 | CK workflows for https://github.com/caffe2/caffe2 2 | 3 | This package has an issue on Windows with ProtoBuf - need to be able to add custom protobuf ... 4 | -------------------------------------------------------------------------------- /script/explore-batch-size-unified-and-customized/autotune_customized_universal.bat: -------------------------------------------------------------------------------- 1 | ck autotune program:caffe2 @autotune_customized_universal.json --new --skip_collaborative --scenario=experiment.tune.custom.dimensions 2 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | ================================================================================ 2 | N: Grigori Fursin 3 | E: grigori@dividiti.com 4 | H: http://fursin.net/research 5 | O: dividiti / cTuning foundation 6 | C: Concept, implementation 7 | W: 8 | -------------------------------------------------------------------------------- /package/caffemodel2-resnet50/README.md: -------------------------------------------------------------------------------- 1 | Kaiming He, Xiangyu Zhang, Shaoqing Ren and Jian Sun from Microsoft Research Asia designed several [Deep Residual Networks](https://github.com/KaimingHe/deep-residual-networks) and released them under the [MIT license](https://github.com/KaimingHe/deep-residual-networks/blob/master/LICENSE). 2 | -------------------------------------------------------------------------------- /program/caffe2/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "883cc4dde19eb5b8", 3 | "backup_module_uid": "b0ac08fe1d3c2615", 4 | "backup_module_uoa": "program", 5 | "control": { 6 | "engine": "CK", 7 | "iso_datetime": "2017-05-14T16:12:36.545992", 8 | "version": [ 9 | "1", 10 | "9", 11 | "1", 12 | "1" 13 | ] 14 | }, 15 | "data_name": "caffe2" 16 | } 17 | -------------------------------------------------------------------------------- /package/caffemodel2-bvlc-alexnet/solver.prototxt: -------------------------------------------------------------------------------- 1 | net: "models/bvlc_alexnet/train_val.prototxt" 2 | test_iter: 1000 3 | test_interval: 1000 4 | base_lr: 0.01 5 | lr_policy: "step" 6 | gamma: 0.1 7 | stepsize: 100000 8 | display: 20 9 | max_iter: 450000 10 | momentum: 0.9 11 | weight_decay: 0.0005 12 | snapshot: 10000 13 | snapshot_prefix: "models/bvlc_alexnet/caffe_alexnet_train" 14 | solver_mode: GPU 15 | -------------------------------------------------------------------------------- /package/caffemodel2-resnet50/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "018d8924975b3d69", 3 | "backup_module_uid": "1dc07ee0f4742028", 4 | "backup_module_uoa": "package", 5 | "control": { 6 | "engine": "CK", 7 | "iso_datetime": "2017-05-14T17:23:51.710766", 8 | "version": [ 9 | "1", 10 | "9", 11 | "1", 12 | "1" 13 | ] 14 | }, 15 | "data_name": "caffemodel2-resnet50" 16 | } 17 | -------------------------------------------------------------------------------- /CONTRIBUTIONS: -------------------------------------------------------------------------------- 1 | CK-Caffe2 is provided under a standard (3-clause) BSD license. 2 | 3 | Contributions (as pull requests or patches) are most welcome)! 4 | Please document them below. 5 | 6 | ================================================================================ 7 | N: Grigori Fursin 8 | E: grigori@dividiti.com 9 | H: http://fursin.net/research 10 | O: dividiti / cTuning foundation 11 | C: Concept, implementation 12 | W: 13 | -------------------------------------------------------------------------------- /package/caffemodel2-bvlc-googlenet/quick_solver.prototxt: -------------------------------------------------------------------------------- 1 | net: "models/bvlc_googlenet/train_val.prototxt" 2 | test_iter: 1000 3 | test_interval: 4000 4 | test_initialization: false 5 | display: 40 6 | average_loss: 40 7 | base_lr: 0.01 8 | lr_policy: "poly" 9 | power: 0.5 10 | max_iter: 2400000 11 | momentum: 0.9 12 | weight_decay: 0.0002 13 | snapshot: 40000 14 | snapshot_prefix: "models/bvlc_googlenet/bvlc_googlenet_quick" 15 | solver_mode: GPU 16 | -------------------------------------------------------------------------------- /package/caffemodel2-bvlc-googlenet/solver.prototxt: -------------------------------------------------------------------------------- 1 | net: "models/bvlc_googlenet/train_val.prototxt" 2 | test_iter: 1000 3 | test_interval: 4000 4 | test_initialization: false 5 | display: 40 6 | average_loss: 40 7 | base_lr: 0.01 8 | lr_policy: "step" 9 | stepsize: 320000 10 | gamma: 0.96 11 | max_iter: 10000000 12 | momentum: 0.9 13 | weight_decay: 0.0002 14 | snapshot: 40000 15 | snapshot_prefix: "models/bvlc_googlenet/bvlc_googlenet" 16 | solver_mode: GPU 17 | -------------------------------------------------------------------------------- /.ckr.json: -------------------------------------------------------------------------------- 1 | { 2 | "data_uid": "b8adffa0791cb38a", 3 | "data_name": "ck-caffe2", 4 | "dict": { 5 | "url": "https://github.com/ctuning/ck-caffe2", 6 | "shared": "git", 7 | "repo_deps": [ 8 | { 9 | "repo_uoa": "ck-autotuning" 10 | }, 11 | { 12 | "repo_uoa": "ck-math" 13 | }, 14 | { 15 | "repo_uoa": "ck-caffe" 16 | } 17 | ] 18 | }, 19 | "data_alias": "ck-caffe2", 20 | "data_uoa": "ck-caffe2" 21 | } 22 | -------------------------------------------------------------------------------- /script/explore-batch-size-unified-and-customized/autotune_customized.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmd_keys":["time_cpu","time_cuda"], 3 | "experiment_0_pipeline_update": { 4 | "pipeline":{"choices":{"env":{"BATCH_SIZE":8}}} 5 | }, 6 | "choices_order": [ 7 | [ 8 | "##env#BATCH_SIZE" 9 | ] 10 | ], 11 | "choices_selection": [ 12 | {"type":"loop", "choice":[3,6]} 13 | ], 14 | "repetitions": 1, 15 | "seed": 12345, 16 | "iterations": -1, 17 | "sleep":0 18 | } 19 | -------------------------------------------------------------------------------- /package/caffemodel2-bvlc-googlenet/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "1d4b2f6fff794929", 3 | "backup_module_uid": "1dc07ee0f4742028", 4 | "backup_module_uoa": "package", 5 | "control": { 6 | "author": "Sergio Guadarrama", 7 | "engine": "CK", 8 | "iso_datetime": "2017-05-14T17:12:44.074068", 9 | "license": "unrestricted (see readme.me)", 10 | "version": [ 11 | "1", 12 | "9", 13 | "1", 14 | "1" 15 | ] 16 | }, 17 | "data_name": "caffemodel2-bvlc-googlenet" 18 | } 19 | -------------------------------------------------------------------------------- /CHANGES: -------------------------------------------------------------------------------- 1 | 2017.05.18 - added customizable autotuning example (script:explore-batch-size-unified-and-customized ; ck autotune caffe2) 2 | 3 | 2017.05.16 - added first prototype of benchmarking via CK 4 | - unified benchmarking 5 | - started adding crowdbenchmarking via CK 6 | 7 | 2017.05.14 - added support for Caffe2 unified image classification via CK 8 | 9 | 2017.05.13 - added CUDA version 10 | 11 | 2017.05.08 - added first simple CK package example for Caffe2 (Linux and partially Windows) 12 | 13 | 14 | -------------------------------------------------------------------------------- /soft/lib.caffe2/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "auto_detect": "yes", 3 | "customize": { 4 | "check_that_exists": "yes", 5 | "ck_version": 10, 6 | "env_prefix": "CK_ENV_LIB_CAFFE2", 7 | "limit_recursion_dir_search": { 8 | "linux": 4, 9 | "win": 4 10 | }, 11 | "soft_file": { 12 | "linux": "libcaffe2.so", 13 | "win": "caffe2.exe" 14 | } 15 | }, 16 | "deps": {}, 17 | "soft_name": "Facebook Caffe2 framework", 18 | "tags": [ 19 | "lib", 20 | "facebook", 21 | "caffe2" 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /module/caffe2/.cm/updates.json: -------------------------------------------------------------------------------- 1 | { 2 | "control": [ 3 | { 4 | "author": "Grigori Fursin", 5 | "author_email": "Grigori.Fursin@cTuning.org", 6 | "author_webpage": "http://fursin.net", 7 | "copyright": "See CK COPYRIGHT.txt for copyright details", 8 | "engine": "CK", 9 | "iso_datetime": "2017-05-18T15:03:03.319771", 10 | "license": "See CK LICENSE.txt for licensing details", 11 | "version": [ 12 | "1", 13 | "9", 14 | "1", 15 | "1" 16 | ] 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /package/caffemodel2-deepscale-squeezenet-1.1/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "d1d03644761868f6", 3 | "backup_module_uid": "1dc07ee0f4742028", 4 | "backup_module_uoa": "package", 5 | "control": { 6 | "author": "DeepScale", 7 | "author_webpage": "http://deepscale.ai", 8 | "engine": "CK", 9 | "iso_datetime": "2017-05-14T17:16:35.426903", 10 | "license": "BSD", 11 | "version": [ 12 | "1", 13 | "9", 14 | "1", 15 | "1" 16 | ] 17 | }, 18 | "data_name": "caffemodel2-deepscale-squeezenet-1.1" 19 | } 20 | -------------------------------------------------------------------------------- /package/caffemodel2-bvlc-alexnet/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "56aa9e005f933b89", 3 | "backup_module_uid": "1dc07ee0f4742028", 4 | "backup_module_uoa": "package", 5 | "control": { 6 | "author": "Evan Shelhamer", 7 | "author_webpage": "https://github.com/shelhamer", 8 | "engine": "CK", 9 | "iso_datetime": "2017-05-14T16:53:12.965068", 10 | "license": "unrestricted (see readme.md)", 11 | "version": [ 12 | "1", 13 | "9", 14 | "1", 15 | "1" 16 | ] 17 | }, 18 | "data_name": "caffemodel2-bvlc-alexnet" 19 | } 20 | -------------------------------------------------------------------------------- /soft/model.caffe2/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "auto_detect": "yes", 3 | "customize": { 4 | "check_that_exists": "yes", 5 | "ck_params_file": "ck-params.json", 6 | "ck_version": 10, 7 | "env_prefix": "CK_ENV_MODEL_CAFFE2", 8 | "limit_recursion_dir_search": { 9 | "linux": 3, 10 | "win": 3 11 | }, 12 | "soft_file": { 13 | "linux": "predict_net.pb", 14 | "win": "predict_net.pb" 15 | } 16 | }, 17 | "soft_name": "Caffe2 model (net and weights)", 18 | "tags": [ 19 | "caffe2", 20 | "net", 21 | "weights", 22 | "caffemodel2", 23 | "bvlc" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /module/caffe2/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "95a1719259c1a699", 3 | "backup_module_uid": "032630d041b4fd8a", 4 | "backup_module_uoa": "module", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2017-05-16T17:55:56.234388", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "9", 16 | "1", 17 | "1" 18 | ] 19 | }, 20 | "data_name": "caffe2" 21 | } 22 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cpu-universal/patch.win/patch: -------------------------------------------------------------------------------- 1 | diff -ruN src\caffe2\operators\lengths_top_k_op.cc src-new\caffe2\operators\lengths_top_k_op.cc 2 | --- src\caffe2\operators\lengths_top_k_op.cc Fri Oct 20 14:02:11 2017 3 | +++ src-new\caffe2\operators\lengths_top_k_op.cc Fri Oct 20 13:56:20 2017 4 | @@ -6,7 +6,7 @@ 5 | bool LengthsTopKOp::RunOnDevice() { 6 | auto& X = Input(X_IN); 7 | auto& Y = Input(Y_IN); 8 | - auto N = Y.dim(0); 9 | + int N = Y.dim(0); 10 | const T* X_data = X.template data(); 11 | const int* input_len = Y.template data(); 12 | auto* output_topk_values = Output(TOPK_VALUES_OUT); 13 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cuda-universal/patch.win/patch: -------------------------------------------------------------------------------- 1 | diff -ruN src\caffe2\operators\lengths_top_k_op.cc src-new\caffe2\operators\lengths_top_k_op.cc 2 | --- src\caffe2\operators\lengths_top_k_op.cc Fri Oct 20 14:02:11 2017 3 | +++ src-new\caffe2\operators\lengths_top_k_op.cc Fri Oct 20 13:56:20 2017 4 | @@ -6,7 +6,7 @@ 5 | bool LengthsTopKOp::RunOnDevice() { 6 | auto& X = Input(X_IN); 7 | auto& Y = Input(Y_IN); 8 | - auto N = Y.dim(0); 9 | + int N = Y.dim(0); 10 | const T* X_data = X.template data(); 11 | const int* input_len = Y.template data(); 12 | auto* output_topk_values = Output(TOPK_VALUES_OUT); 13 | -------------------------------------------------------------------------------- /soft/lib.caffe2/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "54c5b933f17fb81c", 3 | "backup_module_uid": "5e1100048ab875d7", 4 | "backup_module_uoa": "soft", 5 | "control": { 6 | "author": "cTuning foundation", 7 | "author_email": "admin@cTuning.org", 8 | "author_webpage": "http://cTuning.org", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2017-05-09T10:41:28.829286", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "9", 16 | "1", 17 | "1" 18 | ] 19 | }, 20 | "data_name": "lib.caffe2" 21 | } 22 | -------------------------------------------------------------------------------- /soft/model.caffe2/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "0512081c543edb2e", 3 | "backup_module_uid": "5e1100048ab875d7", 4 | "backup_module_uoa": "soft", 5 | "control": { 6 | "author": "cTuning foundation", 7 | "author_email": "admin@cTuning.org", 8 | "author_webpage": "http://cTuning.org", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2017-05-14T16:55:08.294075", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "9", 16 | "1", 17 | "1" 18 | ] 19 | }, 20 | "data_name": "model.caffe2" 21 | } 22 | -------------------------------------------------------------------------------- /dataset/caffe2-benchmark-mlp/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "e3b914761bf14309", 3 | "backup_module_uid": "8a7141c59cd335f5", 4 | "backup_module_uoa": "dataset", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2017-05-16T17:18:35.368572", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "9", 16 | "1", 17 | "1" 18 | ] 19 | }, 20 | "data_name": "caffe2-benchmark-mlp" 21 | } 22 | -------------------------------------------------------------------------------- /dataset/caffe2-benchmark-vgga/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "1b8d4f4697e31bea", 3 | "backup_module_uid": "8a7141c59cd335f5", 4 | "backup_module_uoa": "dataset", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2017-05-16T16:52:12.097267", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "9", 16 | "1", 17 | "1" 18 | ] 19 | }, 20 | "data_name": "caffe2-benchmark-vgga" 21 | } 22 | -------------------------------------------------------------------------------- /dataset/caffe2-benchmark-alexnet/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "64019b561efe8297", 3 | "backup_module_uid": "8a7141c59cd335f5", 4 | "backup_module_uoa": "dataset", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2017-05-16T16:51:48.071643", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "9", 16 | "1", 17 | "1" 18 | ] 19 | }, 20 | "data_name": "caffe2-benchmark-alexnet" 21 | } 22 | -------------------------------------------------------------------------------- /dataset/caffe2-benchmark-inception/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "aed66a134c4a92d4", 3 | "backup_module_uid": "8a7141c59cd335f5", 4 | "backup_module_uoa": "dataset", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2017-05-16T16:52:06.453697", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "9", 16 | "1", 17 | "1" 18 | ] 19 | }, 20 | "data_name": "caffe2-benchmark-inception" 21 | } 22 | -------------------------------------------------------------------------------- /dataset/caffe2-benchmark-overfeat/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "da5fee88c9ae98f9", 3 | "backup_module_uid": "8a7141c59cd335f5", 4 | "backup_module_uoa": "dataset", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2017-05-16T16:51:59.218624", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "9", 16 | "1", 17 | "1" 18 | ] 19 | }, 20 | "data_name": "caffe2-benchmark-overfeat" 21 | } 22 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cpu-universal/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "e18b4816ef492b92", 3 | "backup_module_uid": "1dc07ee0f4742028", 4 | "backup_module_uoa": "package", 5 | "control": { 6 | "author": "cTuning foundation", 7 | "author_email": "admin@cTuning.org", 8 | "author_webpage": "http://cTuning.org", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2017-10-19T16:21:20.069914", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "9", 16 | "3" 17 | ] 18 | }, 19 | "data_name": "lib-caffe2-0.8.1-eigen-cpu-universal" 20 | } 21 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cuda-universal/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "eb13a3d954b27963", 3 | "backup_module_uid": "1dc07ee0f4742028", 4 | "backup_module_uoa": "package", 5 | "control": { 6 | "author": "cTuning foundation", 7 | "author_email": "admin@cTuning.org", 8 | "author_webpage": "http://cTuning.org", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2017-10-19T17:06:04.016459", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "9", 16 | "3" 17 | ] 18 | }, 19 | "data_name": "lib-caffe2-0.8.1-eigen-cuda-universal" 20 | } 21 | -------------------------------------------------------------------------------- /module/experiment.bench.caffe2/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "75114c4997197226", 3 | "backup_module_uid": "032630d041b4fd8a", 4 | "backup_module_uoa": "module", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2017-05-16T18:04:42.366379", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "9", 16 | "1", 17 | "1" 18 | ] 19 | }, 20 | "data_name": "crowd-benchmark DNN libraries and models (Caffe2)" 21 | } 22 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cpu-universal/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "4a4171b8dfb942b5", 3 | "backup_module_uid": "1dc07ee0f4742028", 4 | "backup_module_uoa": "package", 5 | "control": { 6 | "author": "cTuning foundation", 7 | "author_email": "admin@cTuning.org", 8 | "author_webpage": "http://cTuning.org", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2017-05-09T09:11:52.071945", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "9", 16 | "1", 17 | "1" 18 | ] 19 | }, 20 | "data_name": "lib-caffe2-master-eigen-cpu-universal" 21 | } 22 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cuda-universal/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "4d08a4158b5c2d98", 3 | "backup_module_uid": "1dc07ee0f4742028", 4 | "backup_module_uoa": "package", 5 | "control": { 6 | "author": "cTuning foundation", 7 | "author_email": "admin@cTuning.org", 8 | "author_webpage": "http://cTuning.org", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2017-05-13T10:42:20.860711", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "9", 16 | "1", 17 | "1" 18 | ] 19 | }, 20 | "data_name": "lib-caffe2-master-eigen-cuda-universal" 21 | } 22 | -------------------------------------------------------------------------------- /script/explore-batch-size-unified-and-customized/.cm/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "5a89a4a4f359122b", 3 | "backup_module_uid": "84e27ad9dd12e734", 4 | "backup_module_uoa": "script", 5 | "control": { 6 | "author": "Grigori Fursin", 7 | "author_email": "Grigori.Fursin@cTuning.org", 8 | "author_webpage": "http://fursin.net", 9 | "copyright": "See CK COPYRIGHT.txt for copyright details", 10 | "engine": "CK", 11 | "iso_datetime": "2017-05-18T15:09:59.942487", 12 | "license": "See CK LICENSE.txt for licensing details", 13 | "version": [ 14 | "1", 15 | "9", 16 | "1", 17 | "1" 18 | ] 19 | }, 20 | "data_name": "explore-batch-size-unified-and-customized" 21 | } 22 | -------------------------------------------------------------------------------- /module/caffe2/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": { 3 | "autotune": { 4 | "desc": "autotune Caffe2 workloads" 5 | }, 6 | "crowdbench": { 7 | "desc": "crowd-benchmark caffe2" 8 | }, 9 | "replay": { 10 | "desc": "replay caffe2 experiment" 11 | } 12 | }, 13 | "copyright": "See CK COPYRIGHT.txt for copyright details", 14 | "desc": "caffe2 CK front-end", 15 | "developer": "Grigori Fursin", 16 | "developer_email": "Grigori.Fursin@cTuning.org", 17 | "developer_webpage": "http://fursin.net", 18 | "license": "See CK LICENSE.txt for licensing details", 19 | "module_deps": { 20 | "experiment.bench.caffe2": "75114c4997197226", 21 | "program": "b0ac08fe1d3c2615" 22 | }, 23 | "workflow": "yes", 24 | "workflow_type": "caffe2 pipeline" 25 | } 26 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cpu-universal/scripts.win/patch-mkdir: -------------------------------------------------------------------------------- 1 | diff -ruN src\caffe2\db\lmdb.cc src-new\caffe2\db\lmdb.cc 2 | --- src\caffe2\db\lmdb.cc Tue May 09 18:15:14 2017 3 | +++ src-new\caffe2\db\lmdb.cc Tue May 09 17:52:09 2017 4 | @@ -1,5 +1,9 @@ 5 | #include "lmdb.h" // NOLINT 6 | 7 | +#if defined(_WIN32) 8 | +#include 9 | +#endif 10 | + 11 | #include 12 | 13 | #include 14 | @@ -138,8 +142,13 @@ 15 | MDB_CHECK(mdb_env_create(&mdb_env_)); 16 | MDB_CHECK(mdb_env_set_mapsize(mdb_env_, LMDB_MAP_SIZE)); 17 | if (mode == NEW) { 18 | +#if defined(_WIN32) 19 | + CAFFE_ENFORCE_EQ( 20 | + _mkdir(source.c_str()), 0, "mkdir ", source, " failed"); 21 | +#else 22 | CAFFE_ENFORCE_EQ( 23 | mkdir(source.c_str(), 0744), 0, "mkdir ", source, " failed"); 24 | +#endif 25 | } 26 | int flags = 0; 27 | if (mode == READ) { 28 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cuda-universal/scripts.win/patch-mkdir: -------------------------------------------------------------------------------- 1 | diff -ruN src\caffe2\db\lmdb.cc src-new\caffe2\db\lmdb.cc 2 | --- src\caffe2\db\lmdb.cc Tue May 09 18:15:14 2017 3 | +++ src-new\caffe2\db\lmdb.cc Tue May 09 17:52:09 2017 4 | @@ -1,5 +1,9 @@ 5 | #include "lmdb.h" // NOLINT 6 | 7 | +#if defined(_WIN32) 8 | +#include 9 | +#endif 10 | + 11 | #include 12 | 13 | #include 14 | @@ -138,8 +142,13 @@ 15 | MDB_CHECK(mdb_env_create(&mdb_env_)); 16 | MDB_CHECK(mdb_env_set_mapsize(mdb_env_, LMDB_MAP_SIZE)); 17 | if (mode == NEW) { 18 | +#if defined(_WIN32) 19 | + CAFFE_ENFORCE_EQ( 20 | + _mkdir(source.c_str()), 0, "mkdir ", source, " failed"); 21 | +#else 22 | CAFFE_ENFORCE_EQ( 23 | mkdir(source.c_str(), 0744), 0, "mkdir ", source, " failed"); 24 | +#endif 25 | } 26 | int flags = 0; 27 | if (mode == READ) { 28 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cpu-universal/scripts.win/patch-mkdir: -------------------------------------------------------------------------------- 1 | diff -ruN src\caffe2\db\lmdb.cc src-new\caffe2\db\lmdb.cc 2 | --- src\caffe2\db\lmdb.cc Tue May 09 18:15:14 2017 3 | +++ src-new\caffe2\db\lmdb.cc Tue May 09 17:52:09 2017 4 | @@ -1,5 +1,9 @@ 5 | #include "lmdb.h" // NOLINT 6 | 7 | +#if defined(_WIN32) 8 | +#include 9 | +#endif 10 | + 11 | #include 12 | 13 | #include 14 | @@ -138,8 +142,13 @@ 15 | MDB_CHECK(mdb_env_create(&mdb_env_)); 16 | MDB_CHECK(mdb_env_set_mapsize(mdb_env_, LMDB_MAP_SIZE)); 17 | if (mode == NEW) { 18 | +#if defined(_WIN32) 19 | + CAFFE_ENFORCE_EQ( 20 | + _mkdir(source.c_str()), 0, "mkdir ", source, " failed"); 21 | +#else 22 | CAFFE_ENFORCE_EQ( 23 | mkdir(source.c_str(), 0744), 0, "mkdir ", source, " failed"); 24 | +#endif 25 | } 26 | int flags = 0; 27 | if (mode == READ) { 28 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cuda-universal/scripts.win/patch-mkdir: -------------------------------------------------------------------------------- 1 | diff -ruN src\caffe2\db\lmdb.cc src-new\caffe2\db\lmdb.cc 2 | --- src\caffe2\db\lmdb.cc Tue May 09 18:15:14 2017 3 | +++ src-new\caffe2\db\lmdb.cc Tue May 09 17:52:09 2017 4 | @@ -1,5 +1,9 @@ 5 | #include "lmdb.h" // NOLINT 6 | 7 | +#if defined(_WIN32) 8 | +#include 9 | +#endif 10 | + 11 | #include 12 | 13 | #include 14 | @@ -138,8 +142,13 @@ 15 | MDB_CHECK(mdb_env_create(&mdb_env_)); 16 | MDB_CHECK(mdb_env_set_mapsize(mdb_env_, LMDB_MAP_SIZE)); 17 | if (mode == NEW) { 18 | +#if defined(_WIN32) 19 | + CAFFE_ENFORCE_EQ( 20 | + _mkdir(source.c_str()), 0, "mkdir ", source, " failed"); 21 | +#else 22 | CAFFE_ENFORCE_EQ( 23 | mkdir(source.c_str(), 0744), 0, "mkdir ", source, " failed"); 24 | +#endif 25 | } 26 | int flags = 0; 27 | if (mode == READ) { 28 | -------------------------------------------------------------------------------- /package/caffemodel2-deepscale-squeezenet-1.1/solver.prototxt: -------------------------------------------------------------------------------- 1 | # please cite: 2 | # @article{SqueezeNet, 3 | # Author = {Forrest N. Iandola and Matthew W. Moskewicz and Khalid Ashraf and Song Han and William J. Dally and Kurt Keutzer}, 4 | # Title = {SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and $<$1MB model size}, 5 | # Journal = {arXiv:1602.07360}, 6 | # Year = {2016} 7 | # } 8 | 9 | test_iter: 2000 #not subject to iter_size 10 | test_interval: 1000 11 | base_lr: 0.04 12 | display: 40 13 | max_iter: 170000 14 | iter_size: 16 #global batch size = batch_size * iter_size 15 | lr_policy: "poly" 16 | power: 1.0 #linearly decrease LR 17 | momentum: 0.9 18 | weight_decay: 0.0002 19 | snapshot: 1000 20 | snapshot_prefix: "train" 21 | solver_mode: GPU 22 | random_seed: 42 23 | net: "train_val.prototxt" #we typically do `cd SqueezeNet_v1.0; caffe train ` 24 | test_initialization: false 25 | average_loss: 40 26 | -------------------------------------------------------------------------------- /package/caffemodel2-bvlc-alexnet/readme.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: BVLC AlexNet Model 3 | caffemodel: bvlc_alexnet.caffemodel 4 | caffemodel_url: http://dl.caffe.berkeleyvision.org/bvlc_alexnet.caffemodel 5 | license: unrestricted 6 | sha1: 9116a64c0fbe4459d18f4bb6b56d647b63920377 7 | caffe_commit: 709dc15af4a06bebda027c1eb2b3f3e3375d5077 8 | --- 9 | 10 | This model is a replication of the model described in the [AlexNet](http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks) publication. 11 | 12 | Differences: 13 | - not training with the relighting data-augmentation; 14 | - initializing non-zero biases to 0.1 instead of 1 (found necessary for training, as initialization to 1 gave flat loss). 15 | 16 | The bundled model is the iteration 360,000 snapshot. 17 | The best validation performance during training was iteration 358,000 with validation accuracy 57.258% and loss 1.83948. 18 | This model obtains a top-1 accuracy 57.1% and a top-5 accuracy 80.2% on the validation set, using just the center crop. 19 | (Using the average of 10 crops, (4 + 1 center) * 2 mirror, should obtain a bit higher accuracy.) 20 | 21 | This model was trained by Evan Shelhamer @shelhamer 22 | 23 | ## License 24 | 25 | This model is released for unrestricted use. 26 | -------------------------------------------------------------------------------- /package/caffemodel2-deepscale-squeezenet-1.1/LICENSE: -------------------------------------------------------------------------------- 1 | BSD LICENSE. 2 | 3 | Redistribution and use in source and binary forms, with or without modification, are permitted 4 | provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions 7 | and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions 10 | and the following disclaimer in the documentation and/or other materials provided with the 11 | distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 14 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 15 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 16 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 17 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 18 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 19 | IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 20 | THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 21 | -------------------------------------------------------------------------------- /program/caffe2/preprocess.py: -------------------------------------------------------------------------------- 1 | # 2 | # Preprocessing Caffe templates 3 | # 4 | # Developer: Grigori Fursin, cTuning foundation, 2016 5 | # 6 | 7 | import json 8 | import os 9 | import re 10 | 11 | def ck_preprocess(i): 12 | 13 | ck=i['ck_kernel'] 14 | rt=i['run_time'] 15 | deps=i['deps'] 16 | 17 | env=i['env'] 18 | nenv={} # new environment to be added to the run script 19 | 20 | hosd=i['host_os_dict'] 21 | tosd=i['target_os_dict'] 22 | remote=tosd.get('remote','') 23 | 24 | # Find template 25 | x=deps['caffemodel'] 26 | cm_path=x['dict']['env']['CK_ENV_MODEL_CAFFE'] 27 | 28 | template='deploy.prototxt' 29 | 30 | # load network topology template 31 | pp=os.path.join(cm_path,template) 32 | 33 | r=ck.load_text_file({'text_file':pp}) 34 | if r['return']>0: return r 35 | st=r['string'] 36 | 37 | # Substitute 38 | st=st.replace('$#batch_size#$','1') 39 | 40 | # Generate tmp file 41 | rx=ck.gen_tmp_file({'prefix':'tmp-', 'suffix':'.prototxt', 'remove_dir':'yes'}) 42 | if rx['return']>0: return rx 43 | fn=rx['file_name'] 44 | 45 | # Record template 46 | r=ck.save_text_file({'text_file':fn, 'string':st}) 47 | if r['return']>0: return r 48 | 49 | # Prepare path to model 50 | nenv['CK_CAFFE_MODEL_TOPOLOGY_FILE']=fn 51 | 52 | return {'return':0, 'new_env':nenv} 53 | 54 | # Do not add anything here! 55 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) cTuning foundation and individual contributors. 2 | All rights reserved 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of cTuning foundation nor the names of its contributors 15 | may be used to endorse or promote products derived from this software 16 | without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 25 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /script/explore-batch-size-unified-and-customized/autotune_customized_universal.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmd_keys":["time_cpu","time_cuda"], 3 | 4 | "scenario_cfg_update": { 5 | "original_keys": [ 6 | "##characteristics#run#execution_time#$#obj#$" 7 | ], 8 | "frontier_keys": [], 9 | "improvements_keys": [ 10 | "##characteristics#run#execution_time#$#obj#$_imp" 11 | ], 12 | "record_keys": [ 13 | "##characteristics#*", 14 | "##features#*", 15 | "##choices#*" 16 | ], 17 | "print_extra_keys": [ 18 | "##characteristics#run#execution_time#range_percent" 19 | ], 20 | "reference_threshold": 0.03 21 | }, 22 | 23 | "experiment_0_pipeline_update": { 24 | "features_keys_to_process": [ 25 | "##choices#*" 26 | ], 27 | "pipeline":{"choices":{"env":{"BATCH_SIZE":8}}} 28 | }, 29 | 30 | "experiment_1_pipeline_update": { 31 | "choices_order": [ 32 | [ 33 | "##env#BATCH_SIZE" 34 | ] 35 | ], 36 | "choices_selection": [ 37 | { 38 | "notags": "", 39 | "start": 1, 40 | "stop": 3, 41 | "step": 1, 42 | "default": 5, 43 | "type": "loop" 44 | } 45 | ], 46 | "features_keys_to_process": [ 47 | "##choices#*" 48 | ], 49 | "frontier_features_keys_to_ignore": [ 50 | "##choices#compiler_flags#*", 51 | "##choices#no_state_check" 52 | ], 53 | "frontier_margins": [ 54 | 1.0 55 | ], 56 | "record_params": { 57 | "search_point_by_features": "yes" 58 | } 59 | }, 60 | 61 | "repetitions": 1, 62 | "seed": 12345, 63 | "iterations": -1, 64 | "sleep":0 65 | } 66 | -------------------------------------------------------------------------------- /module/experiment.bench.caffe2/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": { 3 | "crowdsource": { 4 | "desc": "crowdsource these experiments" 5 | }, 6 | "replay": { 7 | "desc": "replay experiment (TBD)" 8 | }, 9 | "show": { 10 | "desc": "show results" 11 | } 12 | }, 13 | "copyright": "See CK COPYRIGHT.txt for copyright details", 14 | "desc": "crowd-benchmark DNN libraries and models (Caffe2)", 15 | "developer": "Grigori Fursin", 16 | "developer_email": "Grigori.Fursin@cTuning.org", 17 | "developer_webpage": "http://fursin.net", 18 | "external_html": { 19 | "action": "show", 20 | "crowd_key": "ck_caffe2_", 21 | "module_uoa": "75114c4997197226" 22 | }, 23 | "license": "See CK LICENSE.txt for licensing details", 24 | "module_deps": { 25 | "choice": "e4564d6f984400d7", 26 | "env": "9b9b3208ac44b891", 27 | "graph": "2d41f89bcf32d4d4", 28 | "machine": "84be34883a81b2a9", 29 | "module": "032630d041b4fd8a", 30 | "pipeline": "db25414b48b4ffb3", 31 | "platform": "707ccdfe444cafac", 32 | "platform.cpu": "aa6b542a420b8db9", 33 | "platform.gpgpu": "192ed4e0bbdbe743", 34 | "platform.os": "41e31cc4496b8a8e", 35 | "program": "b0ac08fe1d3c2615", 36 | "program.optimization": "27bc42ee449e880e", 37 | "soft": "5e1100048ab875d7", 38 | "wfe": "1e4e644996b7f2a0" 39 | }, 40 | "priority": -205, 41 | "program_tags": "crowd-benchmarking,caffe2", 42 | "record_module_uoa": "1eb2f50d4620903e", 43 | "tags": [ 44 | "crowdsource", 45 | "experiments", 46 | "program benchmarking", 47 | "program optimization", 48 | "caffe2" 49 | ], 50 | "workflow": "yes", 51 | "workflow_type": "crowd-benchmarking pipeline for Caffe2" 52 | } 53 | -------------------------------------------------------------------------------- /package/caffemodel2-resnet50/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "check_exit_status": "yes", 3 | "customize": { 4 | "extra_dir": "", 5 | "file_mean_bin": "ResNet_mean.binaryproto", 6 | "file_with_weights": "ResNet-50-model.caffemodel2", 7 | "force_ask_path": "yes", 8 | "install_env": { 9 | "MODEL_FILE": "ResNet-50-model.caffemodel2", 10 | "MODEL_HASH_CALCULATOR": "sha1sum", 11 | "MODEL_HASH_REF": "00bf234fc92e328c509ed5c760c374a98b595de6", 12 | "MODEL_URL": "http://cKnowledge.org/ai/data/ResNet-50-model.caffemodel2" 13 | }, 14 | "no_os_in_suggested_path": "yes", 15 | "no_ver_in_suggested_path": "yes", 16 | "params": { 17 | "deploy": { 18 | "substitute": { 19 | "batch_size": 10 20 | }, 21 | "template": "deploy.prototxt" 22 | } 23 | }, 24 | "skip_file_check": "yes", 25 | "version": "deploy" 26 | }, 27 | "end_full_path": { 28 | "linux": "ResNet-50-model.caffemodel2", 29 | "win": "ResNet-50-model.caffemodel2" 30 | }, 31 | "features": { 32 | "model_size_mb": 100 33 | }, 34 | "only_for_host_os_tags": [ 35 | "windows", 36 | "linux" 37 | ], 38 | "only_for_target_os_tags": [ 39 | "windows", 40 | "linux" 41 | ], 42 | "package_extra_name": " (resnet, resnet50)", 43 | "process_script": "download", 44 | "soft_uoa": "0512081c543edb2e", 45 | "suggested_path": "caffemodel2-resnet50", 46 | "tags": [ 47 | "caffe2", 48 | "weights", 49 | "caffemodel2", 50 | "resnet", 51 | "resnet50", 52 | "channel-stable" 53 | ], 54 | "use_scripts_from_another_entry": { 55 | "data_uoa": "download-caffemodel", 56 | "module_uoa": "script", 57 | "repo_uoa": "ck-caffe" 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /program/caffe2/postprocess_time.py: -------------------------------------------------------------------------------- 1 | # 2 | # Convert raw output of the Caffe2 'time' command 3 | # to the CK timing format. 4 | # 5 | # Developers: 6 | # - Grigori Fursin, cTuning foundation / dividiti, 2017 7 | # - Anton Lokhmotov, dividiti, 2017 8 | # 9 | 10 | import json 11 | import os 12 | import re 13 | import sys 14 | 15 | def ck_postprocess(i): 16 | ck=i['ck_kernel'] 17 | rt=i['run_time'] 18 | deps=i['deps'] 19 | 20 | d={} 21 | 22 | env=i.get('env',{}) 23 | 24 | # Load both stderr and stdout. Concatenate into one list. 25 | # NB: This assumes that Caffe iterates only once (--iterations=1). 26 | # Otherwise, looping over the log would be required. 27 | rf1=rt['run_cmd_out1'] 28 | rf2=rt['run_cmd_out2'] 29 | 30 | lst=[] 31 | 32 | if os.path.isfile(rf1): 33 | r=ck.load_text_file({'text_file':rf1,'split_to_list':'yes'}) 34 | if r['return']>0: return r 35 | lst+=r['lst'] 36 | if os.path.isfile(rf2): 37 | r=ck.load_text_file({'text_file':rf2,'split_to_list':'yes'}) 38 | if r['return']>0: return r 39 | lst+=r['lst'] 40 | 41 | for l in lst: 42 | j=l.find('per iter: ') 43 | if j>0: 44 | l=l[j+9:].strip() 45 | j=l.find('. ') 46 | if j>0: 47 | l=l[:j] 48 | f=float(l) 49 | 50 | d['time_fwbw_ms'] = f 51 | d['time_fwbw_s']= f*1e-3 52 | 53 | d['post_processed']='yes' 54 | # Internal CK key to show overall time. 55 | d['execution_time']=f*1e-03 56 | 57 | rr={} 58 | rr['return']=0 59 | if d.get('post_processed','')=='yes': 60 | # Save to file. 61 | r=ck.save_json_to_file({'json_file':'tmp-ck-timer.json', 'dict':d}) 62 | if r['return']>0: return r 63 | else: 64 | rr['return']=1 65 | rr['error']='failed to find total time in Caffe2 output' 66 | 67 | return rr 68 | 69 | # Do not add anything here! 70 | -------------------------------------------------------------------------------- /package/caffemodel2-deepscale-squeezenet-1.1/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "check_exit_status": "yes", 3 | "customize": { 4 | "extra_dir": "", 5 | "file_with_weights": "squeezenet_v1.1.caffemodel2", 6 | "force_ask_path": "yes", 7 | "install_env": { 8 | "MODEL_FILE": "squeezenet_v1.1.caffemodel2", 9 | "MODEL_HASH_CALCULATOR": "sha1sum", 10 | "MODEL_HASH_REF": "241c76ec86cb8d13aa02434b89917866e888b8c8", 11 | "MODEL_URL": "http://cKnowledge.org/ai/data/squeezenet_v1.1.caffemodel2" 12 | }, 13 | "no_os_in_suggested_path": "yes", 14 | "no_ver_in_suggested_path": "yes", 15 | "params": { 16 | "deploy": { 17 | "substitute": { 18 | "batch_size": 10 19 | }, 20 | "template": "deploy.prototxt" 21 | }, 22 | "train": { 23 | "substitute": { 24 | "train_batch_size": 32, 25 | "val_batch_size": 25 26 | }, 27 | "template": "train_val.prototxt" 28 | }, 29 | "val": { 30 | "accuracy_layers": [ 31 | "accuracy", 32 | "accuracy_top5", 33 | "loss" 34 | ], 35 | "substitute": { 36 | "train_batch_size": 32, 37 | "val_batch_size": 25 38 | }, 39 | "template": "train_val.prototxt" 40 | } 41 | }, 42 | "skip_file_check": "yes", 43 | "version": "1.1" 44 | }, 45 | "end_full_path": { 46 | "linux": "squeezenet_v1.1.caffemodel2", 47 | "win": "squeezenet_v1.1.caffemodel2" 48 | }, 49 | "features": { 50 | "accuracy": 0.58388, 51 | "accuracy_top5": 0.810123, 52 | "model_size_mb": 5 53 | }, 54 | "only_for_host_os_tags": [ 55 | "windows", 56 | "linux" 57 | ], 58 | "only_for_target_os_tags": [ 59 | "windows", 60 | "linux" 61 | ], 62 | "package_extra_name": " (deepscale, squeezenet, 1.1)", 63 | "process_script": "download", 64 | "soft_uoa": "0512081c543edb2e", 65 | "suggested_path": "caffemodel2-deepscale-squeezenet-1.1", 66 | "tags": [ 67 | "caffe2", 68 | "weights", 69 | "caffemodel2", 70 | "deepscale", 71 | "squeezenet", 72 | "v1.1", 73 | "v1", 74 | "channel-stable" 75 | ], 76 | "use_scripts_from_another_entry": { 77 | "data_uoa": "download-caffemodel", 78 | "module_uoa": "script", 79 | "repo_uoa": "ck-caffe" 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cpu-universal/scripts.win/install.bat.arc5: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem 4 | rem Installation script for CK packages. 5 | rem 6 | rem See CK LICENSE.txt for licensing details. 7 | rem See CK Copyright.txt for copyright details. 8 | rem 9 | rem Developer(s): Grigori Fursin, 2017 10 | rem 11 | 12 | rem PACKAGE_DIR 13 | rem INSTALL_DIR 14 | 15 | if "%CAFFE_BUILD_PYTHON%" == "ON" ( 16 | echo. 17 | echo You are compiling Caffe2 with Python support! 18 | echo To use it you need to set up CK env as following ^(after installation^)^: 19 | echo. 20 | echo "ck xset env tags=lib,caffe2 & call tmp-ck-env.bat & ipython2" 21 | echo. 22 | set /p id="Press enter to continue" 23 | ) 24 | 25 | cd /d %INSTALL_DIR%\src 26 | mkdir build_host_protoc 27 | cd /d %INSTALL_DIR%\src\build_host_protoc 28 | 29 | echo ************************************************************** 30 | echo Configuring protobuf for Caffe 2 ... 31 | 32 | cmake ..\third_party\protobuf\cmake ^ 33 | -G"%CK_CMAKE_GENERATOR%" ^ 34 | -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 35 | -DCMAKE_INSTALL_PREFIX=. ^ 36 | -Dprotobuf_BUILD_TESTS=OFF 37 | 38 | if %errorlevel% neq 0 ( 39 | echo. 40 | echo Error: protobuf configure failed ... 41 | goto err 42 | ) 43 | 44 | echo ************************************************************** 45 | echo Building protobuf for Caffe2 46 | cmake --build . --config %CMAKE_CONFIG% --target INSTALL 47 | 48 | if %errorlevel% neq 0 ( 49 | echo. 50 | echo Error: protobuf build failed ... 51 | goto err 52 | ) 53 | 54 | echo ************************************************************** 55 | echo Preparing vars for Caffe 2 ... 56 | 57 | set CK_CXX_FLAGS_FOR_CMAKE= 58 | set CK_CXX_FLAGS_ANDROID_TYPICAL= 59 | 60 | set CK_CMAKE_EXTRA=%CK_CMAKE_EXTRA% ^ 61 | -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 62 | -DCMAKE_VERBOSE_MAKEFILE=1 ^ 63 | -DBUILD_TEST=OFF ^ 64 | -DBUILD_SHARED_LIBS=OFF ^ 65 | -DUSE_CUDA=%USE_CUDA% ^ 66 | -DUSE_NNPACK=OFF ^ 67 | -DUSE_GLOG=OFF ^ 68 | -DUSE_GFLAGS=OFF ^ 69 | -DUSE_LMDB=OFF ^ 70 | -DUSE_LEVELDB=OFF ^ 71 | -DUSE_ROCKSDB=OFF ^ 72 | -DUSE_OPENCV=OFF ^ 73 | -DBUILD_SHARED_LIBS=OFF ^ 74 | -DBUILD_PYTHON=%CAFFE_BUILD_PYTHON% ^ 75 | -DCAFFE2_CUSTOM_PROTOC_EXECUTABLE=%INSTALL_DIR%\src\build_host_protoc\bin\protoc.exe 76 | 77 | exit /b 0 78 | 79 | :err 80 | exit /b 1 81 | -------------------------------------------------------------------------------- /package/caffemodel2-bvlc-googlenet/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "check_exit_status": "yes", 3 | "customize": { 4 | "extra_dir": "", 5 | "file_with_weights": "bvlc_googlenet.caffemodel2", 6 | "force_ask_path": "yes", 7 | "install_env": { 8 | "MODEL_FILE": "bvlc_googlenet.caffemodel2", 9 | "MODEL_HASH_CALCULATOR": "sha1sum", 10 | "MODEL_HASH_REF": "2bbefe4d44062f4453deb8d0c041c38432fce972", 11 | "MODEL_URL": "http://cKnowledge.org/ai/data/bvlc_googlenet.caffemodel2" 12 | }, 13 | "no_os_in_suggested_path": "yes", 14 | "no_ver_in_suggested_path": "yes", 15 | "params": { 16 | "deploy": { 17 | "substitute": { 18 | "batch_size": 10 19 | }, 20 | "template": "deploy.prototxt" 21 | }, 22 | "train": { 23 | "substitute": { 24 | "train_batch_size": 32, 25 | "val_batch_size": 50 26 | }, 27 | "template": "train_val.prototxt" 28 | }, 29 | "val": { 30 | "accuracy_layers": [ 31 | "loss1/loss1", 32 | "loss1/top-1", 33 | "loss1/top-5", 34 | "loss2/loss1", 35 | "loss2/top-1", 36 | "loss2/top-5", 37 | "loss3/loss3", 38 | "loss3/top-1", 39 | "loss3/top-5" 40 | ], 41 | "substitute": { 42 | "train_batch_size": 32, 43 | "val_batch_size": 50 44 | }, 45 | "template": "train_val.prototxt" 46 | } 47 | }, 48 | "skip_file_check": "yes", 49 | "version": "trunk" 50 | }, 51 | "end_full_path": { 52 | "linux": "bvlc_googlenet.caffemodel2", 53 | "win": "bvlc_googlenet.caffemodel2" 54 | }, 55 | "features": { 56 | "accuracy": 0.689299, 57 | "accuracy_top5": 0.891441, 58 | "model_size_mb": 54 59 | }, 60 | "only_for_host_os_tags": [ 61 | "windows", 62 | "linux" 63 | ], 64 | "only_for_target_os_tags": [ 65 | "windows", 66 | "linux" 67 | ], 68 | "package_extra_name": " (bvlc, googlenet)", 69 | "process_script": "download", 70 | "soft_uoa": "0512081c543edb2e", 71 | "suggested_path": "caffemodel2-bvlc-googlenet", 72 | "tags": [ 73 | "caffe2", 74 | "weights", 75 | "caffemodel2", 76 | "bvlc", 77 | "googlenet", 78 | "channel-stable" 79 | ], 80 | "use_scripts_from_another_entry": { 81 | "data_uoa": "download-caffemodel", 82 | "module_uoa": "script", 83 | "repo_uoa": "ck-caffe" 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /package/caffemodel2-bvlc-googlenet/readme.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: BVLC GoogleNet Model 3 | caffemodel: bvlc_googlenet.caffemodel 4 | caffemodel_url: http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel 5 | license: unrestricted 6 | sha1: 405fc5acd08a3bb12de8ee5e23a96bec22f08204 7 | caffe_commit: bc614d1bd91896e3faceaf40b23b72dab47d44f5 8 | --- 9 | 10 | This model is a replication of the model described in the [GoogleNet](http://arxiv.org/abs/1409.4842) publication. We would like to thank Christian Szegedy for all his help in the replication of GoogleNet model. 11 | 12 | Differences: 13 | - not training with the relighting data-augmentation; 14 | - not training with the scale or aspect-ratio data-augmentation; 15 | - uses "xavier" to initialize the weights instead of "gaussian"; 16 | - quick_solver.prototxt uses a different learning rate decay policy than the original solver.prototxt, that allows a much faster training (60 epochs vs 250 epochs); 17 | 18 | The bundled model is the iteration 2,400,000 snapshot (60 epochs) using quick_solver.prototxt 19 | 20 | This bundled model obtains a top-1 accuracy 68.7% (31.3% error) and a top-5 accuracy 88.9% (11.1% error) on the validation set, using just the center crop. 21 | (Using the average of 10 crops, (4 + 1 center) * 2 mirror, should obtain a bit higher accuracy.) 22 | 23 | Timings for bvlc_googlenet with cuDNN using batch_size:128 on a K40c: 24 | - Average Forward pass: 562.841 ms. 25 | - Average Backward pass: 1123.84 ms. 26 | - Average Forward-Backward: 1688.8 ms. 27 | 28 | This model was trained by Sergio Guadarrama @sguada 29 | 30 | ## License 31 | 32 | This model is released for unrestricted use. 33 | 34 | ## Sample validation output 35 | 36 | ``` 37 | I0712 11:53:19.627121 109762 caffe.cpp:292] loss1/loss1 = 1.86667 (* 0.3 = 0.560002 loss) 38 | I0712 11:53:19.627127 109762 caffe.cpp:292] loss1/top-1 = 0.55522 39 | I0712 11:53:19.627131 109762 caffe.cpp:292] loss1/top-5 = 0.804981 40 | I0712 11:53:19.627136 109762 caffe.cpp:292] loss2/loss1 = 1.50183 (* 0.3 = 0.45055 loss) 41 | I0712 11:53:19.627140 109762 caffe.cpp:292] loss2/top-1 = 0.629759 42 | I0712 11:53:19.627142 109762 caffe.cpp:292] loss2/top-5 = 0.856821 43 | I0712 11:53:19.627147 109762 caffe.cpp:292] loss3/loss3 = 1.25635 (* 1 = 1.25635 loss) 44 | I0712 11:53:19.627153 109762 caffe.cpp:292] loss3/top-1 = 0.689299 45 | I0712 11:53:19.627156 109762 caffe.cpp:292] loss3/top-5 = 0.891441 46 | ``` 47 | -------------------------------------------------------------------------------- /package/caffemodel2-bvlc-alexnet/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "check_exit_status": "yes", 3 | "customize": { 4 | "extra_dir": "", 5 | "file_with_weights": "bvlc_alexnet.caffemodel2", 6 | "force_ask_path": "yes", 7 | "install_env": { 8 | "MODEL_FILE": "bvlc_alexnet.caffemodel2", 9 | "MODEL_HASH_CALCULATOR": "sha1sum", 10 | "MODEL_HASH_REF": "c13ab080a5252a5d2e2dbdc17094c62c0a77ffa1", 11 | "MODEL_URL": "http://cKnowledge.org/ai/data/bvlc_alexnet.caffemodel2" 12 | }, 13 | "no_os_in_suggested_path": "yes", 14 | "no_ver_in_suggested_path": "yes", 15 | "params": { 16 | "deploy": { 17 | "substitute": { 18 | "batch_size": 10 19 | }, 20 | "template": "deploy.prototxt" 21 | }, 22 | "train": { 23 | "substitute": { 24 | "train_batch_size": 256, 25 | "train_mean": "$#path_to_imagenet_aux#$imagenet_mean.binaryproto", 26 | "val_batch_size": 50, 27 | "val_mean": "$#path_to_imagenet_aux#$imagenet_mean.binaryproto" 28 | }, 29 | "template": "train_val.prototxt" 30 | }, 31 | "val": { 32 | "accuracy_layers": [ 33 | "accuracy", 34 | "accuracy_top5", 35 | "loss" 36 | ], 37 | "substitute": { 38 | "train_batch_size": 256, 39 | "train_mean": "$#path_to_imagenet_aux#$imagenet_mean.binaryproto", 40 | "val_batch_size": 50, 41 | "val_mean": "$#path_to_imagenet_aux#$imagenet_mean.binaryproto" 42 | }, 43 | "template": "train_val.prototxt" 44 | } 45 | }, 46 | "skip_file_check": "yes", 47 | "version": "trunk" 48 | }, 49 | "end_full_path": { 50 | "linux": "bvlc_alexnet.caffemodel2", 51 | "win": "bvlc_alexnet.caffemodel2" 52 | }, 53 | "features": { 54 | "accuracy": 0.568279, 55 | "accuracy_top5": 0.799501, 56 | "model_size_mb": 244 57 | }, 58 | "only_for_host_os_tags": [ 59 | "windows", 60 | "linux" 61 | ], 62 | "only_for_target_os_tags": [ 63 | "windows", 64 | "linux" 65 | ], 66 | "package_extra_name": " (bvlc, alexnet)", 67 | "process_script": "download", 68 | "soft_uoa": "0512081c543edb2e", 69 | "suggested_path": "caffemodel2-bvlc-alexnet", 70 | "tags": [ 71 | "caffe2", 72 | "weights", 73 | "caffemodel2", 74 | "bvlc", 75 | "alexnet", 76 | "channel-stable" 77 | ], 78 | "use_scripts_from_another_entry": { 79 | "data_uoa": "download-caffemodel", 80 | "module_uoa": "script", 81 | "repo_uoa": "ck-caffe" 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cpu-universal/scripts.win/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem 4 | rem Installation script for CK packages. 5 | rem 6 | rem See CK LICENSE.txt for licensing details. 7 | rem See CK Copyright.txt for copyright details. 8 | rem 9 | rem Developer(s): Grigori Fursin, 2017 10 | rem 11 | 12 | rem PACKAGE_DIR 13 | rem INSTALL_DIR 14 | 15 | if "%CAFFE_BUILD_PYTHON%" == "ON" ( 16 | echo. 17 | echo You are compiling Caffe2 with Python support! 18 | echo To use it you need to set up CK env as following ^(after installation^)^: 19 | echo. 20 | echo $ ck virtual env --tags=lib,caffe2 21 | echo $ ipython 22 | echo. 23 | set /p id="Press enter to continue" 24 | ) 25 | 26 | cd /d %INSTALL_DIR%\src 27 | mkdir build_host_protoc 28 | cd /d %INSTALL_DIR%\src\build_host_protoc 29 | 30 | echo ************************************************************** 31 | echo Configuring protobuf for Caffe 2 ... 32 | 33 | cmake ..\third_party\protobuf\cmake ^ 34 | -G"%CK_CMAKE_GENERATOR%" ^ 35 | -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 36 | -DCMAKE_INSTALL_PREFIX=. ^ 37 | -Dprotobuf_BUILD_TESTS=OFF 38 | 39 | if %errorlevel% neq 0 ( 40 | echo. 41 | echo Error: protobuf configure failed ... 42 | goto err 43 | ) 44 | 45 | echo ************************************************************** 46 | echo Building protobuf for Caffe2 47 | cmake --build . --config %CMAKE_CONFIG% --target INSTALL 48 | 49 | if %errorlevel% neq 0 ( 50 | echo. 51 | echo Error: protobuf build failed ... 52 | goto err 53 | ) 54 | 55 | echo ************************************************************** 56 | echo Preparing vars for Caffe 2 ... 57 | 58 | set CK_CXX_FLAGS_FOR_CMAKE= 59 | set CK_CXX_FLAGS_ANDROID_TYPICAL= 60 | 61 | set CK_CMAKE_EXTRA=%CK_CMAKE_EXTRA% ^ 62 | -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 63 | -DCMAKE_VERBOSE_MAKEFILE=1 ^ 64 | -DBUILD_TEST=OFF ^ 65 | -DUSE_THREADS=%USE_THREADS% ^ 66 | -DUSE_NERVANA_GPU=%USE_NERVANA_GPU% ^ 67 | -DUSE_GLOG=OFF ^ 68 | -DUSE_GFLAGS=OFF ^ 69 | -DUSE_LMDB=OFF ^ 70 | -DUSE_LEVELDB=OFF ^ 71 | -DUSE_LITE_PROTO=%USE_LITE_PROTO% ^ 72 | -DUSE_NCCL=%USE_NCCL% ^ 73 | -DUSE_NNPACK=%USE_NNPACK% ^ 74 | -DUSE_OPENCV=OFF ^ 75 | -DUSE_CUDA=%USE_CUDA% ^ 76 | -DUSE_CNMEM=%USE_CNMEM% ^ 77 | -DUSE_ZMQ=%USE_ZMQ% ^ 78 | -DUSE_ROCKSDB=%USE_ROCKSDB% ^ 79 | -DUSE_REDIS=%USE_REDIS% ^ 80 | -DUSE_MPI=%USE_MPI% ^ 81 | -DUSE_CUB=%USE_CUB% ^ 82 | -DUSE_GLOO=%USE_GLOO% ^ 83 | -DBUILD_SHARED_LIBS=OFF ^ 84 | -DUSE_OPENMP=%USE_OPENMP% ^ 85 | -DBUILD_PYTHON=%CAFFE_BUILD_PYTHON% ^ 86 | -DBUILD_TEST=%BUILD_TEST% 87 | 88 | rem -DBLAS=%WHICH_BLAS% ^ 89 | rem -DBUILD_BINARY=ON ^ 90 | 91 | exit /b 0 92 | 93 | :err 94 | exit /b 1 95 | -------------------------------------------------------------------------------- /module/caffe2/module.py: -------------------------------------------------------------------------------- 1 | # 2 | # Collective Knowledge (Caffe2 CK front-end) 3 | # 4 | # See CK LICENSE.txt for licensing details 5 | # See CK COPYRIGHT.txt for copyright details 6 | # 7 | # Developer: cTuning foundation, admin@cTuning.org, http://cTuning.org 8 | # 9 | 10 | cfg={} # Will be updated by CK (meta description of this module) 11 | work={} # Will be updated by CK (temporal data) 12 | ck=None # Will be updated by CK (initialized CK kernel) 13 | 14 | # Local settings 15 | 16 | ############################################################################## 17 | # Initialize module 18 | 19 | def init(i): 20 | """ 21 | 22 | Input: {} 23 | 24 | Output: { 25 | return - return code = 0, if successful 26 | > 0, if error 27 | (error) - error text if return > 0 28 | } 29 | 30 | """ 31 | return {'return':0} 32 | 33 | ############################################################################## 34 | # crowd-benchmark caffe2 35 | 36 | def crowdbench(i): 37 | """ 38 | Input: { 39 | } 40 | 41 | Output: { 42 | return - return code = 0, if successful 43 | > 0, if error 44 | (error) - error text if return > 0 45 | } 46 | 47 | """ 48 | 49 | i['action']='crowdsource' 50 | i['module_uoa']=cfg['module_deps']['experiment.bench.caffe2'] 51 | 52 | return ck.access(i) 53 | 54 | ############################################################################## 55 | # replay experiment 56 | 57 | def replay(i): 58 | """ 59 | Input: { 60 | } 61 | 62 | Output: { 63 | return - return code = 0, if successful 64 | > 0, if error 65 | (error) - error text if return > 0 66 | } 67 | 68 | """ 69 | 70 | i['module_uoa']=cfg['module_deps']['experiment.bench.caffe2'] 71 | return ck.access(i) 72 | 73 | ############################################################################## 74 | # autotune Caffe2 workloads 75 | 76 | def autotune(i): 77 | """ 78 | Input: { 79 | } 80 | 81 | Output: { 82 | return - return code = 0, if successful 83 | > 0, if error 84 | (error) - error text if return > 0 85 | } 86 | 87 | """ 88 | 89 | i['module_uoa']=cfg['module_deps']['program'] 90 | i['data_uoa']='caffe2' 91 | i['explore']='yes' 92 | i['extra_tags']='dnn' 93 | i['skip_collaborative']='yes' 94 | i['skip_pruning']='yes' 95 | i['iterations']=-1 96 | i['new']='yes' 97 | i['cmd_keys']=['time_cpu','time_cuda'] 98 | 99 | return ck.access(i) 100 | -------------------------------------------------------------------------------- /soft/model.caffe2/customize.py: -------------------------------------------------------------------------------- 1 | # 2 | # Collective Knowledge (individual environment - setup) 3 | # 4 | # See CK LICENSE.txt for licensing details 5 | # See CK COPYRIGHT.txt for copyright details 6 | # 7 | # Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net 8 | # 9 | 10 | import os 11 | 12 | ############################################################################## 13 | # setup environment setup 14 | 15 | def setup(i): 16 | """ 17 | Input: { 18 | cfg - meta of this soft entry 19 | self_cfg - meta of module soft 20 | ck_kernel - import CK kernel module (to reuse functions) 21 | 22 | host_os_uoa - host OS UOA 23 | host_os_uid - host OS UID 24 | host_os_dict - host OS meta 25 | 26 | target_os_uoa - target OS UOA 27 | target_os_uid - target OS UID 28 | target_os_dict - target OS meta 29 | 30 | target_device_id - target device ID (if via ADB) 31 | 32 | tags - list of tags used to search this entry 33 | 34 | env - updated environment vars from meta 35 | customize - updated customize vars from meta 36 | 37 | deps - resolved dependencies for this soft 38 | 39 | interactive - if 'yes', can ask questions, otherwise quiet 40 | } 41 | 42 | Output: { 43 | return - return code = 0, if successful 44 | > 0, if error 45 | (error) - error text if return > 0 46 | 47 | bat - prepared string for bat file 48 | } 49 | 50 | """ 51 | 52 | import os 53 | 54 | # Get variables 55 | ck=i['ck_kernel'] 56 | s='' 57 | 58 | iv=i.get('interactive','') 59 | 60 | cus=i.get('customize',{}) 61 | fp=cus.get('full_path','') 62 | 63 | hosd=i['host_os_dict'] 64 | tosd=i['target_os_dict'] 65 | 66 | sdirs=hosd.get('dir_sep','') 67 | 68 | # Check platform 69 | hplat=hosd.get('ck_name','') 70 | 71 | hproc=hosd.get('processor','') 72 | tproc=tosd.get('processor','') 73 | 74 | remote=tosd.get('remote','') 75 | tbits=tosd.get('bits','') 76 | 77 | env=i['env'] 78 | 79 | pi=os.path.dirname(fp) 80 | 81 | ep=cus.get('env_prefix','') 82 | env[ep]=pi 83 | 84 | env[ep+'_WEIGHTS']=os.path.join(pi, cus.get('file_with_weights','')) 85 | env[ep+'_WEIGHTS_FILE']=cus.get('file_with_weights','') 86 | 87 | mean_bin_file = cus.get('file_mean_bin','') 88 | if (mean_bin_file != ''): 89 | env[ep + '_MEAN_BIN'] = os.path.join(pi, mean_bin_file) 90 | env[ep + '_MEAN_BIN_FILE'] = mean_bin_file 91 | 92 | # record params 93 | pff=cus['ck_params_file'] 94 | pf=os.path.join(pi, pff) 95 | params=cus.get('params',{}) 96 | 97 | if len(params)==0: 98 | if os.path.isfile(pf): 99 | r=ck.load_json_file({'json_file':pf}) 100 | if r['return']>0: return r 101 | cus['params']=r['dict'] 102 | else: 103 | return {'return':1, 'error':'CK params for the DNN are not defined and file '+pff+' doesn\'t exist'} 104 | 105 | else: 106 | r=ck.save_json_to_file({'json_file':pf, 'dict':params}) 107 | if r['return']>0: return r 108 | 109 | return {'return':0, 'bat':s} 110 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cpu-universal/scripts.win/install.bat.arc: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem 4 | rem Installation script for CK packages. 5 | rem 6 | rem See CK LICENSE.txt for licensing details. 7 | rem See CK Copyright.txt for copyright details. 8 | rem 9 | rem Developer(s): Grigori Fursin, 2017 10 | rem 11 | 12 | rem PACKAGE_DIR 13 | rem INSTALL_DIR 14 | 15 | rem get eigen and protobuf 16 | cd /d %INSTALL_DIR%\src 17 | git submodule update --init -- third_party\eigen 18 | git submodule update --init -- third_party\protobuf 19 | 20 | if "%BUILD_PYTHON%" == "ON" ( 21 | git submodule update --init -- third_party\pybind11 22 | 23 | echo. 24 | echo You are compiling Caffe2 with Python support! 25 | echo To use it you need to set up CK env as following ^(after installation^)^: 26 | echo. 27 | echo ck xset env tags=lib,caffe2 & call tmp-ck-env.bat & ipython2 28 | echo. 29 | set /p id="Press enter to continue" 30 | ) 31 | 32 | cd /d %INSTALL_DIR%\obj 33 | 34 | echo ************************************************************** 35 | echo Building protobuf for Caffe 2 ... 36 | 37 | cmake %INSTALL_DIR%\src\third_party\protobuf\cmake ^ 38 | -G"%CK_CMAKE_GENERATOR%" ^ 39 | -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 40 | -DCMAKE_INSTALL_PREFIX=. ^ 41 | -Dprotobuf_BUILD_TESTS=OFF ^ 42 | -DCMAKE_BUILD_TYPE=Debug 43 | 44 | msbuild INSTALL.vcxproj 45 | 46 | exit /b 1 47 | 48 | echo ************************************************************** 49 | echo Preparing vars for Caffe 2 ... 50 | 51 | set CK_CXX_FLAGS_FOR_CMAKE= 52 | set CK_CXX_FLAGS_ANDROID_TYPICAL= 53 | 54 | set CK_CMAKE_EXTRA=%CK_CMAKE_EXTRA% ^ 55 | -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 56 | -DCMAKE_VERBOSE_MAKEFILE=1 ^ 57 | -DBUILD_TEST=OFF ^ 58 | -DBLAS=%WHICH_BLAS% ^ 59 | -DUSE_THREADS=%USE_THREADS% ^ 60 | -DUSE_NERVANA_GPU=%USE_NERVANA_GPU% ^ 61 | -DUSE_GLOG=OFF ^ 62 | -DUSE_GFLAGS=OFF ^ 63 | -DUSE_LMDB=OFF ^ 64 | -DUSE_LEVELDB=OFF ^ 65 | -DUSE_LITE_PROTO=%USE_LITE_PROTO% ^ 66 | -DUSE_NCCL=%USE_NCCL% ^ 67 | -DUSE_NNPACK=%USE_NNPACK% ^ 68 | -DUSE_OPENCV=OFF ^ 69 | -DUSE_CUDA=%USE_CUDA% ^ 70 | -DUSE_CNMEM=%USE_CNMEM% ^ 71 | -DUSE_ZMQ=%USE_ZMQ% ^ 72 | -DUSE_ROCKSDB=%USE_ROCKSDB% ^ 73 | -DUSE_REDIS=%USE_REDIS% ^ 74 | -DUSE_MPI=%USE_MPI% ^ 75 | -DUSE_GLOO=%USE_GLOO% ^ 76 | -DBUILD_SHARED_LIBS=OFF ^ 77 | -DUSE_OPENMP=%USE_OPENMP% ^ 78 | -DBUILD_PYTHON=%BUILD_PYTHON% ^ 79 | -DBUILD_BINARY=OFF ^ 80 | -DBUILD_TEST=%BUILD_TEST% ^ 81 | -DPROTOBUF_PROTOC_EXECUTABLE="%CK_ENV_LIB_PROTOBUF_HOST%\bin\protoc.exe" ^ 82 | -DGFLAGS_INCLUDE_DIR="%CK_ENV_LIB_GFLAGS_INCLUDE%" ^ 83 | -DGFLAGS_LIBRARY_RELEASE="%CK_ENV_LIB_GFLAGS_LIB%\gflags.lib" ^ 84 | -DGFLAGS_LIBRARY_DEBUG="%CK_ENV_LIB_GFLAGS_LIB%\gflags.lib" ^ 85 | -DGLOG_INCLUDE_DIR="%CK_ENV_LIB_GLOG_INCLUDE%" ^ 86 | -DGLOG_LIBRARY_RELEASE="%CK_ENV_LIB_GLOG_LIB%\glog.lib" ^ 87 | -DGLOG_LIBRARY_DEBUG="%CK_ENV_LIB_GLOG_LIB%\glog.lib" ^ 88 | -DLMDB_INCLUDE_DIR="%CK_ENV_LIB_LMDB_INCLUDE%" ^ 89 | -DLMDB_LIBRARIES="%CK_ENV_LIB_LMDB_LIB%\lmdb.lib" ^ 90 | -DOpenCV_DIR="%CK_ENV_LIB_OPENCV%" ^ 91 | -DOpenCV_LIB_PATH="%CK_ENV_LIB_OPENCV_LIB%" 92 | 93 | rem -DUSE_LMDB=%USE_LMDB% ^ 94 | 95 | 96 | rem -DPROTOBUF_DIR="%CK_ENV_LIB_PROTOBUF_HOST%\cmake" ^ 97 | rem -DPROTOBUF_PROTOC_EXECUTABLE="%CK_ENV_LIB_PROTOBUF_HOST%\bin\protoc.exe" ^ 98 | 99 | rem -DOpenBLAS_INCLUDE_DIR="%CK_ENV_LIB_OPENBLAS_INCLUDE%" ^ 100 | rem -DOpenBLAS_LIB="%CK_ENV_LIB_OPENBLAS_LIB%\%CK_ENV_LIB_OPENBLAS_STATIC_NAME%" ^ 101 | 102 | rem -DBLAS=%WHICH_BLAS% ^ 103 | 104 | exit /b 0 105 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cpu-universal/scripts.win/install.bat.arc: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem 4 | rem Installation script for CK packages. 5 | rem 6 | rem See CK LICENSE.txt for licensing details. 7 | rem See CK Copyright.txt for copyright details. 8 | rem 9 | rem Developer(s): Grigori Fursin, 2017 10 | rem 11 | 12 | rem PACKAGE_DIR 13 | rem INSTALL_DIR 14 | 15 | rem get eigen and protobuf 16 | cd /d %INSTALL_DIR%\src 17 | git submodule update --init -- third_party\eigen 18 | git submodule update --init -- third_party\protobuf 19 | 20 | if "%BUILD_PYTHON%" == "ON" ( 21 | git submodule update --init -- third_party\pybind11 22 | 23 | echo. 24 | echo You are compiling Caffe2 with Python support! 25 | echo To use it you need to set up CK env as following ^(after installation^)^: 26 | echo. 27 | echo ck xset env tags=lib,caffe2 & call tmp-ck-env.bat & ipython2 28 | echo. 29 | set /p id="Press enter to continue" 30 | ) 31 | 32 | cd /d %INSTALL_DIR%\obj 33 | 34 | echo ************************************************************** 35 | echo Building protobuf for Caffe 2 ... 36 | 37 | cmake %INSTALL_DIR%\src\third_party\protobuf\cmake ^ 38 | -G"%CK_CMAKE_GENERATOR%" ^ 39 | -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 40 | -DCMAKE_INSTALL_PREFIX=. ^ 41 | -Dprotobuf_BUILD_TESTS=OFF ^ 42 | -DCMAKE_BUILD_TYPE=Debug 43 | 44 | msbuild INSTALL.vcxproj 45 | 46 | exit /b 1 47 | 48 | echo ************************************************************** 49 | echo Preparing vars for Caffe 2 ... 50 | 51 | set CK_CXX_FLAGS_FOR_CMAKE= 52 | set CK_CXX_FLAGS_ANDROID_TYPICAL= 53 | 54 | set CK_CMAKE_EXTRA=%CK_CMAKE_EXTRA% ^ 55 | -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 56 | -DCMAKE_VERBOSE_MAKEFILE=1 ^ 57 | -DBUILD_TEST=OFF ^ 58 | -DBLAS=%WHICH_BLAS% ^ 59 | -DUSE_THREADS=%USE_THREADS% ^ 60 | -DUSE_NERVANA_GPU=%USE_NERVANA_GPU% ^ 61 | -DUSE_GLOG=OFF ^ 62 | -DUSE_GFLAGS=OFF ^ 63 | -DUSE_LMDB=OFF ^ 64 | -DUSE_LEVELDB=OFF ^ 65 | -DUSE_LITE_PROTO=%USE_LITE_PROTO% ^ 66 | -DUSE_NCCL=%USE_NCCL% ^ 67 | -DUSE_NNPACK=%USE_NNPACK% ^ 68 | -DUSE_OPENCV=OFF ^ 69 | -DUSE_CUDA=%USE_CUDA% ^ 70 | -DUSE_CNMEM=%USE_CNMEM% ^ 71 | -DUSE_ZMQ=%USE_ZMQ% ^ 72 | -DUSE_ROCKSDB=%USE_ROCKSDB% ^ 73 | -DUSE_REDIS=%USE_REDIS% ^ 74 | -DUSE_MPI=%USE_MPI% ^ 75 | -DUSE_GLOO=%USE_GLOO% ^ 76 | -DBUILD_SHARED_LIBS=OFF ^ 77 | -DUSE_OPENMP=%USE_OPENMP% ^ 78 | -DBUILD_PYTHON=%BUILD_PYTHON% ^ 79 | -DBUILD_BINARY=OFF ^ 80 | -DBUILD_TEST=%BUILD_TEST% ^ 81 | -DPROTOBUF_PROTOC_EXECUTABLE="%CK_ENV_LIB_PROTOBUF_HOST%\bin\protoc.exe" ^ 82 | -DGFLAGS_INCLUDE_DIR="%CK_ENV_LIB_GFLAGS_INCLUDE%" ^ 83 | -DGFLAGS_LIBRARY_RELEASE="%CK_ENV_LIB_GFLAGS_LIB%\gflags.lib" ^ 84 | -DGFLAGS_LIBRARY_DEBUG="%CK_ENV_LIB_GFLAGS_LIB%\gflags.lib" ^ 85 | -DGLOG_INCLUDE_DIR="%CK_ENV_LIB_GLOG_INCLUDE%" ^ 86 | -DGLOG_LIBRARY_RELEASE="%CK_ENV_LIB_GLOG_LIB%\glog.lib" ^ 87 | -DGLOG_LIBRARY_DEBUG="%CK_ENV_LIB_GLOG_LIB%\glog.lib" ^ 88 | -DLMDB_INCLUDE_DIR="%CK_ENV_LIB_LMDB_INCLUDE%" ^ 89 | -DLMDB_LIBRARIES="%CK_ENV_LIB_LMDB_LIB%\lmdb.lib" ^ 90 | -DOpenCV_DIR="%CK_ENV_LIB_OPENCV%" ^ 91 | -DOpenCV_LIB_PATH="%CK_ENV_LIB_OPENCV_LIB%" 92 | 93 | rem -DUSE_LMDB=%USE_LMDB% ^ 94 | 95 | 96 | rem -DPROTOBUF_DIR="%CK_ENV_LIB_PROTOBUF_HOST%\cmake" ^ 97 | rem -DPROTOBUF_PROTOC_EXECUTABLE="%CK_ENV_LIB_PROTOBUF_HOST%\bin\protoc.exe" ^ 98 | 99 | rem -DOpenBLAS_INCLUDE_DIR="%CK_ENV_LIB_OPENBLAS_INCLUDE%" ^ 100 | rem -DOpenBLAS_LIB="%CK_ENV_LIB_OPENBLAS_LIB%\%CK_ENV_LIB_OPENBLAS_STATIC_NAME%" ^ 101 | 102 | rem -DBLAS=%WHICH_BLAS% ^ 103 | 104 | exit /b 0 105 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cuda-universal/scripts.win/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem 4 | rem Installation script for CK packages. 5 | rem 6 | rem See CK LICENSE.txt for licensing details. 7 | rem See CK Copyright.txt for copyright details. 8 | rem 9 | rem Developer(s): Grigori Fursin, 2017 10 | rem 11 | 12 | rem PACKAGE_DIR 13 | rem INSTALL_DIR 14 | 15 | rem get eigen and protobuf 16 | cd /d %INSTALL_DIR%\src 17 | 18 | rem Get protobuf from CK and copy here 19 | if exist "%CK_ENV_LIB_PROTOBUF_HOST_SRC_DIR%" ( 20 | xcopy /s /e /y %CK_ENV_LIB_PROTOBUF_HOST_SRC_DIR%\* third_party\protobuf\ 21 | ) 22 | 23 | if exist "%CK_ENV_LIB_PROTOBUF_HOST%" ( 24 | if not exist "build_host_protoc" ( 25 | mkdir build_host_protoc 26 | ) 27 | xcopy /s /e /y %CK_ENV_LIB_PROTOBUF_HOST%\* build_host_protoc\ 28 | ) 29 | 30 | rem git submodule update --init -- third_party\protobuf 31 | 32 | if "%CAFFE_BUILD_PYTHON%" == "ON" ( 33 | echo. 34 | echo You are compiling Caffe2 with Python support! 35 | echo To use it you need to set up CK env as following ^(after installation^)^: 36 | echo. 37 | echo $ ck virtual env --tags=lib,caffe2 38 | echo $ ipython 39 | echo. 40 | set /p id="Press enter to continue" 41 | ) 42 | 43 | cd /d %INSTALL_DIR%\obj 44 | 45 | echo ************************************************************** 46 | echo Preparing vars for Caffe 2 ... 47 | 48 | set CK_CXX_FLAGS_FOR_CMAKE= 49 | set CK_CXX_FLAGS_ANDROID_TYPICAL= 50 | 51 | set CK_CMAKE_EXTRA=%CK_CMAKE_EXTRA% ^ 52 | -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 53 | -DCMAKE_VERBOSE_MAKEFILE=1 ^ 54 | -DBUILD_TEST=OFF ^ 55 | -DBLAS=%WHICH_BLAS% ^ 56 | -DUSE_THREADS=%USE_THREADS% ^ 57 | -DUSE_NERVANA_GPU=%USE_NERVANA_GPU% ^ 58 | -DUSE_GLOG=OFF ^ 59 | -DUSE_GFLAGS=OFF ^ 60 | -DUSE_LMDB=OFF ^ 61 | -DUSE_LEVELDB=OFF ^ 62 | -DUSE_LITE_PROTO=%USE_LITE_PROTO% ^ 63 | -DUSE_NCCL=%USE_NCCL% ^ 64 | -DUSE_NNPACK=%USE_NNPACK% ^ 65 | -DUSE_OPENCV=OFF ^ 66 | -DUSE_CUDA=%USE_CUDA% ^ 67 | -DUSE_CNMEM=%USE_CNMEM% ^ 68 | -DUSE_ZMQ=%USE_ZMQ% ^ 69 | -DUSE_ROCKSDB=%USE_ROCKSDB% ^ 70 | -DUSE_REDIS=%USE_REDIS% ^ 71 | -DUSE_MPI=%USE_MPI% ^ 72 | -DUSE_GLOO=%USE_GLOO% ^ 73 | -DBUILD_SHARED_LIBS=OFF ^ 74 | -DUSE_OPENMP=%USE_OPENMP% ^ 75 | -DBUILD_PYTHON=%CAFFE_BUILD_PYTHON% ^ 76 | -DBUILD_BINARY=OFF ^ 77 | -DBUILD_TEST=%BUILD_TEST% ^ 78 | -DCUDA_TOOLKIT_ROOT_DIR="%CK_ENV_COMPILER_CUDA_WIN%" ^ 79 | -DCUDA_HOST_COMPILER="%VCINSTALLDIR%\cl.exe" ^ 80 | -DCCBIN="%VCINSTALLDIR%\cl.exe" ^ 81 | -DPROTOBUF_PROTOC_EXECUTABLE="%CK_ENV_LIB_PROTOBUF_HOST%\bin\protoc.exe" 82 | 83 | rem -DGFLAGS_INCLUDE_DIR="%CK_ENV_LIB_GFLAGS_INCLUDE%" ^ 84 | rem -DGFLAGS_LIBRARY_RELEASE="%CK_ENV_LIB_GFLAGS_LIB%\gflags.lib" ^ 85 | rem -DGFLAGS_LIBRARY_DEBUG="%CK_ENV_LIB_GFLAGS_LIB%\gflags.lib" ^ 86 | rem -DGLOG_INCLUDE_DIR="%CK_ENV_LIB_GLOG_INCLUDE%" ^ 87 | rem -DGLOG_LIBRARY_RELEASE="%CK_ENV_LIB_GLOG_LIB%\glog.lib" ^ 88 | rem -DGLOG_LIBRARY_DEBUG="%CK_ENV_LIB_GLOG_LIB%\glog.lib" ^ 89 | rem -DLMDB_INCLUDE_DIR="%CK_ENV_LIB_LMDB_INCLUDE%" ^ 90 | rem -DLMDB_LIBRARIES="%CK_ENV_LIB_LMDB_LIB%\lmdb.lib" ^ 91 | rem -DOpenCV_DIR="%CK_ENV_LIB_OPENCV%" ^ 92 | rem -DOpenCV_LIB_PATH="%CK_ENV_LIB_OPENCV_LIB%" 93 | 94 | rem -DUSE_LMDB=%USE_LMDB% ^ 95 | 96 | 97 | rem -DPROTOBUF_DIR="%CK_ENV_LIB_PROTOBUF_HOST%\cmake" ^ 98 | rem -DPROTOBUF_PROTOC_EXECUTABLE="%CK_ENV_LIB_PROTOBUF_HOST%\bin\protoc.exe" ^ 99 | 100 | rem -DOpenBLAS_INCLUDE_DIR="%CK_ENV_LIB_OPENBLAS_INCLUDE%" ^ 101 | rem -DOpenBLAS_LIB="%CK_ENV_LIB_OPENBLAS_LIB%\%CK_ENV_LIB_OPENBLAS_STATIC_NAME%" ^ 102 | 103 | rem -DBLAS=%WHICH_BLAS% ^ 104 | 105 | exit /b 0 106 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cpu-universal/scripts.linux/install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # 4 | # Installation script for Caffe. 5 | # 6 | # See CK LICENSE for licensing details. 7 | # See CK COPYRIGHT for copyright details. 8 | # 9 | # Developer(s): 10 | # - Grigori Fursin, 2017; 11 | # 12 | 13 | # PACKAGE_DIR 14 | # INSTALL_DIR 15 | 16 | echo "**************************************************************" 17 | echo "Preparing vars for Caffe 2 ..." 18 | 19 | # Get eigen 20 | cd ${INSTALL_DIR}/src 21 | 22 | # Print about python 23 | if [ "${CAFFE_BUILD_PYTHON}" == "ON" ] ; then 24 | echo "" 25 | echo "You are compiling Caffe2 with Python support!" 26 | echo "To use it you need to set up CK env as following (after installation)": 27 | echo "" 28 | echo "$ ck virtual env --tags=lib,caffe2" 29 | echo "$ ipython" 30 | echo "" 31 | read -p "Press enter to continue" 32 | fi 33 | 34 | CK_OPENMP="-fopenmp" 35 | if [ "${CK_HAS_OPENMP}" = "0" ]; then 36 | CK_OPENMP="" 37 | fi 38 | 39 | OPENCV_DIR=${CK_ENV_LIB_OPENCV_JNI} 40 | if [ "${OPENCV_DIR}" == "" ]; then 41 | OPENCV_DIR=${CK_ENV_LIB_OPENCV}/share/OpenCV 42 | fi 43 | 44 | # Check extra stuff 45 | EXTRA_FLAGS="" 46 | 47 | cd ${INSTALL_DIR}/obj 48 | 49 | cmake -DCMAKE_BUILD_TYPE=${CK_ENV_CMAKE_BUILD_TYPE:-Release} \ 50 | -DCMAKE_C_COMPILER="${CK_CC_PATH_FOR_CMAKE}" \ 51 | -DCMAKE_C_FLAGS="${CK_CC_FLAGS_FOR_CMAKE} ${EXTRA_FLAGS}" \ 52 | -DCMAKE_CXX_COMPILER="${CK_CXX_PATH_FOR_CMAKE}" \ 53 | -DCMAKE_CXX_FLAGS="${CK_CXX_FLAGS_FOR_CMAKE} ${EXTRA_FLAGS} -I${CK_ENV_LIB_OPENCV_INCLUDE}" \ 54 | -DCAFFE2_CPU_FLAGS="${CAFFE2_CPU_FLAGS}" \ 55 | -DCAFFE2_GPU_FLAGS="${CAFFE2_GPU_FLAGS}" \ 56 | -DCMAKE_AR="${CK_AR_PATH_FOR_CMAKE}" \ 57 | -DCMAKE_LINKER="${CK_LD_PATH_FOR_CMAKE}" \ 58 | -DBLAS=${WHICH_BLAS} \ 59 | -DUSE_THREADS=${USE_THREADS} \ 60 | -DUSE_NERVANA_GPU=${USE_NERVANA_GPU} \ 61 | -DUSE_GLOG=${USE_GLOG} \ 62 | -DUSE_GFLAGS=${USE_GFLAGS} \ 63 | -DUSE_LMDB=${USE_LMDB} \ 64 | -DUSE_LEVELDB=${USE_LEVELDB} \ 65 | -DUSE_LITE_PROTO=${USE_LITE_PROTO} \ 66 | -DUSE_NCCL=${USE_NCCL} \ 67 | -DUSE_NNPACK=${USE_NNPACK} \ 68 | -DUSE_OPENCV=${USE_OPENCV} \ 69 | -DUSE_CUDA=${USE_CUDA} \ 70 | -DUSE_CNMEM=${USE_CNMEM} \ 71 | -DUSE_ZMQ=${USE_ZMQ} \ 72 | -DUSE_ROCKSDB=${USE_ROCKSDB} \ 73 | -DUSE_REDIS=${USE_REDIS} \ 74 | -DUSE_MPI=${USE_MPI} \ 75 | -DUSE_GLOO=${USE_GLOO} \ 76 | -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \ 77 | -DUSE_OPENMP=${USE_OPENMP} \ 78 | -DBUILD_PYTHON=${CAFFE_BUILD_PYTHON} \ 79 | -DBUILD_BINARY=${BUILD_BINARY} \ 80 | -DBUILD_TEST=${BUILD_TEST} \ 81 | -DGFLAGS_INCLUDE_DIR="${CK_ENV_LIB_GFLAGS_INCLUDE}" \ 82 | -DGLOG_INCLUDE_DIR="${CK_ENV_LIB_GLOG_INCLUDE}" \ 83 | -DGFLAGS_LIBRARY="${CK_ENV_LIB_GFLAGS_LIB}/libgflags.so" \ 84 | -DGLOG_LIBRARY="${CK_ENV_LIB_GLOG_LIB}/libglog.so" \ 85 | -DLMDB_INCLUDE_DIR="${CK_ENV_LIB_LMDB_INCLUDE}" \ 86 | -DLMDB_LIBRARIES="${CK_ENV_LIB_LMDB_LIB}/liblmdb.so" \ 87 | -DOpenCV_DIR="${OPENCV_DIR}" \ 88 | -DPROTOBUF_INCLUDE_DIR="${CK_ENV_LIB_PROTOBUF_HOST_INCLUDE}" \ 89 | -DPROTOBUF_PROTOC_EXECUTABLE="${CK_ENV_LIB_PROTOBUF_HOST}/bin/protoc" \ 90 | -DPROTOBUF_LIBRARY="${CK_ENV_LIB_PROTOBUF_HOST_LIB}/libprotobuf.a" \ 91 | -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}/install" \ 92 | -DCMAKE_VERBOSE_MAKEFILE=ON \ 93 | ../src 94 | 95 | if [ "${?}" != "0" ] ; then 96 | echo "Error: cmake failed!" 97 | exit 1 98 | fi 99 | 100 | #export CK_MAKE_EXTRA="VERBOSE=1" 101 | 102 | export PACKAGE_BUILD_TYPE=skip 103 | 104 | return 0 105 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cuda-universal/scripts.linux/install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # 4 | # Installation script for Caffe. 5 | # 6 | # See CK LICENSE for licensing details. 7 | # See CK COPYRIGHT for copyright details. 8 | # 9 | # Developer(s): 10 | # - Grigori Fursin, 2017; 11 | # 12 | 13 | # PACKAGE_DIR 14 | # INSTALL_DIR 15 | 16 | echo "**************************************************************" 17 | echo "Preparing vars for Caffe 2 ..." 18 | 19 | # Get eigen 20 | cd ${INSTALL_DIR}/src 21 | 22 | # Print about python 23 | if [ "${CAFFE_BUILD_PYTHON}" == "ON" ] ; then 24 | echo "" 25 | echo "You are compiling Caffe2 with Python support!" 26 | echo "To use it you need to set up CK env as following (after installation)": 27 | echo "" 28 | echo "$ ck virtual env --tags=lib,caffe2" 29 | echo "$ ipython" 30 | echo "" 31 | read -p "Press enter to continue" 32 | fi 33 | 34 | CK_OPENMP="-fopenmp" 35 | if [ "${CK_HAS_OPENMP}" = "0" ]; then 36 | CK_OPENMP="" 37 | fi 38 | 39 | OPENCV_DIR=${CK_ENV_LIB_OPENCV_JNI} 40 | if [ "${OPENCV_DIR}" == "" ]; then 41 | OPENCV_DIR=${CK_ENV_LIB_OPENCV}/share/OpenCV 42 | fi 43 | 44 | # Check extra stuff 45 | EXTRA_FLAGS="" 46 | 47 | cd ${INSTALL_DIR}/obj 48 | 49 | cmake -DCMAKE_BUILD_TYPE=${CK_ENV_CMAKE_BUILD_TYPE:-Release} \ 50 | -DCMAKE_C_COMPILER="${CK_CC_PATH_FOR_CMAKE}" \ 51 | -DCMAKE_C_FLAGS="${CK_CC_FLAGS_FOR_CMAKE} ${EXTRA_FLAGS}" \ 52 | -DCMAKE_CXX_COMPILER="${CK_CXX_PATH_FOR_CMAKE}" \ 53 | -DCMAKE_CXX_FLAGS="${CK_CXX_FLAGS_FOR_CMAKE} ${EXTRA_FLAGS} -I${CK_ENV_LIB_OPENCV_INCLUDE} -D_GLIBCXX_USE_C99_MATH=1" \ 54 | -DCMAKE_AR="${CK_AR_PATH_FOR_CMAKE}" \ 55 | -DCMAKE_LINKER="${CK_LD_PATH_FOR_CMAKE}" \ 56 | -DCAFFE2_CPU_FLAGS="${CAFFE2_CPU_FLAGS}" \ 57 | -DCAFFE2_GPU_FLAGS="${CAFFE2_GPU_FLAGS}" \ 58 | -DBLAS=${WHICH_BLAS} \ 59 | -DUSE_THREADS=${USE_THREADS} \ 60 | -DUSE_NERVANA_GPU=${USE_NERVANA_GPU} \ 61 | -DUSE_GLOG=${USE_GLOG} \ 62 | -DUSE_GFLAGS=${USE_GFLAGS} \ 63 | -DUSE_LMDB=${USE_LMDB} \ 64 | -DUSE_LEVELDB=${USE_LEVELDB} \ 65 | -DUSE_LITE_PROTO=${USE_LITE_PROTO} \ 66 | -DUSE_NCCL=${USE_NCCL} \ 67 | -DUSE_NNPACK=${USE_NNPACK} \ 68 | -DUSE_OPENCV=${USE_OPENCV} \ 69 | -DUSE_CUDA=${USE_CUDA} \ 70 | -DUSE_CNMEM=${USE_CNMEM} \ 71 | -DUSE_ZMQ=${USE_ZMQ} \ 72 | -DUSE_ROCKSDB=${USE_ROCKSDB} \ 73 | -DUSE_REDIS=${USE_REDIS} \ 74 | -DUSE_MPI=${USE_MPI} \ 75 | -DUSE_GLOO=${USE_GLOO} \ 76 | -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \ 77 | -DUSE_OPENMP=${USE_OPENMP} \ 78 | -DBUILD_PYTHON=${CAFFE_BUILD_PYTHON} \ 79 | -DBUILD_BINARY=${BUILD_BINARY} \ 80 | -DBUILD_TEST=${BUILD_TEST} \ 81 | -DGFLAGS_INCLUDE_DIR="${CK_ENV_LIB_GFLAGS_INCLUDE}" \ 82 | -DGLOG_INCLUDE_DIR="${CK_ENV_LIB_GLOG_INCLUDE}" \ 83 | -DGFLAGS_LIBRARY="${CK_ENV_LIB_GFLAGS_LIB}/libgflags.so" \ 84 | -DGLOG_LIBRARY="${CK_ENV_LIB_GLOG_LIB}/libglog.so" \ 85 | -DLMDB_INCLUDE_DIR="${CK_ENV_LIB_LMDB_INCLUDE}" \ 86 | -DLMDB_LIBRARIES="${CK_ENV_LIB_LMDB_LIB}/liblmdb.so" \ 87 | -DOpenCV_DIR="${OPENCV_DIR}" \ 88 | -DPROTOBUF_INCLUDE_DIR="${CK_ENV_LIB_PROTOBUF_HOST_INCLUDE}" \ 89 | -DPROTOBUF_PROTOC_EXECUTABLE="${CK_ENV_LIB_PROTOBUF_HOST}/bin/protoc" \ 90 | -DPROTOBUF_LIBRARY="${CK_ENV_LIB_PROTOBUF_HOST_LIB}/libprotobuf.a" \ 91 | -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}/install" \ 92 | -DCMAKE_VERBOSE_MAKEFILE=ON \ 93 | ../src 94 | 95 | if [ "${?}" != "0" ] ; then 96 | echo "Error: cmake failed!" 97 | exit 1 98 | fi 99 | 100 | #export CK_MAKE_EXTRA="VERBOSE=1" 101 | 102 | export PACKAGE_BUILD_TYPE=skip 103 | 104 | return 0 105 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cuda-universal/scripts.linux/install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # 4 | # Installation script for Caffe. 5 | # 6 | # See CK LICENSE for licensing details. 7 | # See CK COPYRIGHT for copyright details. 8 | # 9 | # Developer(s): 10 | # - Grigori Fursin, 2017; 11 | # 12 | 13 | # PACKAGE_DIR 14 | # INSTALL_DIR 15 | 16 | echo "**************************************************************" 17 | echo "Preparing vars for Caffe 2 ..." 18 | 19 | # Get eigen 20 | cd ${INSTALL_DIR}/src 21 | 22 | # Print about python 23 | if [ "${CAFFE_BUILD_PYTHON}" == "ON" ] ; then 24 | echo "" 25 | echo "You are compiling Caffe2 with Python support!" 26 | echo "To use it you need to set up CK env as following (after installation)": 27 | echo "" 28 | echo "$ ck virtual env --tags=lib,caffe2" 29 | echo "$ ipython" 30 | echo "" 31 | read -p "Press enter to continue" 32 | fi 33 | 34 | CK_OPENMP="-fopenmp" 35 | if [ "${CK_HAS_OPENMP}" = "0" ]; then 36 | CK_OPENMP="" 37 | fi 38 | 39 | OPENCV_DIR=${CK_ENV_LIB_OPENCV_JNI} 40 | if [ "${OPENCV_DIR}" == "" ]; then 41 | OPENCV_DIR=${CK_ENV_LIB_OPENCV}/share/OpenCV 42 | fi 43 | 44 | # Check extra stuff 45 | EXTRA_FLAGS="" 46 | 47 | cd ${INSTALL_DIR}/obj 48 | 49 | cmake -DCMAKE_BUILD_TYPE=${CK_ENV_CMAKE_BUILD_TYPE:-Release} \ 50 | -DCMAKE_C_COMPILER="${CK_CC_PATH_FOR_CMAKE}" \ 51 | -DCMAKE_C_FLAGS="${CK_CC_FLAGS_FOR_CMAKE} ${EXTRA_FLAGS}" \ 52 | -DCMAKE_CXX_COMPILER="${CK_CXX_PATH_FOR_CMAKE}" \ 53 | -DCMAKE_CXX_FLAGS="${CK_CXX_FLAGS_FOR_CMAKE} ${EXTRA_FLAGS} -I${CK_ENV_LIB_OPENCV_INCLUDE} -D_GLIBCXX_USE_C99_MATH=1" \ 54 | -DCMAKE_AR="${CK_AR_PATH_FOR_CMAKE}" \ 55 | -DCMAKE_LINKER="${CK_LD_PATH_FOR_CMAKE}" \ 56 | -DCAFFE2_CPU_FLAGS="${CAFFE2_CPU_FLAGS}" \ 57 | -DCAFFE2_GPU_FLAGS="${CAFFE2_GPU_FLAGS}" \ 58 | -DBLAS=${WHICH_BLAS} \ 59 | -DUSE_THREADS=${USE_THREADS} \ 60 | -DUSE_NERVANA_GPU=${USE_NERVANA_GPU} \ 61 | -DUSE_GLOG=${USE_GLOG} \ 62 | -DUSE_GFLAGS=${USE_GFLAGS} \ 63 | -DUSE_LMDB=${USE_LMDB} \ 64 | -DUSE_LEVELDB=${USE_LEVELDB} \ 65 | -DUSE_LITE_PROTO=${USE_LITE_PROTO} \ 66 | -DUSE_NCCL=${USE_NCCL} \ 67 | -DUSE_NNPACK=${USE_NNPACK} \ 68 | -DUSE_OPENCV=${USE_OPENCV} \ 69 | -DUSE_CUDA=${USE_CUDA} \ 70 | -DUSE_CNMEM=${USE_CNMEM} \ 71 | -DUSE_ZMQ=${USE_ZMQ} \ 72 | -DUSE_ROCKSDB=${USE_ROCKSDB} \ 73 | -DUSE_REDIS=${USE_REDIS} \ 74 | -DUSE_MPI=${USE_MPI} \ 75 | -DUSE_GLOO=${USE_GLOO} \ 76 | -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \ 77 | -DUSE_OPENMP=${USE_OPENMP} \ 78 | -DBUILD_PYTHON=${CAFFE_BUILD_PYTHON} \ 79 | -DBUILD_BINARY=${BUILD_BINARY} \ 80 | -DBUILD_TEST=${BUILD_TEST} \ 81 | -DGFLAGS_INCLUDE_DIR="${CK_ENV_LIB_GFLAGS_INCLUDE}" \ 82 | -DGLOG_INCLUDE_DIR="${CK_ENV_LIB_GLOG_INCLUDE}" \ 83 | -DGFLAGS_LIBRARY="${CK_ENV_LIB_GFLAGS_LIB}/libgflags.so" \ 84 | -DGLOG_LIBRARY="${CK_ENV_LIB_GLOG_LIB}/libglog.so" \ 85 | -DLMDB_INCLUDE_DIR="${CK_ENV_LIB_LMDB_INCLUDE}" \ 86 | -DLMDB_LIBRARIES="${CK_ENV_LIB_LMDB_LIB}/liblmdb.so" \ 87 | -DOpenCV_DIR="${OPENCV_DIR}" \ 88 | -DPROTOBUF_INCLUDE_DIR="${CK_ENV_LIB_PROTOBUF_HOST_INCLUDE}" \ 89 | -DPROTOBUF_PROTOC_EXECUTABLE="${CK_ENV_LIB_PROTOBUF_HOST}/bin/protoc" \ 90 | -DPROTOBUF_LIBRARY="${CK_ENV_LIB_PROTOBUF_HOST_LIB}/libprotobuf.a" \ 91 | -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}/install" \ 92 | -DCMAKE_VERBOSE_MAKEFILE=ON \ 93 | ../src 94 | 95 | if [ "${?}" != "0" ] ; then 96 | echo "Error: cmake failed!" 97 | exit 1 98 | fi 99 | 100 | #export CK_MAKE_EXTRA="VERBOSE=1" 101 | 102 | export PACKAGE_BUILD_TYPE=skip 103 | 104 | return 0 105 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cpu-universal/scripts.win/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem 4 | rem Installation script for CK packages. 5 | rem 6 | rem See CK LICENSE.txt for licensing details. 7 | rem See CK Copyright.txt for copyright details. 8 | rem 9 | rem Developer(s): Grigori Fursin, 2017 10 | rem 11 | 12 | rem PACKAGE_DIR 13 | rem INSTALL_DIR 14 | 15 | rem get eigen and protobuf 16 | cd /d %INSTALL_DIR%\src 17 | 18 | rem Get protobuf from CK and copy here 19 | if exist "%CK_ENV_LIB_PROTOBUF_HOST_SRC_DIR%" ( 20 | xcopy /s /e /y %CK_ENV_LIB_PROTOBUF_HOST_SRC_DIR%\* third_party\protobuf\ 21 | ) 22 | 23 | if exist "%CK_ENV_LIB_PROTOBUF_HOST%" ( 24 | if not exist "build_host_protoc" ( 25 | mkdir build_host_protoc 26 | ) 27 | xcopy /s /e /y %CK_ENV_LIB_PROTOBUF_HOST%\* build_host_protoc\ 28 | ) 29 | 30 | rem git submodule update --init -- third_party\protobuf 31 | 32 | if "%CAFFE_BUILD_PYTHON%" == "ON" ( 33 | echo. 34 | echo You are compiling Caffe2 with Python support! 35 | echo To use it you need to set up CK env as following ^(after installation^)^: 36 | echo. 37 | echo $ ck virtual env --tags=lib,caffe2 38 | echo $ ipython 39 | echo. 40 | set /p id="Press enter to continue" 41 | ) 42 | 43 | cd /d %INSTALL_DIR%\obj 44 | 45 | rem echo ************************************************************** 46 | rem echo Building protobuf for Caffe 2 ... 47 | 48 | rem cmake %INSTALL_DIR%\src\third_party\protobuf\cmake ^ 49 | rem -G"%CK_CMAKE_GENERATOR%" ^ 50 | rem -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 51 | rem -DCMAKE_INSTALL_PREFIX=. ^ 52 | rem -Dprotobuf_BUILD_TESTS=OFF ^ 53 | rem -DCMAKE_BUILD_TYPE=Debug 54 | rem 55 | rem msbuild INSTALL.vcxproj 56 | 57 | rem exit /b 1 58 | 59 | echo ************************************************************** 60 | echo Preparing vars for Caffe 2 ... 61 | 62 | set CK_CXX_FLAGS_FOR_CMAKE= 63 | set CK_CXX_FLAGS_ANDROID_TYPICAL= 64 | 65 | set CK_CMAKE_EXTRA=%CK_CMAKE_EXTRA% ^ 66 | -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 67 | -DCMAKE_VERBOSE_MAKEFILE=1 ^ 68 | -DBUILD_TEST=OFF ^ 69 | -DBLAS=%WHICH_BLAS% ^ 70 | -DUSE_THREADS=%USE_THREADS% ^ 71 | -DUSE_NERVANA_GPU=%USE_NERVANA_GPU% ^ 72 | -DUSE_GLOG=OFF ^ 73 | -DUSE_GFLAGS=OFF ^ 74 | -DUSE_LMDB=OFF ^ 75 | -DUSE_LEVELDB=OFF ^ 76 | -DUSE_LITE_PROTO=%USE_LITE_PROTO% ^ 77 | -DUSE_NCCL=%USE_NCCL% ^ 78 | -DUSE_NNPACK=%USE_NNPACK% ^ 79 | -DUSE_OPENCV=OFF ^ 80 | -DUSE_CUDA=%USE_CUDA% ^ 81 | -DUSE_CNMEM=%USE_CNMEM% ^ 82 | -DUSE_ZMQ=%USE_ZMQ% ^ 83 | -DUSE_ROCKSDB=%USE_ROCKSDB% ^ 84 | -DUSE_REDIS=%USE_REDIS% ^ 85 | -DUSE_MPI=%USE_MPI% ^ 86 | -DUSE_GLOO=%USE_GLOO% ^ 87 | -DBUILD_SHARED_LIBS=OFF ^ 88 | -DUSE_OPENMP=%USE_OPENMP% ^ 89 | -DBUILD_PYTHON=%CAFFE_BUILD_PYTHON% ^ 90 | -DBUILD_BINARY=ON ^ 91 | -DBUILD_TEST=%BUILD_TEST% ^ 92 | -DPROTOBUF_PROTOC_EXECUTABLE="%CK_ENV_LIB_PROTOBUF_HOST%\bin\protoc.exe" ^ 93 | -DGFLAGS_INCLUDE_DIR="%CK_ENV_LIB_GFLAGS_INCLUDE%" ^ 94 | -DGFLAGS_LIBRARY_RELEASE="%CK_ENV_LIB_GFLAGS_LIB%\gflags.lib" ^ 95 | -DGFLAGS_LIBRARY_DEBUG="%CK_ENV_LIB_GFLAGS_LIB%\gflags.lib" ^ 96 | -DGLOG_INCLUDE_DIR="%CK_ENV_LIB_GLOG_INCLUDE%" ^ 97 | -DGLOG_LIBRARY_RELEASE="%CK_ENV_LIB_GLOG_LIB%\glog.lib" ^ 98 | -DGLOG_LIBRARY_DEBUG="%CK_ENV_LIB_GLOG_LIB%\glog.lib" ^ 99 | -DLMDB_INCLUDE_DIR="%CK_ENV_LIB_LMDB_INCLUDE%" ^ 100 | -DLMDB_LIBRARIES="%CK_ENV_LIB_LMDB_LIB%\lmdb.lib" ^ 101 | -DOpenCV_DIR="%CK_ENV_LIB_OPENCV%" ^ 102 | -DOpenCV_LIB_PATH="%CK_ENV_LIB_OPENCV_LIB%" 103 | 104 | rem -DUSE_LMDB=%USE_LMDB% ^ 105 | 106 | 107 | rem -DPROTOBUF_DIR="%CK_ENV_LIB_PROTOBUF_HOST%\cmake" ^ 108 | rem -DPROTOBUF_PROTOC_EXECUTABLE="%CK_ENV_LIB_PROTOBUF_HOST%\bin\protoc.exe" ^ 109 | 110 | rem -DOpenBLAS_INCLUDE_DIR="%CK_ENV_LIB_OPENBLAS_INCLUDE%" ^ 111 | rem -DOpenBLAS_LIB="%CK_ENV_LIB_OPENBLAS_LIB%\%CK_ENV_LIB_OPENBLAS_STATIC_NAME%" ^ 112 | 113 | rem -DBLAS=%WHICH_BLAS% ^ 114 | 115 | exit /b 0 116 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cpu-universal/scripts.linux/install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # 4 | # Installation script for Caffe. 5 | # 6 | # See CK LICENSE for licensing details. 7 | # See CK COPYRIGHT for copyright details. 8 | # 9 | # Developer(s): 10 | # - Grigori Fursin, 2017; 11 | # 12 | 13 | # PACKAGE_DIR 14 | # INSTALL_DIR 15 | 16 | echo "**************************************************************" 17 | echo "Preparing vars for Caffe 2 ..." 18 | 19 | # Get eigen 20 | cd ${INSTALL_DIR}/src 21 | git submodule update --init -- third_party/eigen 22 | git submodule update --init -- third_party/protobuf 23 | 24 | # Print about python 25 | if [ "${CAFFE_BUILD_PYTHON}" == "ON" ] ; then 26 | git submodule update --init -- third_party/pybind11 27 | 28 | echo "" 29 | echo "You are compiling Caffe2 with Python support!" 30 | echo "To use it you need to set up CK env as following (after installation)": 31 | echo "" 32 | echo "$ ck virtual env --tags=lib,caffe2" 33 | echo "$ ipython" 34 | echo "" 35 | read -p "Press enter to continue" 36 | fi 37 | 38 | CK_OPENMP="-fopenmp" 39 | if [ "${CK_HAS_OPENMP}" = "0" ]; then 40 | CK_OPENMP="" 41 | fi 42 | 43 | OPENCV_DIR=${CK_ENV_LIB_OPENCV_JNI} 44 | if [ "${OPENCV_DIR}" == "" ]; then 45 | OPENCV_DIR=${CK_ENV_LIB_OPENCV}/share/OpenCV 46 | fi 47 | 48 | # Check extra stuff 49 | EXTRA_FLAGS="" 50 | 51 | cd ${INSTALL_DIR}/obj 52 | 53 | cmake -DCMAKE_BUILD_TYPE=${CK_ENV_CMAKE_BUILD_TYPE:-Release} \ 54 | -DCMAKE_C_COMPILER="${CK_CC_PATH_FOR_CMAKE}" \ 55 | -DCMAKE_C_FLAGS="${CK_CC_FLAGS_FOR_CMAKE} ${EXTRA_FLAGS}" \ 56 | -DCMAKE_CXX_COMPILER="${CK_CXX_PATH_FOR_CMAKE}" \ 57 | -DCMAKE_CXX_FLAGS="${CK_CXX_FLAGS_FOR_CMAKE} ${EXTRA_FLAGS} -I${CK_ENV_LIB_OPENCV_INCLUDE}" \ 58 | -DCMAKE_AR="${CK_AR_PATH_FOR_CMAKE}" \ 59 | -DCMAKE_LINKER="${CK_LD_PATH_FOR_CMAKE}" \ 60 | -DCAFFE2_CPU_FLAGS="${CAFFE2_CPU_FLAGS}" \ 61 | -DCAFFE2_GPU_FLAGS="${CAFFE2_GPU_FLAGS}" \ 62 | -DBLAS=${WHICH_BLAS} \ 63 | -DUSE_THREADS=${USE_THREADS} \ 64 | -DUSE_NERVANA_GPU=${USE_NERVANA_GPU} \ 65 | -DUSE_GLOG=${USE_GLOG} \ 66 | -DUSE_GFLAGS=${USE_GFLAGS} \ 67 | -DUSE_LMDB=${USE_LMDB} \ 68 | -DUSE_LEVELDB=${USE_LEVELDB} \ 69 | -DUSE_LITE_PROTO=${USE_LITE_PROTO} \ 70 | -DUSE_NCCL=${USE_NCCL} \ 71 | -DUSE_NNPACK=${USE_NNPACK} \ 72 | -DUSE_OPENCV=${USE_OPENCV} \ 73 | -DUSE_CUDA=${USE_CUDA} \ 74 | -DUSE_CNMEM=${USE_CNMEM} \ 75 | -DUSE_ZMQ=${USE_ZMQ} \ 76 | -DUSE_ROCKSDB=${USE_ROCKSDB} \ 77 | -DUSE_REDIS=${USE_REDIS} \ 78 | -DUSE_MPI=${USE_MPI} \ 79 | -DUSE_GLOO=${USE_GLOO} \ 80 | -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \ 81 | -DUSE_OPENMP=${USE_OPENMP} \ 82 | -DBUILD_PYTHON=${CAFFE_BUILD_PYTHON} \ 83 | -DBUILD_BINARY=${BUILD_BINARY} \ 84 | -DBUILD_TEST=${BUILD_TEST} \ 85 | -DGFLAGS_INCLUDE_DIR="${CK_ENV_LIB_GFLAGS_INCLUDE}" \ 86 | -DGLOG_INCLUDE_DIR="${CK_ENV_LIB_GLOG_INCLUDE}" \ 87 | -DGFLAGS_LIBRARY="${CK_ENV_LIB_GFLAGS_LIB}/libgflags.so" \ 88 | -DGLOG_LIBRARY="${CK_ENV_LIB_GLOG_LIB}/libglog.so" \ 89 | -DLMDB_INCLUDE_DIR="${CK_ENV_LIB_LMDB_INCLUDE}" \ 90 | -DLMDB_LIBRARIES="${CK_ENV_LIB_LMDB_LIB}/liblmdb.so" \ 91 | -DOpenCV_DIR="${OPENCV_DIR}" \ 92 | -DPROTOBUF_INCLUDE_DIR="${CK_ENV_LIB_PROTOBUF_HOST_INCLUDE}" \ 93 | -DPROTOBUF_PROTOC_EXECUTABLE="${CK_ENV_LIB_PROTOBUF_HOST}/bin/protoc" \ 94 | -DPROTOBUF_LIBRARY="${CK_ENV_LIB_PROTOBUF_HOST_LIB}/libprotobuf.a" \ 95 | -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}/install" \ 96 | -DCMAKE_VERBOSE_MAKEFILE=ON \ 97 | ../src 98 | 99 | if [ "${?}" != "0" ] ; then 100 | echo "Error: cmake failed!" 101 | exit 1 102 | fi 103 | 104 | #export CK_MAKE_EXTRA="VERBOSE=1" 105 | 106 | export PACKAGE_BUILD_TYPE=skip 107 | 108 | return 0 109 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cpu-universal/scripts.win/install.bat.arc2: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem 4 | rem Installation script for CK packages. 5 | rem 6 | rem See CK LICENSE.txt for licensing details. 7 | rem See CK Copyright.txt for copyright details. 8 | rem 9 | rem Developer(s): Grigori Fursin, 2017 10 | rem 11 | 12 | rem PACKAGE_DIR 13 | rem INSTALL_DIR 14 | 15 | rem get eigen and protobuf 16 | cd /d %INSTALL_DIR%\src 17 | 18 | rem Get protobuf from CK and copy here 19 | if exist "%CK_ENV_LIB_PROTOBUF_HOST_SRC_DIR%" ( 20 | xcopy /s /e /y %CK_ENV_LIB_PROTOBUF_HOST_SRC_DIR%\* third_party\protobuf\ 21 | ) 22 | 23 | if exist "%CK_ENV_LIB_PROTOBUF_HOST%" ( 24 | if not exist "build_host_protoc" ( 25 | mkdir build_host_protoc 26 | ) 27 | xcopy /s /e /y %CK_ENV_LIB_PROTOBUF_HOST%\* build_host_protoc\ 28 | ) 29 | 30 | rem git submodule update --init -- third_party\protobuf 31 | 32 | if "%CAFFE_BUILD_PYTHON%" == "ON" ( 33 | echo. 34 | echo You are compiling Caffe2 with Python support! 35 | echo To use it you need to set up CK env as following ^(after installation^)^: 36 | echo. 37 | echo "ck xset env tags=lib,caffe2 & call tmp-ck-env.bat & ipython2" 38 | echo. 39 | set /p id="Press enter to continue" 40 | ) 41 | 42 | cd /d %INSTALL_DIR%\obj 43 | 44 | rem echo ************************************************************** 45 | rem echo Building protobuf for Caffe 2 ... 46 | 47 | rem cmake %INSTALL_DIR%\src\third_party\protobuf\cmake ^ 48 | rem -G"%CK_CMAKE_GENERATOR%" ^ 49 | rem -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 50 | rem -DCMAKE_INSTALL_PREFIX=. ^ 51 | rem -Dprotobuf_BUILD_TESTS=OFF ^ 52 | rem -DCMAKE_BUILD_TYPE=Debug 53 | rem 54 | rem msbuild INSTALL.vcxproj 55 | 56 | rem exit /b 1 57 | 58 | echo ************************************************************** 59 | echo Preparing vars for Caffe 2 ... 60 | 61 | set CK_CXX_FLAGS_FOR_CMAKE= 62 | set CK_CXX_FLAGS_ANDROID_TYPICAL= 63 | 64 | set CK_CMAKE_EXTRA=%CK_CMAKE_EXTRA% ^ 65 | -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 66 | -DCMAKE_VERBOSE_MAKEFILE=1 ^ 67 | -DBUILD_TEST=OFF ^ 68 | -DBLAS=%WHICH_BLAS% ^ 69 | -DUSE_THREADS=%USE_THREADS% ^ 70 | -DUSE_NERVANA_GPU=%USE_NERVANA_GPU% ^ 71 | -DUSE_GLOG=OFF ^ 72 | -DUSE_GFLAGS=OFF ^ 73 | -DUSE_LMDB=OFF ^ 74 | -DUSE_LEVELDB=OFF ^ 75 | -DUSE_LITE_PROTO=%USE_LITE_PROTO% ^ 76 | -DUSE_NCCL=%USE_NCCL% ^ 77 | -DUSE_NNPACK=%USE_NNPACK% ^ 78 | -DUSE_OPENCV=OFF ^ 79 | -DUSE_CUDA=%USE_CUDA% ^ 80 | -DUSE_CNMEM=%USE_CNMEM% ^ 81 | -DUSE_ZMQ=%USE_ZMQ% ^ 82 | -DUSE_ROCKSDB=%USE_ROCKSDB% ^ 83 | -DUSE_REDIS=%USE_REDIS% ^ 84 | -DUSE_MPI=%USE_MPI% ^ 85 | -DUSE_GLOO=%USE_GLOO% ^ 86 | -DBUILD_SHARED_LIBS=OFF ^ 87 | -DUSE_OPENMP=%USE_OPENMP% ^ 88 | -DBUILD_PYTHON=%CAFFE_BUILD_PYTHON% ^ 89 | -DBUILD_BINARY=ON ^ 90 | -DBUILD_TEST=%BUILD_TEST% ^ 91 | -DPROTOBUF_PROTOC_EXECUTABLE="%CK_ENV_LIB_PROTOBUF_HOST%\bin\protoc.exe" ^ 92 | -DGFLAGS_INCLUDE_DIR="%CK_ENV_LIB_GFLAGS_INCLUDE%" ^ 93 | -DGFLAGS_LIBRARY_RELEASE="%CK_ENV_LIB_GFLAGS_LIB%\gflags.lib" ^ 94 | -DGFLAGS_LIBRARY_DEBUG="%CK_ENV_LIB_GFLAGS_LIB%\gflags.lib" ^ 95 | -DGLOG_INCLUDE_DIR="%CK_ENV_LIB_GLOG_INCLUDE%" ^ 96 | -DGLOG_LIBRARY_RELEASE="%CK_ENV_LIB_GLOG_LIB%\glog.lib" ^ 97 | -DGLOG_LIBRARY_DEBUG="%CK_ENV_LIB_GLOG_LIB%\glog.lib" ^ 98 | -DLMDB_INCLUDE_DIR="%CK_ENV_LIB_LMDB_INCLUDE%" ^ 99 | -DLMDB_LIBRARIES="%CK_ENV_LIB_LMDB_LIB%\lmdb.lib" ^ 100 | -DOpenCV_DIR="%CK_ENV_LIB_OPENCV%" ^ 101 | -DOpenCV_LIB_PATH="%CK_ENV_LIB_OPENCV_LIB%" 102 | 103 | rem -DUSE_LMDB=%USE_LMDB% ^ 104 | 105 | 106 | rem -DPROTOBUF_DIR="%CK_ENV_LIB_PROTOBUF_HOST%\cmake" ^ 107 | rem -DPROTOBUF_PROTOC_EXECUTABLE="%CK_ENV_LIB_PROTOBUF_HOST%\bin\protoc.exe" ^ 108 | 109 | rem -DOpenBLAS_INCLUDE_DIR="%CK_ENV_LIB_OPENBLAS_INCLUDE%" ^ 110 | rem -DOpenBLAS_LIB="%CK_ENV_LIB_OPENBLAS_LIB%\%CK_ENV_LIB_OPENBLAS_STATIC_NAME%" ^ 111 | 112 | rem -DBLAS=%WHICH_BLAS% ^ 113 | 114 | exit /b 0 115 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cuda-universal/scripts.win/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem 4 | rem Installation script for CK packages. 5 | rem 6 | rem See CK LICENSE.txt for licensing details. 7 | rem See CK Copyright.txt for copyright details. 8 | rem 9 | rem Developer(s): Grigori Fursin, 2017 10 | rem 11 | 12 | rem PACKAGE_DIR 13 | rem INSTALL_DIR 14 | 15 | if "%CAFFE_BUILD_PYTHON%" == "ON" ( 16 | echo. 17 | echo You are compiling Caffe2 with Python support! 18 | echo To use it you need to set up CK env as following ^(after installation^)^: 19 | echo. 20 | echo $ ck virtual env --tags=lib,caffe2 21 | echo $ ipython 22 | echo. 23 | set /p id="Press enter to continue" 24 | ) 25 | 26 | cd /d %INSTALL_DIR%\src 27 | mkdir build_host_protoc 28 | cd /d %INSTALL_DIR%\src\build_host_protoc 29 | 30 | echo ************************************************************** 31 | echo Configuring protobuf for Caffe 2 ... 32 | 33 | cmake ..\third_party\protobuf\cmake ^ 34 | -G"%CK_CMAKE_GENERATOR%" ^ 35 | -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 36 | -DCMAKE_INSTALL_PREFIX=. ^ 37 | -Dprotobuf_BUILD_TESTS=OFF 38 | 39 | if %errorlevel% neq 0 ( 40 | echo. 41 | echo Error: protobuf configure failed ... 42 | goto err 43 | ) 44 | 45 | echo ************************************************************** 46 | echo Building protobuf for Caffe2 47 | cmake --build . --config %CMAKE_CONFIG% --target INSTALL 48 | 49 | if %errorlevel% neq 0 ( 50 | echo. 51 | echo Error: protobuf build failed ... 52 | goto err 53 | ) 54 | 55 | echo ************************************************************** 56 | echo Preparing vars for Caffe 2 ... 57 | 58 | set CK_CXX_FLAGS_FOR_CMAKE= 59 | set CK_CXX_FLAGS_ANDROID_TYPICAL= 60 | 61 | set CK_CMAKE_EXTRA=%CK_CMAKE_EXTRA% ^ 62 | -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 63 | -DCMAKE_VERBOSE_MAKEFILE=1 ^ 64 | -DBUILD_TEST=OFF ^ 65 | -DBLAS=%WHICH_BLAS% ^ 66 | -DUSE_THREADS=%USE_THREADS% ^ 67 | -DUSE_NERVANA_GPU=%USE_NERVANA_GPU% ^ 68 | -DUSE_GLOG=OFF ^ 69 | -DUSE_GFLAGS=OFF ^ 70 | -DUSE_LMDB=OFF ^ 71 | -DUSE_LEVELDB=OFF ^ 72 | -DUSE_LITE_PROTO=%USE_LITE_PROTO% ^ 73 | -DUSE_NCCL=%USE_NCCL% ^ 74 | -DUSE_NNPACK=%USE_NNPACK% ^ 75 | -DUSE_OPENCV=OFF ^ 76 | -DUSE_CUDA=%USE_CUDA% ^ 77 | -DUSE_CNMEM=%USE_CNMEM% ^ 78 | -DUSE_ZMQ=%USE_ZMQ% ^ 79 | -DUSE_ROCKSDB=%USE_ROCKSDB% ^ 80 | -DUSE_REDIS=%USE_REDIS% ^ 81 | -DUSE_MPI=%USE_MPI% ^ 82 | -DUSE_GLOO=%USE_GLOO% ^ 83 | -DBUILD_SHARED_LIBS=OFF ^ 84 | -DUSE_OPENMP=%USE_OPENMP% ^ 85 | -DBUILD_PYTHON=%CAFFE_BUILD_PYTHON% ^ 86 | -DBUILD_BINARY=OFF ^ 87 | -DBUILD_TEST=%BUILD_TEST% ^ 88 | -DCUDA_TOOLKIT_ROOT_DIR="%CK_ENV_COMPILER_CUDA_WIN%" ^ 89 | -DCUDA_HOST_COMPILER="%VCINSTALLDIR%\cl.exe" ^ 90 | -DCCBIN="%VCINSTALLDIR%\cl.exe" ^ 91 | -DCAFFE2_CUSTOM_PROTOC_EXECUTABLE=%INSTALL_DIR%\src\build_host_protoc\bin\protoc.exe 92 | 93 | rem -DGFLAGS_INCLUDE_DIR="%CK_ENV_LIB_GFLAGS_INCLUDE%" ^ 94 | rem -DGFLAGS_LIBRARY_RELEASE="%CK_ENV_LIB_GFLAGS_LIB%\gflags.lib" ^ 95 | rem -DGFLAGS_LIBRARY_DEBUG="%CK_ENV_LIB_GFLAGS_LIB%\gflags.lib" ^ 96 | rem -DGLOG_INCLUDE_DIR="%CK_ENV_LIB_GLOG_INCLUDE%" ^ 97 | rem -DGLOG_LIBRARY_RELEASE="%CK_ENV_LIB_GLOG_LIB%\glog.lib" ^ 98 | rem -DGLOG_LIBRARY_DEBUG="%CK_ENV_LIB_GLOG_LIB%\glog.lib" ^ 99 | rem -DLMDB_INCLUDE_DIR="%CK_ENV_LIB_LMDB_INCLUDE%" ^ 100 | rem -DLMDB_LIBRARIES="%CK_ENV_LIB_LMDB_LIB%\lmdb.lib" ^ 101 | rem -DOpenCV_DIR="%CK_ENV_LIB_OPENCV%" ^ 102 | rem -DOpenCV_LIB_PATH="%CK_ENV_LIB_OPENCV_LIB%" 103 | 104 | rem -DUSE_LMDB=%USE_LMDB% ^ 105 | 106 | 107 | rem -DPROTOBUF_DIR="%CK_ENV_LIB_PROTOBUF_HOST%\cmake" ^ 108 | rem -DPROTOBUF_PROTOC_EXECUTABLE="%CK_ENV_LIB_PROTOBUF_HOST%\bin\protoc.exe" ^ 109 | 110 | rem -DOpenBLAS_INCLUDE_DIR="%CK_ENV_LIB_OPENBLAS_INCLUDE%" ^ 111 | rem -DOpenBLAS_LIB="%CK_ENV_LIB_OPENBLAS_LIB%\%CK_ENV_LIB_OPENBLAS_STATIC_NAME%" ^ 112 | 113 | rem -DBLAS=%WHICH_BLAS% ^ 114 | 115 | exit /b 0 116 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cpu-universal/scripts.win/install.bat.arc3: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem 4 | rem Installation script for CK packages. 5 | rem 6 | rem See CK LICENSE.txt for licensing details. 7 | rem See CK Copyright.txt for copyright details. 8 | rem 9 | rem Developer(s): Grigori Fursin, 2017 10 | rem 11 | 12 | rem PACKAGE_DIR 13 | rem INSTALL_DIR 14 | 15 | rem get eigen and protobuf 16 | cd /d %INSTALL_DIR%\src 17 | 18 | rem Get protobuf from CK and copy here 19 | if exist "%CK_ENV_LIB_PROTOBUF_HOST_SRC_DIR%" ( 20 | xcopy /s /e /y %CK_ENV_LIB_PROTOBUF_HOST_SRC_DIR%\* third_party\protobuf\ 21 | ) 22 | 23 | if exist "%CK_ENV_LIB_PROTOBUF_HOST%" ( 24 | if not exist "build_host_protoc" ( 25 | mkdir build_host_protoc 26 | ) 27 | xcopy /s /e /y %CK_ENV_LIB_PROTOBUF_HOST%\* build_host_protoc\ 28 | ) 29 | 30 | rem git submodule update --init -- third_party\protobuf 31 | 32 | if "%CAFFE_BUILD_PYTHON%" == "ON" ( 33 | echo. 34 | echo You are compiling Caffe2 with Python support! 35 | echo To use it you need to set up CK env as following ^(after installation^)^: 36 | echo. 37 | echo "ck xset env tags=lib,caffe2 & call tmp-ck-env.bat & ipython2" 38 | echo. 39 | set /p id="Press enter to continue" 40 | ) 41 | 42 | cd /d %INSTALL_DIR%\src 43 | mkdir build_host_protoc 44 | 45 | 46 | rem echo ************************************************************** 47 | rem echo Building protobuf for Caffe 2 ... 48 | 49 | rem cmake %INSTALL_DIR%\src\third_party\protobuf\cmake ^ 50 | rem -G"%CK_CMAKE_GENERATOR%" ^ 51 | rem -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 52 | rem -DCMAKE_INSTALL_PREFIX=. ^ 53 | rem -Dprotobuf_BUILD_TESTS=OFF ^ 54 | rem -DCMAKE_BUILD_TYPE=Debug 55 | rem 56 | rem msbuild INSTALL.vcxproj 57 | 58 | 59 | 60 | 61 | 62 | 63 | echo ************************************************************** 64 | echo Preparing vars for Caffe 2 ... 65 | 66 | set CK_CXX_FLAGS_FOR_CMAKE= 67 | set CK_CXX_FLAGS_ANDROID_TYPICAL= 68 | 69 | set CK_CMAKE_EXTRA=%CK_CMAKE_EXTRA% ^ 70 | -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 71 | -DCMAKE_VERBOSE_MAKEFILE=1 ^ 72 | -DBUILD_TEST=OFF ^ 73 | -DBLAS=%WHICH_BLAS% ^ 74 | -DUSE_THREADS=%USE_THREADS% ^ 75 | -DUSE_NERVANA_GPU=%USE_NERVANA_GPU% ^ 76 | -DUSE_GLOG=OFF ^ 77 | -DUSE_GFLAGS=OFF ^ 78 | -DUSE_LMDB=OFF ^ 79 | -DUSE_LEVELDB=OFF ^ 80 | -DUSE_LITE_PROTO=%USE_LITE_PROTO% ^ 81 | -DUSE_NCCL=%USE_NCCL% ^ 82 | -DUSE_NNPACK=%USE_NNPACK% ^ 83 | -DUSE_OPENCV=OFF ^ 84 | -DUSE_CUDA=%USE_CUDA% ^ 85 | -DUSE_CNMEM=%USE_CNMEM% ^ 86 | -DUSE_ZMQ=%USE_ZMQ% ^ 87 | -DUSE_ROCKSDB=%USE_ROCKSDB% ^ 88 | -DUSE_REDIS=%USE_REDIS% ^ 89 | -DUSE_MPI=%USE_MPI% ^ 90 | -DUSE_GLOO=%USE_GLOO% ^ 91 | -DBUILD_SHARED_LIBS=OFF ^ 92 | -DUSE_OPENMP=%USE_OPENMP% ^ 93 | -DBUILD_PYTHON=%CAFFE_BUILD_PYTHON% ^ 94 | -DBUILD_BINARY=ON ^ 95 | -DBUILD_TEST=%BUILD_TEST% ^ 96 | -DPROTOBUF_PROTOC_EXECUTABLE="%CK_ENV_LIB_PROTOBUF_HOST%\bin\protoc.exe" ^ 97 | -DGFLAGS_INCLUDE_DIR="%CK_ENV_LIB_GFLAGS_INCLUDE%" ^ 98 | -DGFLAGS_LIBRARY_RELEASE="%CK_ENV_LIB_GFLAGS_LIB%\gflags.lib" ^ 99 | -DGFLAGS_LIBRARY_DEBUG="%CK_ENV_LIB_GFLAGS_LIB%\gflags.lib" ^ 100 | -DGLOG_INCLUDE_DIR="%CK_ENV_LIB_GLOG_INCLUDE%" ^ 101 | -DGLOG_LIBRARY_RELEASE="%CK_ENV_LIB_GLOG_LIB%\glog.lib" ^ 102 | -DGLOG_LIBRARY_DEBUG="%CK_ENV_LIB_GLOG_LIB%\glog.lib" ^ 103 | -DLMDB_INCLUDE_DIR="%CK_ENV_LIB_LMDB_INCLUDE%" ^ 104 | -DLMDB_LIBRARIES="%CK_ENV_LIB_LMDB_LIB%\lmdb.lib" ^ 105 | -DOpenCV_DIR="%CK_ENV_LIB_OPENCV%" ^ 106 | -DOpenCV_LIB_PATH="%CK_ENV_LIB_OPENCV_LIB%" 107 | 108 | rem -DUSE_LMDB=%USE_LMDB% ^ 109 | 110 | 111 | rem -DPROTOBUF_DIR="%CK_ENV_LIB_PROTOBUF_HOST%\cmake" ^ 112 | rem -DPROTOBUF_PROTOC_EXECUTABLE="%CK_ENV_LIB_PROTOBUF_HOST%\bin\protoc.exe" ^ 113 | 114 | rem -DOpenBLAS_INCLUDE_DIR="%CK_ENV_LIB_OPENBLAS_INCLUDE%" ^ 115 | rem -DOpenBLAS_LIB="%CK_ENV_LIB_OPENBLAS_LIB%\%CK_ENV_LIB_OPENBLAS_STATIC_NAME%" ^ 116 | 117 | rem -DBLAS=%WHICH_BLAS% ^ 118 | 119 | exit /b 0 120 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cpu-universal/scripts.win/install.bat.arc2: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem 4 | rem Installation script for CK packages. 5 | rem 6 | rem See CK LICENSE.txt for licensing details. 7 | rem See CK Copyright.txt for copyright details. 8 | rem 9 | rem Developer(s): Grigori Fursin, 2017 10 | rem 11 | 12 | rem PACKAGE_DIR 13 | rem INSTALL_DIR 14 | 15 | rem get eigen and protobuf 16 | cd /d %INSTALL_DIR%\src 17 | git submodule update --init -- third_party\eigen 18 | 19 | rem Get protobuf from CK and copy here 20 | if exist "%CK_ENV_LIB_PROTOBUF_HOST_SRC_DIR%" ( 21 | xcopy /s /e /y %CK_ENV_LIB_PROTOBUF_HOST_SRC_DIR%\* third_party\protobuf\ 22 | ) 23 | 24 | if exist "%CK_ENV_LIB_PROTOBUF_HOST%" ( 25 | if not exist "build_host_protoc" ( 26 | mkdir build_host_protoc 27 | ) 28 | xcopy /s /e /y %CK_ENV_LIB_PROTOBUF_HOST%\* build_host_protoc\ 29 | ) 30 | 31 | rem git submodule update --init -- third_party\protobuf 32 | 33 | if "%CAFFE_BUILD_PYTHON%" == "ON" ( 34 | git submodule update --init -- third_party\pybind11 35 | 36 | echo. 37 | echo You are compiling Caffe2 with Python support! 38 | echo To use it you need to set up CK env as following ^(after installation^)^: 39 | echo. 40 | echo "ck xset env tags=lib,caffe2 & call tmp-ck-env.bat & ipython2" 41 | echo. 42 | set /p id="Press enter to continue" 43 | ) 44 | 45 | cd /d %INSTALL_DIR%\obj 46 | 47 | rem echo ************************************************************** 48 | rem echo Building protobuf for Caffe 2 ... 49 | 50 | rem cmake %INSTALL_DIR%\src\third_party\protobuf\cmake ^ 51 | rem -G"%CK_CMAKE_GENERATOR%" ^ 52 | rem -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 53 | rem -DCMAKE_INSTALL_PREFIX=. ^ 54 | rem -Dprotobuf_BUILD_TESTS=OFF ^ 55 | rem -DCMAKE_BUILD_TYPE=Debug 56 | rem 57 | rem msbuild INSTALL.vcxproj 58 | 59 | rem exit /b 1 60 | 61 | echo ************************************************************** 62 | echo Preparing vars for Caffe 2 ... 63 | 64 | set CK_CXX_FLAGS_FOR_CMAKE= 65 | set CK_CXX_FLAGS_ANDROID_TYPICAL= 66 | 67 | set CK_CMAKE_EXTRA=%CK_CMAKE_EXTRA% ^ 68 | -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG% ^ 69 | -DCMAKE_VERBOSE_MAKEFILE=1 ^ 70 | -DBUILD_TEST=OFF ^ 71 | -DBLAS=%WHICH_BLAS% ^ 72 | -DUSE_THREADS=%USE_THREADS% ^ 73 | -DUSE_NERVANA_GPU=%USE_NERVANA_GPU% ^ 74 | -DUSE_GLOG=OFF ^ 75 | -DUSE_GFLAGS=OFF ^ 76 | -DCAFFE2_USE_CUSTOM_PROTOBUF=OFF ^ 77 | -DUSE_LMDB=OFF ^ 78 | -DUSE_LEVELDB=OFF ^ 79 | -DUSE_LITE_PROTO=%USE_LITE_PROTO% ^ 80 | -DUSE_NCCL=%USE_NCCL% ^ 81 | -DUSE_NNPACK=%USE_NNPACK% ^ 82 | -DUSE_OPENCV=OFF ^ 83 | -DUSE_CUDA=%USE_CUDA% ^ 84 | -DUSE_CNMEM=%USE_CNMEM% ^ 85 | -DUSE_ZMQ=%USE_ZMQ% ^ 86 | -DUSE_ROCKSDB=%USE_ROCKSDB% ^ 87 | -DUSE_REDIS=%USE_REDIS% ^ 88 | -DUSE_MPI=%USE_MPI% ^ 89 | -DUSE_GLOO=%USE_GLOO% ^ 90 | -DBUILD_SHARED_LIBS=OFF ^ 91 | -DUSE_OPENMP=%USE_OPENMP% ^ 92 | -DBUILD_PYTHON=%CAFFE_BUILD_PYTHON% ^ 93 | -DBUILD_BINARY=ON ^ 94 | -DBUILD_TEST=%BUILD_TEST% ^ 95 | -DGFLAGS_INCLUDE_DIR="%CK_ENV_LIB_GFLAGS_INCLUDE%" ^ 96 | -DGFLAGS_LIBRARY_RELEASE="%CK_ENV_LIB_GFLAGS_LIB%\gflags.lib" ^ 97 | -DGFLAGS_LIBRARY_DEBUG="%CK_ENV_LIB_GFLAGS_LIB%\gflags.lib" ^ 98 | -DGLOG_INCLUDE_DIR="%CK_ENV_LIB_GLOG_INCLUDE%" ^ 99 | -DGLOG_LIBRARY_RELEASE="%CK_ENV_LIB_GLOG_LIB%\glog.lib" ^ 100 | -DGLOG_LIBRARY_DEBUG="%CK_ENV_LIB_GLOG_LIB%\glog.lib" ^ 101 | -DLMDB_INCLUDE_DIR="%CK_ENV_LIB_LMDB_INCLUDE%" ^ 102 | -DLMDB_LIBRARIES="%CK_ENV_LIB_LMDB_LIB%\lmdb.lib" ^ 103 | -DOpenCV_DIR="%CK_ENV_LIB_OPENCV%" ^ 104 | -DOpenCV_LIB_PATH="%CK_ENV_LIB_OPENCV_LIB%" 105 | 106 | rem -DPROTOBUF_PROTOC_EXECUTABLE="%CK_ENV_LIB_PROTOBUF_HOST%\bin\protoc.exe" ^ 107 | 108 | rem -DUSE_LMDB=%USE_LMDB% ^ 109 | 110 | 111 | rem -DPROTOBUF_DIR="%CK_ENV_LIB_PROTOBUF_HOST%\cmake" ^ 112 | rem -DPROTOBUF_PROTOC_EXECUTABLE="%CK_ENV_LIB_PROTOBUF_HOST%\bin\protoc.exe" ^ 113 | 114 | rem -DOpenBLAS_INCLUDE_DIR="%CK_ENV_LIB_OPENBLAS_INCLUDE%" ^ 115 | rem -DOpenBLAS_LIB="%CK_ENV_LIB_OPENBLAS_LIB%\%CK_ENV_LIB_OPENBLAS_STATIC_NAME%" ^ 116 | 117 | rem -DBLAS=%WHICH_BLAS% ^ 118 | 119 | exit /b 0 120 | -------------------------------------------------------------------------------- /package/caffemodel2-deepscale-squeezenet-1.1/README.md: -------------------------------------------------------------------------------- 1 | 2 | The Caffe-compatible files that you are probably looking for: 3 | 4 | SqueezeNet_v1.0/train_val.prototxt #model architecture 5 | SqueezeNet_v1.0/solver.prototxt #additional training details (learning rate schedule, etc.) 6 | SqueezeNet_v1.0/squeezenet_v1.0.caffemodel #pretrained model parameters 7 | 8 | If you find SqueezeNet useful in your research, please consider citing the [SqueezeNet paper](http://arxiv.org/abs/1602.07360): 9 | 10 | @article{SqueezeNet, 11 | Author = {Forrest N. Iandola and Matthew W. Moskewicz and Khalid Ashraf and Song Han and William J. Dally and Kurt Keutzer}, 12 | Title = {SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and $<$1MB model size}, 13 | Journal = {arXiv:1602.07360}, 14 | Year = {2016} 15 | } 16 | 17 | 18 | Helpful hints: 19 | 20 | 1. **Getting the SqueezeNet model:** `git clone `. 21 | In this repository, we include Caffe-compatible files for the model architecture, the solver configuration, and the pretrained model (4.8MB uncompressed). 22 | 23 | 2. **Batch size.** We have experimented with batch sizes ranging from 32 to 1024. In this repo, our default batch size is 512. If implemented naively on a single GPU, a batch size this large may result in running out of memory. An effective workaround is to use hierarchical batching (sometimes called "delayed batching"). Caffe supports hierarchical batching by doing `train_val.prototxt>batch_size` training samples concurrently in memory. After `solver.prototxt>iter_size` iterations, the gradients are summed and the model is updated. Mathematically, the batch size is `batch_size * iter_size`. In the included prototxt files, we have set `(batch_size=32, iter_size=16)`, but any combination of batch_size and iter_size that multiply to 512 will produce eqivalent results. In fact, with the same random number generator seed, the model will be fully reproducable if trained multiple times. Finally, note that in Caffe `iter_size` is applied while training on the training set but not while testing on the test set. 24 | 25 | 3. **Implementing Fire modules.** In the paper, we describe the `expand` portion of the Fire layer as a collection of 1x1 and 3x3 filters. Caffe does not natively support a convolution layer that has multiple filter sizes. To work around this, we implement `expand1x1` and `expand3x3` layers and concatenate the results together in the channel dimension. 26 | 27 | 4. **The SqueezeNet team has released a few variants of SqueezeNet**. Each of these include pretrained models, and the non-compressed versions include training protocols, too. 28 | 29 | SqueezeNet v1.0 (in this repo), the base model described in our SqueezeNet paper. 30 | 31 | [Compressed SqueezeNet v1.0](https://github.com/songhan/SqueezeNet_compressed), as described in the SqueezeNet paper. 32 | 33 | [SqueezeNet v1.0 with Residual Connections](https://github.com/songhan/SqueezeNet-Residual), which delivers higher accuracy without increasing the model size. 34 | 35 | [SqueezeNet v1.0 with Dense→Sparse→Dense (DSD) Training](https://github.com/songhan/SqueezeNet-DSD-Training), which delivers higher accuracy without increasing the model size. 36 | 37 | SqueezeNet v1.1 (in this repo), which requires 2.4x less computation than SqueezeNet v1.0 without diminshing accuracy. 38 | 39 | 5. **Community adoption of SqueezeNet**: 40 | 41 | [SqueezeNet in the *MXNet* framework](https://github.com/haria/SqueezeNet), by Guo Haria 42 | 43 | [SqueezeNet in the *Chainer* framework](https://github.com/ejlb/squeezenet-chainer), by Eddie Bell 44 | 45 | [SqueezeNet in the *Keras* framework](https://github.com/DT42/squeezenet_demo), by [dt42.io](https://dt42.io/) 46 | 47 | [Neural Art using SqueezeNet](https://github.com/pavelgonchar/neural-art-mini), by Pavel Gonchar 48 | 49 | [SqueezeNet compression in Ristretto](https://arxiv.org/abs/1605.06402), by Philipp Gysel 50 | 51 | 52 | **What's new in SqueezeNet v1.1?** 53 | 54 | | | SqueezeNet v1.0 | SqueezeNet v1.1 | 55 | | :------------- |:-------------:| :-----:| 56 | | conv1: | 96 filters of resolution 7x7 | 64 filters of resolution 3x3 | 57 | | pooling layers: | pool_{1,4,8} | pool_{1,3,5} | 58 | | computation | 1.72 GFLOPS/image | 0.72 GFLOPS/image: *2.4x less computation* | 59 | | ImageNet accuracy | >= 80.3% top-5 | >= 80.3% top-5 | 60 | 61 | 62 | SqueezeNet v1.1 has 2.4x less computation than v1.0, without sacrificing accuracy. 63 | -------------------------------------------------------------------------------- /program/caffe2/classify.py: -------------------------------------------------------------------------------- 1 | # From https://caffe2.ai/docs/tutorial-loading-pre-trained-models.html 2 | 3 | def crop_center(img,cropx,cropy): 4 | y,x,c = img.shape 5 | startx = x//2-(cropx//2) 6 | starty = y//2-(cropy//2) 7 | return img[starty:starty+cropy,startx:startx+cropx] 8 | 9 | def rescale(img, input_height, input_width): 10 | print("Original image shape:" + str(img.shape) + " and remember it should be in H, W, C!") 11 | print("Model's input shape is %dx%d") % (input_height, input_width) 12 | aspect = img.shape[1]/float(img.shape[0]) 13 | print("Orginal aspect ratio: " + str(aspect)) 14 | if(aspect>1): 15 | # landscape orientation - wide image 16 | res = int(aspect * input_height) 17 | imgScaled = skimage.transform.resize(img, (input_width, res)) 18 | if(aspect<1): 19 | # portrait orientation - tall image 20 | res = int(input_width/aspect) 21 | imgScaled = skimage.transform.resize(img, (res, input_height)) 22 | if(aspect == 1): 23 | imgScaled = skimage.transform.resize(img, (input_width, input_height)) 24 | # pyplot.figure() 25 | # pyplot.imshow(imgScaled) 26 | # pyplot.axis('on') 27 | # pyplot.title('Rescaled image') 28 | print("New image shape:" + str(imgScaled.shape) + " in HWC") 29 | return imgScaled 30 | 31 | import sys 32 | from caffe2.proto import caffe2_pb2 33 | import numpy as np 34 | import skimage.io 35 | import skimage.transform 36 | from matplotlib import pyplot 37 | import os 38 | from caffe2.python import core, workspace 39 | import urllib2 40 | import json 41 | 42 | #import matplotlib 43 | #matplotlib.use('Agg') 44 | 45 | IMAGE_LOCATION = sys.argv[4] 46 | 47 | # set paths and variables from model choice and prep image 48 | mean = 128 49 | 50 | # some models were trained with different image sizes, this helps you calibrate your image 51 | INPUT_IMAGE_SIZE = 227 52 | 53 | # make sure all of the files are around... 54 | INIT_NET = sys.argv[1] 55 | PREDICT_NET = sys.argv[2] 56 | 57 | # load and transform image 58 | img = skimage.img_as_float(skimage.io.imread(IMAGE_LOCATION)).astype(np.float32) 59 | img = rescale(img, INPUT_IMAGE_SIZE, INPUT_IMAGE_SIZE) 60 | img = crop_center(img, INPUT_IMAGE_SIZE, INPUT_IMAGE_SIZE) 61 | print ("After crop: " , img.shape) 62 | #pyplot.figure() 63 | #pyplot.imshow(img) 64 | #pyplot.axis('on') 65 | #pyplot.title('Cropped') 66 | 67 | # switch to CHW 68 | img = img.swapaxes(1, 2).swapaxes(0, 1) 69 | #pyplot.figure() 70 | #for i in range(3): 71 | # # For some reason, pyplot subplot follows Matlab's indexing 72 | # # convention (starting with 1). Well, we'll just follow it... 73 | # pyplot.subplot(1, 3, i+1) 74 | # pyplot.imshow(img[i]) 75 | # pyplot.axis('off') 76 | # pyplot.title('RGB channel %d' % (i+1)) 77 | 78 | # switch to BGR 79 | img = img[(2, 1, 0), :, :] 80 | 81 | # remove mean for better results 82 | img = img * 255 - mean 83 | 84 | # add batch size 85 | img = img[np.newaxis, :, :, :].astype(np.float32) 86 | print ("NCHW: ", img.shape) 87 | 88 | # initialize the neural net 89 | 90 | with open(INIT_NET, 'rb') as f: 91 | init_net = f.read() 92 | with open(PREDICT_NET, 'rb') as f: 93 | predict_net = f.read() 94 | 95 | p = workspace.Predictor(init_net, predict_net) 96 | 97 | # run the net and return prediction 98 | results = p.run([img]) 99 | 100 | # turn it into something we can play with and examine which is in a multi-dimensional array 101 | results = np.asarray(results) 102 | print ("results shape: ", results.shape) 103 | 104 | results = np.delete(results, 1) 105 | index = 0 106 | highest = 0 107 | arr = np.empty((0,2), dtype=object) 108 | arr[:,0] = int(10) 109 | arr[:,1:] = float(10) 110 | 111 | for i, r in enumerate(results): 112 | # imagenet index begins with 1! 113 | i=i+1 114 | arr = np.append(arr, np.array([[i,r]]), axis=0) 115 | if (r > highest): 116 | highest = r 117 | index = i 118 | 119 | print (index, " :: ", highest) 120 | 121 | # lookup the code and return the result 122 | # top 3 results 123 | # sorted(arr, key=lambda x: x[1], reverse=True)[:3] 124 | 125 | # now we can grab the code list 126 | codes=sys.argv[3] 127 | 128 | with open(codes) as f: 129 | response = f.read() 130 | 131 | #response = json.loads(response1) 132 | 133 | #codes = "https://gist.githubusercontent.com/aaronmarkham/cd3a6b6ac071eca6f7b4a6e40e6038aa/raw/9edb4038a37da6b5a44c3b5bc52e448ff09bfe5b/alexnet_codes" 134 | #response = urllib2.urlopen(codes) 135 | 136 | # and lookup our result from the list 137 | 138 | print("") 139 | print("---------- Prediction for "+IMAGE_LOCATION+" ----------") 140 | for line in response.split('\n'): 141 | code, result = line.partition(":")[::2] 142 | if (code.strip() == str(index)): 143 | print(str(highest) + ' - "'+result.strip()[1:-2]+'"') 144 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cpu-universal/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "check_exit_status": "yes", 3 | "customize": { 4 | "extra_dir": "", 5 | "git_src_dir": "src", 6 | "install_env": { 7 | "BUILD_BINARY": "ON", 8 | "BUILD_SHARED_LIBS": "ON", 9 | "BUILD_TEST": "OFF", 10 | "CAFFE_BUILD_PYTHON": "ON", 11 | "CMAKE_CONFIG": "Release", 12 | "PACKAGE_BUILD_TYPE": "cmake", 13 | "PACKAGE_CONFIGURE_FLAGS": "", 14 | "PACKAGE_CONFIGURE_FLAGS_ANDROID": "-DBUILD_python=OFF -DBUILD_docs=OFF -DUSE_HDF5=OFF", 15 | "PACKAGE_CONFIGURE_FLAGS_LINUX": "", 16 | "PACKAGE_CONFIGURE_FLAGS_WINDOWS": "", 17 | "PACKAGE_COPY": "NO", 18 | "PACKAGE_GIT": "YES", 19 | "PACKAGE_GIT_CLONE_FLAGS": "--recursive", 20 | "PACKAGE_PATCH": "YES", 21 | "PACKAGE_SKIP_BUILD_ERROR": "YES", 22 | "PACKAGE_SKIP_CLEAN_INSTALL": "NO", 23 | "PACKAGE_SKIP_CLEAN_OBJ": "NO", 24 | "PACKAGE_SKIP_CLEAN_SRC_DIR": "NO", 25 | "PACKAGE_SUB_DIR": "src", 26 | "PACKAGE_SUB_DIR1": "src", 27 | "PACKAGE_URL": "https://github.com/caffe2/caffe2", 28 | "PYTHON_EXE": "python", 29 | "USE_CNMEM": "OFF", 30 | "USE_CUB": "OFF", 31 | "USE_CUDA": "OFF", 32 | "USE_GFLAGS": "ON", 33 | "USE_GLOG": "ON", 34 | "USE_GLOO": "OFF", 35 | "USE_LEVELDB": "ON", 36 | "USE_LITE_PROTO": "OFF", 37 | "USE_LMDB": "ON", 38 | "USE_MPI": "OFF", 39 | "USE_NCCL": "OFF", 40 | "USE_NERVANA_GPU": "OFF", 41 | "USE_NNPACK": "OFF", 42 | "USE_OPENCV": "ON", 43 | "USE_OPENMP": "ON", 44 | "USE_REDIS": "OFF", 45 | "USE_ROCKSDB": "OFF", 46 | "USE_THREADS": "ON", 47 | "USE_ZMQ": "OFF", 48 | "WHICH_BLAS": "Eigen" 49 | }, 50 | "use_git_revision": "yes", 51 | "version": "master" 52 | }, 53 | "deps": { 54 | "cmake": { 55 | "force_target_as_host": "yes", 56 | "local": "yes", 57 | "name": "cmake", 58 | "skip_from_bat": "yes", 59 | "sort": 5, 60 | "tags": "tool,cmake" 61 | }, 62 | "compiler": { 63 | "local": "yes", 64 | "name": "C++ compiler", 65 | "sort": 10, 66 | "tags": "compiler,lang-cpp", 67 | "update_tags_by_target_platform2": { 68 | "android": "gcc", 69 | "linux": "gcc", 70 | "win": "mcl" 71 | } 72 | }, 73 | "lib-gflags": { 74 | "force_env_init": "yes", 75 | "local": "yes", 76 | "name": "GFlags library", 77 | "only_for_target_os_tags": [ 78 | "linux" 79 | ], 80 | "skip_default": "yes", 81 | "sort": 12, 82 | "tags": "lib,gflags,v2.2.0" 83 | }, 84 | "lib-glog": { 85 | "local": "yes", 86 | "name": "GLog library", 87 | "only_for_target_os_tags": [ 88 | "linux" 89 | ], 90 | "skip_default": "yes", 91 | "sort": 14, 92 | "tags": "lib,glog,v0.3.5" 93 | }, 94 | "lib-lmdb": { 95 | "local": "yes", 96 | "name": "LMDB library", 97 | "only_for_target_os_tags": [ 98 | "linux" 99 | ], 100 | "skip_default": "yes", 101 | "sort": 18, 102 | "tags": "lib,lmdb,v0.9.21" 103 | }, 104 | "lib-opencv": { 105 | "local": "yes", 106 | "name": "OpenCV library", 107 | "only_for_target_os_tags": [ 108 | "linux" 109 | ], 110 | "skip_default": "yes", 111 | "sort": 20, 112 | "tags": "lib,opencv,v3.3.0" 113 | }, 114 | "lib-protobuf-host": { 115 | "force_target_as_host": "yes", 116 | "local": "yes", 117 | "name": "ProtoBuf host compiler", 118 | "only_for_target_os_tags": [ 119 | "linux" 120 | ], 121 | "skip_default": "yes", 122 | "sort": 115, 123 | "tags": "lib,protobuf-host,v3.2.0" 124 | }, 125 | "python": { 126 | "force_target_as_host": "yes", 127 | "local": "yes", 128 | "name": "python", 129 | "sort": 0, 130 | "tags": "compiler,python" 131 | } 132 | }, 133 | "end_full_path": { 134 | "android": "install/lib/libcaffe2.so", 135 | "linux": "install/lib/libcaffe2.so", 136 | "win": "install/lib/caffe2.lib" 137 | }, 138 | "need_cpu_info": "yes", 139 | "only_for_host_os_tags": [ 140 | "linux", 141 | "windows" 142 | ], 143 | "only_for_target_os_tags": [ 144 | "linux", 145 | "windows", 146 | "android" 147 | ], 148 | "package_extra_name": " (eigen, cpu)", 149 | "process_script": "install", 150 | "soft_uoa": "54c5b933f17fb81c", 151 | "suggested_path": "lib-caffe2-master-eigen-cpu", 152 | "tags": [ 153 | "lib", 154 | "facebook", 155 | "caffe2", 156 | "vmaster", 157 | "vcpu" 158 | ], 159 | "use_preprocess_scripts_from_another_entry": { 160 | "data_uoa": "fd44428fbc77f77f", 161 | "module_uoa": "84e27ad9dd12e734" 162 | }, 163 | "use_scripts_from_another_entry": { 164 | "data_uoa": "cd9ccc74060b3d18", 165 | "module_uoa": "script" 166 | } 167 | } 168 | -------------------------------------------------------------------------------- /package/caffemodel2-bvlc-alexnet/deploy.prototxt: -------------------------------------------------------------------------------- 1 | name: "AlexNet" 2 | input: "data" 3 | input_shape: { 4 | dim: $#batch_size#$ 5 | dim: 3 6 | dim: 227 7 | dim: 227 8 | } 9 | layer { 10 | name: "conv1" 11 | type: "Convolution" 12 | bottom: "data" 13 | top: "conv1" 14 | param { 15 | lr_mult: 1 16 | decay_mult: 1 17 | } 18 | param { 19 | lr_mult: 2 20 | decay_mult: 0 21 | } 22 | convolution_param { 23 | num_output: 96 24 | kernel_size: 11 25 | stride: 4 26 | } 27 | } 28 | layer { 29 | name: "relu1" 30 | type: "ReLU" 31 | bottom: "conv1" 32 | top: "conv1" 33 | } 34 | layer { 35 | name: "norm1" 36 | type: "LRN" 37 | bottom: "conv1" 38 | top: "norm1" 39 | lrn_param { 40 | local_size: 5 41 | alpha: 0.0001 42 | beta: 0.75 43 | } 44 | } 45 | layer { 46 | name: "pool1" 47 | type: "Pooling" 48 | bottom: "norm1" 49 | top: "pool1" 50 | pooling_param { 51 | pool: MAX 52 | kernel_size: 3 53 | stride: 2 54 | } 55 | } 56 | layer { 57 | name: "conv2" 58 | type: "Convolution" 59 | bottom: "pool1" 60 | top: "conv2" 61 | param { 62 | lr_mult: 1 63 | decay_mult: 1 64 | } 65 | param { 66 | lr_mult: 2 67 | decay_mult: 0 68 | } 69 | convolution_param { 70 | num_output: 256 71 | pad: 2 72 | kernel_size: 5 73 | group: 2 74 | } 75 | } 76 | layer { 77 | name: "relu2" 78 | type: "ReLU" 79 | bottom: "conv2" 80 | top: "conv2" 81 | } 82 | layer { 83 | name: "norm2" 84 | type: "LRN" 85 | bottom: "conv2" 86 | top: "norm2" 87 | lrn_param { 88 | local_size: 5 89 | alpha: 0.0001 90 | beta: 0.75 91 | } 92 | } 93 | layer { 94 | name: "pool2" 95 | type: "Pooling" 96 | bottom: "norm2" 97 | top: "pool2" 98 | pooling_param { 99 | pool: MAX 100 | kernel_size: 3 101 | stride: 2 102 | } 103 | } 104 | layer { 105 | name: "conv3" 106 | type: "Convolution" 107 | bottom: "pool2" 108 | top: "conv3" 109 | param { 110 | lr_mult: 1 111 | decay_mult: 1 112 | } 113 | param { 114 | lr_mult: 2 115 | decay_mult: 0 116 | } 117 | convolution_param { 118 | num_output: 384 119 | pad: 1 120 | kernel_size: 3 121 | } 122 | } 123 | layer { 124 | name: "relu3" 125 | type: "ReLU" 126 | bottom: "conv3" 127 | top: "conv3" 128 | } 129 | layer { 130 | name: "conv4" 131 | type: "Convolution" 132 | bottom: "conv3" 133 | top: "conv4" 134 | param { 135 | lr_mult: 1 136 | decay_mult: 1 137 | } 138 | param { 139 | lr_mult: 2 140 | decay_mult: 0 141 | } 142 | convolution_param { 143 | num_output: 384 144 | pad: 1 145 | kernel_size: 3 146 | group: 2 147 | } 148 | } 149 | layer { 150 | name: "relu4" 151 | type: "ReLU" 152 | bottom: "conv4" 153 | top: "conv4" 154 | } 155 | layer { 156 | name: "conv5" 157 | type: "Convolution" 158 | bottom: "conv4" 159 | top: "conv5" 160 | param { 161 | lr_mult: 1 162 | decay_mult: 1 163 | } 164 | param { 165 | lr_mult: 2 166 | decay_mult: 0 167 | } 168 | convolution_param { 169 | num_output: 256 170 | pad: 1 171 | kernel_size: 3 172 | group: 2 173 | } 174 | } 175 | layer { 176 | name: "relu5" 177 | type: "ReLU" 178 | bottom: "conv5" 179 | top: "conv5" 180 | } 181 | layer { 182 | name: "pool5" 183 | type: "Pooling" 184 | bottom: "conv5" 185 | top: "pool5" 186 | pooling_param { 187 | pool: MAX 188 | kernel_size: 3 189 | stride: 2 190 | } 191 | } 192 | layer { 193 | name: "fc6" 194 | type: "InnerProduct" 195 | bottom: "pool5" 196 | top: "fc6" 197 | param { 198 | lr_mult: 1 199 | decay_mult: 1 200 | } 201 | param { 202 | lr_mult: 2 203 | decay_mult: 0 204 | } 205 | inner_product_param { 206 | num_output: 4096 207 | } 208 | } 209 | layer { 210 | name: "relu6" 211 | type: "ReLU" 212 | bottom: "fc6" 213 | top: "fc6" 214 | } 215 | layer { 216 | name: "drop6" 217 | type: "Dropout" 218 | bottom: "fc6" 219 | top: "fc6" 220 | dropout_param { 221 | dropout_ratio: 0.5 222 | } 223 | } 224 | layer { 225 | name: "fc7" 226 | type: "InnerProduct" 227 | bottom: "fc6" 228 | top: "fc7" 229 | param { 230 | lr_mult: 1 231 | decay_mult: 1 232 | } 233 | param { 234 | lr_mult: 2 235 | decay_mult: 0 236 | } 237 | inner_product_param { 238 | num_output: 4096 239 | } 240 | } 241 | layer { 242 | name: "relu7" 243 | type: "ReLU" 244 | bottom: "fc7" 245 | top: "fc7" 246 | } 247 | layer { 248 | name: "drop7" 249 | type: "Dropout" 250 | bottom: "fc7" 251 | top: "fc7" 252 | dropout_param { 253 | dropout_ratio: 0.5 254 | } 255 | } 256 | layer { 257 | name: "fc8" 258 | type: "InnerProduct" 259 | bottom: "fc7" 260 | top: "fc8" 261 | param { 262 | lr_mult: 1 263 | decay_mult: 1 264 | } 265 | param { 266 | lr_mult: 2 267 | decay_mult: 0 268 | } 269 | inner_product_param { 270 | num_output: 1000 271 | } 272 | } 273 | layer { 274 | name: "prob" 275 | type: "Softmax" 276 | bottom: "fc8" 277 | top: "prob" 278 | } 279 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cpu-universal/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "check_exit_status": "yes", 3 | "customize": { 4 | "extra_dir": "", 5 | "git_src_dir": "src", 6 | "install_env": { 7 | "BUILD_BINARY": "ON", 8 | "BUILD_SHARED_LIBS": "ON", 9 | "BUILD_TEST": "OFF", 10 | "CAFFE_BUILD_PYTHON": "ON", 11 | "CMAKE_CONFIG": "Release", 12 | "PACKAGE_BUILD_TYPE": "cmake", 13 | "PACKAGE_CONFIGURE_FLAGS": "", 14 | "PACKAGE_CONFIGURE_FLAGS_ANDROID": "-DBUILD_python=OFF -DBUILD_docs=OFF -DUSE_HDF5=OFF", 15 | "PACKAGE_CONFIGURE_FLAGS_LINUX": "", 16 | "PACKAGE_CONFIGURE_FLAGS_WINDOWS": "", 17 | "PACKAGE_COPY": "NO", 18 | "PACKAGE_GIT": "YES", 19 | "PACKAGE_GIT_CHECKOUT": "v0.8.1", 20 | "PACKAGE_GIT_CLONE_FLAGS": "--recursive", 21 | "PACKAGE_PATCH": "YES", 22 | "PACKAGE_SKIP_BUILD_ERROR": "YES", 23 | "PACKAGE_SKIP_CLEAN_INSTALL": "NO", 24 | "PACKAGE_SKIP_CLEAN_OBJ": "NO", 25 | "PACKAGE_SKIP_CLEAN_SRC_DIR": "NO", 26 | "PACKAGE_SUB_DIR": "src", 27 | "PACKAGE_SUB_DIR1": "src", 28 | "PACKAGE_URL": "https://github.com/caffe2/caffe2", 29 | "PYTHON_EXE": "python", 30 | "USE_CNMEM": "OFF", 31 | "USE_CUDA": "OFF", 32 | "USE_GFLAGS": "ON", 33 | "USE_GLOG": "ON", 34 | "USE_GLOO": "OFF", 35 | "USE_LEVELDB": "ON", 36 | "USE_LITE_PROTO": "OFF", 37 | "USE_LMDB": "ON", 38 | "USE_MPI": "OFF", 39 | "USE_NCCL": "OFF", 40 | "USE_NERVANA_GPU": "OFF", 41 | "USE_NNPACK": "OFF", 42 | "USE_OPENCV": "ON", 43 | "USE_OPENMP": "ON", 44 | "USE_REDIS": "OFF", 45 | "USE_ROCKSDB": "OFF", 46 | "USE_THREADS": "ON", 47 | "USE_ZMQ": "OFF", 48 | "WHICH_BLAS": "Eigen" 49 | }, 50 | "sort": 10000, 51 | "use_git_revision": "yes", 52 | "version": "0.8.1" 53 | }, 54 | "deps": { 55 | "cmake": { 56 | "force_target_as_host": "yes", 57 | "local": "yes", 58 | "name": "cmake", 59 | "skip_from_bat": "yes", 60 | "sort": 5, 61 | "tags": "tool,cmake" 62 | }, 63 | "compiler": { 64 | "local": "yes", 65 | "name": "C++ compiler", 66 | "sort": 10, 67 | "tags": "compiler,lang-cpp", 68 | "update_tags_by_target_platform2": { 69 | "android": "gcc", 70 | "linux": "gcc", 71 | "win": "mcl" 72 | } 73 | }, 74 | "lib-gflags": { 75 | "force_env_init": "yes", 76 | "local": "yes", 77 | "name": "GFlags library", 78 | "only_for_target_os_tags": [ 79 | "linux" 80 | ], 81 | "skip_default": "yes", 82 | "sort": 12, 83 | "tags": "lib,gflags,v2.2.0" 84 | }, 85 | "lib-glog": { 86 | "local": "yes", 87 | "name": "GLog library", 88 | "only_for_target_os_tags": [ 89 | "linux" 90 | ], 91 | "skip_default": "yes", 92 | "sort": 14, 93 | "tags": "lib,glog,v0.3.5" 94 | }, 95 | "lib-lmdb": { 96 | "local": "yes", 97 | "name": "LMDB library", 98 | "only_for_target_os_tags": [ 99 | "linux" 100 | ], 101 | "skip_default": "yes", 102 | "sort": 18, 103 | "tags": "lib,lmdb,v0.9.21" 104 | }, 105 | "lib-opencv": { 106 | "local": "yes", 107 | "name": "OpenCV library", 108 | "only_for_target_os_tags": [ 109 | "linux" 110 | ], 111 | "skip_default": "yes", 112 | "sort": 20, 113 | "tags": "lib,opencv,v3.3.0" 114 | }, 115 | "lib-protobuf-host": { 116 | "force_target_as_host": "yes", 117 | "local": "yes", 118 | "name": "ProtoBuf host compiler", 119 | "skip_default": "yes", 120 | "sort": 115, 121 | "tags": "lib,protobuf-host,v3.2.0" 122 | }, 123 | "python": { 124 | "force_target_as_host": "yes", 125 | "local": "yes", 126 | "name": "python", 127 | "sort": 0, 128 | "tags": "compiler,python", 129 | "version_to": [ 130 | 2, 131 | 8, 132 | 0 133 | ] 134 | } 135 | }, 136 | "end_full_path": { 137 | "android": "install/lib/libCaffe2_CPU.so", 138 | "linux": "install/lib/libCaffe2_CPU.so", 139 | "win": "install/lib/Caffe2_CPU.lib" 140 | }, 141 | "need_cpu_info": "yes", 142 | "only_for_host_os_tags": [ 143 | "linux", 144 | "windows" 145 | ], 146 | "only_for_target_os_tags": [ 147 | "linux", 148 | "windows" 149 | ], 150 | "package_extra_name": " (eigen, cpu)", 151 | "process_script": "install", 152 | "soft_uoa": "54c5b933f17fb81c", 153 | "suggested_path": "lib-caffe2-master-eigen-cpu", 154 | "tags": [ 155 | "lib", 156 | "facebook", 157 | "caffe2", 158 | "v0.8.1", 159 | "v0.8", 160 | "v0", 161 | "vcpu", 162 | "channel-stable" 163 | ], 164 | "use_preprocess_scripts_from_another_entry": { 165 | "data_uoa": "fd44428fbc77f77f", 166 | "module_uoa": "84e27ad9dd12e734" 167 | }, 168 | "use_scripts_from_another_entry": { 169 | "data_uoa": "cd9ccc74060b3d18", 170 | "module_uoa": "script" 171 | } 172 | } 173 | -------------------------------------------------------------------------------- /package/lib-caffe2-0.8.1-eigen-cuda-universal/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "check_exit_status": "yes", 3 | "customize": { 4 | "extra_dir": "", 5 | "git_src_dir": "src", 6 | "install_env": { 7 | "BUILD_BINARY": "ON", 8 | "BUILD_SHARED_LIBS": "ON", 9 | "BUILD_TEST": "OFF", 10 | "CAFFE_BUILD_PYTHON": "ON", 11 | "CMAKE_CONFIG": "Release", 12 | "PACKAGE_BUILD_TYPE": "cmake", 13 | "PACKAGE_CONFIGURE_FLAGS": "", 14 | "PACKAGE_CONFIGURE_FLAGS_ANDROID": "-DBUILD_python=OFF -DBUILD_docs=OFF -DUSE_HDF5=OFF", 15 | "PACKAGE_CONFIGURE_FLAGS_LINUX": "", 16 | "PACKAGE_CONFIGURE_FLAGS_WINDOWS": "", 17 | "PACKAGE_COPY": "NO", 18 | "PACKAGE_GIT": "YES", 19 | "PACKAGE_GIT_CHECKOUT": "v0.8.1", 20 | "PACKAGE_GIT_CLONE_FLAGS": "--recursive", 21 | "PACKAGE_PATCH": "YES", 22 | "PACKAGE_SKIP_BUILD_ERROR": "YES", 23 | "PACKAGE_SKIP_CLEAN_INSTALL": "NO", 24 | "PACKAGE_SKIP_CLEAN_OBJ": "NO", 25 | "PACKAGE_SKIP_CLEAN_SRC_DIR": "NO", 26 | "PACKAGE_SUB_DIR": "src", 27 | "PACKAGE_SUB_DIR1": "src", 28 | "PACKAGE_URL": "https://github.com/caffe2/caffe2", 29 | "PYTHON_EXE": "python", 30 | "USE_CNMEM": "OFF", 31 | "USE_CUDA": "ON", 32 | "USE_GFLAGS": "ON", 33 | "USE_GLOG": "ON", 34 | "USE_GLOO": "OFF", 35 | "USE_LEVELDB": "ON", 36 | "USE_LITE_PROTO": "OFF", 37 | "USE_LMDB": "ON", 38 | "USE_MPI": "OFF", 39 | "USE_NCCL": "OFF", 40 | "USE_NERVANA_GPU": "OFF", 41 | "USE_NNPACK": "OFF", 42 | "USE_OPENCV": "ON", 43 | "USE_OPENMP": "ON", 44 | "USE_REDIS": "OFF", 45 | "USE_ROCKSDB": "OFF", 46 | "USE_THREADS": "ON", 47 | "USE_ZMQ": "OFF", 48 | "WHICH_BLAS": "Eigen" 49 | }, 50 | "sort": 10000, 51 | "use_git_revision": "yes", 52 | "version": "0.8.1" 53 | }, 54 | "deps": { 55 | "cmake": { 56 | "force_target_as_host": "yes", 57 | "local": "yes", 58 | "name": "cmake", 59 | "skip_from_bat": "yes", 60 | "sort": 5, 61 | "tags": "tool,cmake" 62 | }, 63 | "compiler": { 64 | "local": "yes", 65 | "name": "C++ compiler", 66 | "sort": 10, 67 | "tags": "compiler,lang-cpp", 68 | "update_tags_by_target_platform2": { 69 | "android": "gcc", 70 | "linux": "gcc", 71 | "win": "mcl" 72 | } 73 | }, 74 | "compiler-cuda": { 75 | "local": "yes", 76 | "name": "CUDA compiler", 77 | "sort": 11, 78 | "tags": "compiler,lang-c-cuda", 79 | "version_from": [ 80 | 7, 81 | 0, 82 | 0 83 | ] 84 | }, 85 | "lib-gflags": { 86 | "force_env_init": "yes", 87 | "local": "yes", 88 | "name": "GFlags library", 89 | "only_for_target_os_tags": [ 90 | "linux" 91 | ], 92 | "skip_default": "yes", 93 | "sort": 12, 94 | "tags": "lib,gflags,v2.2.0" 95 | }, 96 | "lib-glog": { 97 | "local": "yes", 98 | "name": "GLog library", 99 | "only_for_target_os_tags": [ 100 | "linux" 101 | ], 102 | "skip_default": "yes", 103 | "sort": 14, 104 | "tags": "lib,glog,v0.3.5" 105 | }, 106 | "lib-lmdb": { 107 | "local": "yes", 108 | "name": "LMDB library", 109 | "only_for_target_os_tags": [ 110 | "linux" 111 | ], 112 | "skip_default": "yes", 113 | "sort": 18, 114 | "tags": "lib,lmdb,v0.9.21" 115 | }, 116 | "lib-opencv": { 117 | "local": "yes", 118 | "name": "OpenCV library", 119 | "only_for_target_os_tags": [ 120 | "linux" 121 | ], 122 | "skip_default": "yes", 123 | "sort": 20, 124 | "tags": "lib,opencv,v3.3.0" 125 | }, 126 | "lib-protobuf-host": { 127 | "force_target_as_host": "yes", 128 | "local": "yes", 129 | "name": "ProtoBuf host compiler", 130 | "skip_default": "yes", 131 | "sort": 115, 132 | "tags": "lib,protobuf-host,v3.2.0" 133 | }, 134 | "python": { 135 | "force_target_as_host": "yes", 136 | "local": "yes", 137 | "name": "python", 138 | "sort": 0, 139 | "tags": "compiler,python", 140 | "version_to": [ 141 | 2, 142 | 8, 143 | 0 144 | ] 145 | } 146 | }, 147 | "end_full_path": { 148 | "linux": "install/lib/libCaffe2_GPU.so", 149 | "win": "install/lib/caffe2_gpu.lib" 150 | }, 151 | "need_cpu_info": "yes", 152 | "only_for_target_os_tags": [ 153 | "linux", 154 | "windows" 155 | ], 156 | "package_extra_name": " (eigen, cuda)", 157 | "process_script": "install", 158 | "soft_uoa": "54c5b933f17fb81c", 159 | "suggested_path": "lib-caffe2-master-eigen-cuda", 160 | "tags": [ 161 | "lib", 162 | "facebook", 163 | "caffe2", 164 | "v0.8.1", 165 | "v0.8", 166 | "v0", 167 | "vcuda", 168 | "channel-stable" 169 | ], 170 | "use_preprocess_scripts_from_another_entry": { 171 | "data_uoa": "fd44428fbc77f77f", 172 | "module_uoa": "84e27ad9dd12e734" 173 | }, 174 | "use_scripts_from_another_entry": { 175 | "data_uoa": "cd9ccc74060b3d18", 176 | "module_uoa": "script" 177 | } 178 | } 179 | -------------------------------------------------------------------------------- /package/lib-caffe2-master-eigen-cuda-universal/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "check_exit_status": "yes", 3 | "comment": "works on Linux but has issues on Windows", 4 | "customize": { 5 | "extra_dir": "", 6 | "git_src_dir": "src", 7 | "install_env": { 8 | "BUILD_BINARY": "ON", 9 | "BUILD_SHARED_LIBS": "ON", 10 | "BUILD_TEST": "OFF", 11 | "CAFFE_BUILD_PYTHON": "ON", 12 | "CMAKE_CONFIG": "Release", 13 | "PACKAGE_BUILD_TYPE": "cmake", 14 | "PACKAGE_CONFIGURE_FLAGS": "", 15 | "PACKAGE_CONFIGURE_FLAGS_ANDROID": "-DBUILD_python=OFF -DBUILD_docs=OFF -DUSE_HDF5=OFF", 16 | "PACKAGE_CONFIGURE_FLAGS_LINUX": "", 17 | "PACKAGE_CONFIGURE_FLAGS_WINDOWS": "", 18 | "PACKAGE_COPY": "NO", 19 | "PACKAGE_GIT": "YES", 20 | "PACKAGE_GIT_CLONE_FLAGS": "--recursive", 21 | "PACKAGE_PATCH": "NO", 22 | "PACKAGE_SKIP_BUILD_ERROR": "YES", 23 | "PACKAGE_SKIP_CLEAN_INSTALL": "NO", 24 | "PACKAGE_SKIP_CLEAN_OBJ": "NO", 25 | "PACKAGE_SKIP_CLEAN_SRC_DIR": "NO", 26 | "PACKAGE_SUB_DIR": "src", 27 | "PACKAGE_SUB_DIR1": "src", 28 | "PACKAGE_URL": "https://github.com/caffe2/caffe2", 29 | "PYTHON_EXE": "python", 30 | "USE_CNMEM": "OFF", 31 | "USE_CUDA": "ON", 32 | "USE_GFLAGS": "ON", 33 | "USE_GLOG": "ON", 34 | "USE_GLOO": "OFF", 35 | "USE_LEVELDB": "ON", 36 | "USE_LITE_PROTO": "OFF", 37 | "USE_LMDB": "ON", 38 | "USE_MPI": "OFF", 39 | "USE_NCCL": "OFF", 40 | "USE_NERVANA_GPU": "OFF", 41 | "USE_NNPACK": "OFF", 42 | "USE_OPENCV": "ON", 43 | "USE_OPENMP": "ON", 44 | "USE_REDIS": "OFF", 45 | "USE_ROCKSDB": "OFF", 46 | "USE_THREADS": "ON", 47 | "USE_ZMQ": "OFF", 48 | "WHICH_BLAS": "Eigen" 49 | }, 50 | "use_git_revision": "yes", 51 | "version": "trunk" 52 | }, 53 | "deps": { 54 | "cmake": { 55 | "force_target_as_host": "yes", 56 | "local": "yes", 57 | "name": "cmake", 58 | "skip_from_bat": "yes", 59 | "sort": 5, 60 | "tags": "tool,cmake" 61 | }, 62 | "compiler": { 63 | "local": "yes", 64 | "name": "C++ compiler", 65 | "sort": 10, 66 | "tags": "compiler,lang-cpp", 67 | "update_tags_by_target_platform2": { 68 | "android": "gcc", 69 | "linux": "gcc", 70 | "win": "mcl" 71 | } 72 | }, 73 | "compiler-cuda": { 74 | "local": "yes", 75 | "name": "CUDA compiler >=7.0", 76 | "sort": 11, 77 | "tags": "compiler,lang-c-cuda", 78 | "version_from": [ 79 | 7, 80 | 0, 81 | 0 82 | ] 83 | }, 84 | "lib-gflags": { 85 | "force_env_init": "yes", 86 | "local": "yes", 87 | "name": "GFlags library", 88 | "only_for_target_os_tags": [ 89 | "linux" 90 | ], 91 | "skip_installed": { 92 | "android": "yes", 93 | "win": "yes" 94 | }, 95 | "sort": 12, 96 | "tags": "lib,gflags", 97 | "update_tags_by_target_platform2": { 98 | "android": "v2.2.0", 99 | "win": "" 100 | } 101 | }, 102 | "lib-glog": { 103 | "local": "yes", 104 | "name": "GLog library", 105 | "only_for_target_os_tags": [ 106 | "linux" 107 | ], 108 | "skip_installed": { 109 | "android": "yes", 110 | "win": "yes" 111 | }, 112 | "sort": 14, 113 | "tags": "lib,glog" 114 | }, 115 | "lib-lmdb": { 116 | "local": "yes", 117 | "name": "LMDB library", 118 | "only_for_target_os_tags": [ 119 | "linux" 120 | ], 121 | "sort": 18, 122 | "tags": "lib,lmdb" 123 | }, 124 | "lib-opencv": { 125 | "local": "yes", 126 | "name": "OpenCV library", 127 | "only_for_target_os_tags": [ 128 | "linux" 129 | ], 130 | "skip_installed": { 131 | "android": "yes", 132 | "win": "yes" 133 | }, 134 | "sort": 20, 135 | "tags": "lib,opencv" 136 | }, 137 | "lib-protobuf-host": { 138 | "force_target_as_host": "yes", 139 | "local": "yes", 140 | "name": "ProtoBuf host compiler", 141 | "only_for_target_os_tags": [ 142 | "linux" 143 | ], 144 | "skip_installed": { 145 | "android": "yes", 146 | "win": "yes" 147 | }, 148 | "sort": 115, 149 | "tags": "lib,protobuf-host,v3.2.0" 150 | }, 151 | "python": { 152 | "force_target_as_host": "yes", 153 | "local": "yes", 154 | "name": "python", 155 | "sort": 0, 156 | "tags": "compiler,python", 157 | "version_to": [ 158 | 2, 159 | 8, 160 | 0 161 | ] 162 | } 163 | }, 164 | "end_full_path": { 165 | "linux": "install/lib/libcaffe2_gpu.so", 166 | "win": "install/lib/caffe2_gpu.lib" 167 | }, 168 | "need_cpu_info": "yes", 169 | "only_for_target_os_tags": [ 170 | "linux", 171 | "windows" 172 | ], 173 | "package_extra_name": " (eigen, cuda)", 174 | "process_script": "install", 175 | "soft_uoa": "54c5b933f17fb81c", 176 | "suggested_path": "lib-caffe2-master-eigen-cuda", 177 | "tags": [ 178 | "lib", 179 | "facebook", 180 | "caffe2", 181 | "vmaster", 182 | "vcuda" 183 | ], 184 | "use_preprocess_scripts_from_another_entry": { 185 | "data_uoa": "fd44428fbc77f77f", 186 | "module_uoa": "84e27ad9dd12e734" 187 | }, 188 | "use_scripts_from_another_entry": { 189 | "data_uoa": "cd9ccc74060b3d18", 190 | "module_uoa": "script" 191 | } 192 | } 193 | -------------------------------------------------------------------------------- /program/caffe2/convnet_benchmarks.py.LICENSE: -------------------------------------------------------------------------------- 1 | COPYRIGHT 2 | 3 | All contributions by Facebook: 4 | Copyright (c) 2016 Facebook Inc. 5 | 6 | All contributions by Google: 7 | Copyright (c) 2015 Google Inc. 8 | All rights reserved. 9 | 10 | All contributions by Yangqing Jia: 11 | Copyright (c) 2015 Yangqing Jia 12 | All rights reserved. 13 | 14 | All contributions from Caffe: 15 | Copyright(c) 2013, 2014, 2015, the respective contributors 16 | All rights reserved. 17 | 18 | All other contributions: 19 | Copyright(c) 2015, 2016 the respective contributors 20 | All rights reserved. 21 | 22 | Caffe2 uses a copyright model similar to Caffe: each contributor holds 23 | copyright over their contributions to Caffe2. The project versioning records 24 | all such contribution and copyright details. If a contributor wants to further 25 | mark their specific copyright on a particular contribution, they should 26 | indicate their copyright solely in the commit message of the change when it is 27 | committed. 28 | 29 | == LICENSE == 30 | 31 | Redistribution and use in source and binary forms, with or without 32 | modification, are permitted provided that the following conditions are met: 33 | 34 | 1. Redistributions of source code must retain the above copyright notice, this 35 | list of conditions and the following disclaimer. 36 | 2. Redistributions in binary form must reproduce the above copyright notice, 37 | this list of conditions and the following disclaimer in the documentation 38 | and/or other materials provided with the distribution. 39 | 40 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 41 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 42 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 43 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 44 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 45 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 46 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 47 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 48 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 49 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 50 | 51 | == DECLARATION == 52 | 53 | Some parts of the caffe2 code is derived from the original Caffe code, which is 54 | created by Yangqing Jia and is now a BSD-licensed open-source project. The Caffe 55 | license is as follows: 56 | 57 | *** begin Caffe license *** 58 | COPYRIGHT 59 | 60 | All contributions by the University of California: 61 | Copyright (c) 2014, The Regents of the University of California (Regents) 62 | All rights reserved. 63 | 64 | All other contributions: 65 | Copyright (c) 2014, the respective contributors 66 | All rights reserved. 67 | 68 | Caffe uses a shared copyright model: each contributor holds copyright over 69 | their contributions to Caffe. The project versioning records all such 70 | contribution and copyright details. If a contributor wants to further mark 71 | their specific copyright on a particular contribution, they should indicate 72 | their copyright solely in the commit message of the change when it is 73 | committed. 74 | 75 | LICENSE 76 | 77 | Redistribution and use in source and binary forms, with or without 78 | modification, are permitted provided that the following conditions are met: 79 | 80 | 1. Redistributions of source code must retain the above copyright notice, this 81 | list of conditions and the following disclaimer. 82 | 2. Redistributions in binary form must reproduce the above copyright notice, 83 | this list of conditions and the following disclaimer in the documentation 84 | and/or other materials provided with the distribution. 85 | 86 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 87 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 88 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 89 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 90 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 91 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 92 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 93 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 94 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 95 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 96 | 97 | CONTRIBUTION AGREEMENT 98 | 99 | By contributing to the BVLC/caffe repository through pull-request, comment, 100 | or otherwise, the contributor releases their content to the 101 | license and copyright terms herein. 102 | *** end Caffe license *** 103 | 104 | Some part of the caffe2 code (caffe2/utils/zmq.hpp) comes from the open-source 105 | zmqhpp project under the MIT license. The zmqhpp license is as follows: 106 | 107 | *** begin zmqhpp license *** 108 | Copyright (c) 2009-2011 250bpm s.r.o. 109 | Copyright (c) 2011 Botond Ballo 110 | Copyright (c) 2007-2009 iMatix Corporation 111 | 112 | Permission is hereby granted, free of charge, to any person obtaining a copy 113 | of this software and associated documentation files (the "Software"), to 114 | deal in the Software without restriction, including without limitation the 115 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 116 | sell copies of the Software, and to permit persons to whom the Software is 117 | furnished to do so, subject to the following conditions: 118 | 119 | The above copyright notice and this permission notice shall be included in 120 | all copies or substantial portions of the Software. 121 | 122 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 123 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 124 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 125 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 126 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 127 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 128 | IN THE SOFTWARE. 129 | *** end zmqhpp license *** 130 | -------------------------------------------------------------------------------- /soft/lib.caffe2/customize.py: -------------------------------------------------------------------------------- 1 | # 2 | # Collective Knowledge (individual environment - setup) 3 | # 4 | # See CK LICENSE.txt for licensing details 5 | # See CK COPYRIGHT.txt for copyright details 6 | # 7 | # Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net 8 | # 9 | 10 | import os 11 | 12 | ############################################################################## 13 | # setup environment setup 14 | 15 | def setup(i): 16 | """ 17 | Input: { 18 | cfg - meta of this soft entry 19 | self_cfg - meta of module soft 20 | ck_kernel - import CK kernel module (to reuse functions) 21 | 22 | host_os_uoa - host OS UOA 23 | host_os_uid - host OS UID 24 | host_os_dict - host OS meta 25 | 26 | target_os_uoa - target OS UOA 27 | target_os_uid - target OS UID 28 | target_os_dict - target OS meta 29 | 30 | target_device_id - target device ID (if via ADB) 31 | 32 | tags - list of tags used to search this entry 33 | 34 | env - updated environment vars from meta 35 | customize - updated customize vars from meta 36 | 37 | deps - resolved dependencies for this soft 38 | 39 | interactive - if 'yes', can ask questions, otherwise quiet 40 | } 41 | 42 | Output: { 43 | return - return code = 0, if successful 44 | > 0, if error 45 | (error) - error text if return > 0 46 | 47 | bat - prepared string for bat file 48 | } 49 | 50 | """ 51 | 52 | import os 53 | 54 | # Get variables 55 | ck=i['ck_kernel'] 56 | s='' 57 | 58 | iv=i.get('interactive','') 59 | 60 | cus=i.get('customize',{}) 61 | fp=cus.get('full_path','') 62 | 63 | hosd=i['host_os_dict'] 64 | tosd=i['target_os_dict'] 65 | 66 | win=tosd.get('windows_base','') 67 | remote=tosd.get('remote','') 68 | mingw=tosd.get('mingw','') 69 | 70 | # Check platform 71 | tplat=tosd.get('ck_name','') 72 | hplat=hosd.get('ck_name','') 73 | 74 | hproc=hosd.get('processor','') 75 | tproc=tosd.get('processor','') 76 | 77 | remote=tosd.get('remote','') 78 | tbits=tosd.get('bits','') 79 | 80 | env=i['env'] 81 | 82 | fpr='' 83 | fp0=os.path.basename(fp) 84 | fp1=os.path.dirname(fp) 85 | fp2=os.path.basename(fp1) 86 | 87 | if fp2=='Release' or fp2=='Debug': 88 | fpr=fp2 89 | 90 | libname=os.path.splitext(fp) 91 | 92 | # When targeting Android, we do not create tools via Caffe, but later via CK 93 | # In such case, we reference .so file instead of bin when registering soft ... 94 | if not fp0.endswith('.so'): 95 | env['CK_CAFFE2_BIN']=fp0 96 | 97 | pi=fp 98 | found=False 99 | while True: 100 | if os.path.isdir(os.path.join(pi,'include')): 101 | found=True 102 | break 103 | pix=os.path.dirname(pi) 104 | if pix==pi: 105 | break 106 | pi=pix 107 | 108 | if not found: 109 | return {'return':1, 'error':'can\'t find root dir of the CAFFE installation'} 110 | 111 | # p1=os.path.dirname(fp) 112 | p1=os.path.join(pi,'binaries') 113 | 114 | cus['path_bin']=p1 115 | 116 | pl=os.path.join(pi,'lib') 117 | if fpr!='': pl=os.path.join(pl,fpr) 118 | 119 | if not os.path.isdir(pl): 120 | pl=os.path.join(pi,'lib') 121 | if not os.path.isdir(pl): 122 | pl=os.path.join(pi,'.build_release','lib') 123 | if not os.path.isdir(pl): 124 | return {'return':1, 'error':'can\'t find lib dir of the CAFFE installation'} 125 | 126 | ep=cus.get('env_prefix','') 127 | 128 | cus['path_lib']=pl 129 | cus['path_include']=os.path.join(pi,'include') 130 | 131 | if hplat=='win': 132 | fp5=os.path.dirname(pi) 133 | fp6=os.path.join(fp5,'libraries','libraries') 134 | fp7=os.path.join(fp6,'bin') 135 | fp7l=os.path.join(fp6,'lib') 136 | fp7l1=os.path.join(fp6,'x64','vc14','bin') 137 | fp8='' 138 | if os.path.isdir(fp7): 139 | fp8=';'+fp7+';'+fp7l+';'+fp7l1 140 | 141 | if remote=='yes' or mingw=='yes': 142 | sext='.a' 143 | dext='.so' 144 | 145 | s+='set LD_LIBRARY_PATH="'+cus['path_lib']+'":$LD_LIBRARY_PATH\n' 146 | 147 | else: 148 | sext='.lib' 149 | dext='.dll' 150 | 151 | env['CK_CAFFE_CLASSIFICATION_BIN']='classification.exe' 152 | 153 | s+='set PATH='+cus['path_bin']+fp8+';%PATH%\n' 154 | 155 | else: 156 | sext='.a' 157 | dext='.so' 158 | 159 | path_example_classification=os.path.join(os.path.dirname(cus['path_bin']),'examples','cpp_classification') 160 | 161 | for ppx in ['classification.bin', 'classification']: 162 | ppy=os.path.join(cus['path_bin'],ppx) 163 | if os.path.isfile(ppy): 164 | env['CK_CAFFE_CLASSIFICATION_BIN']=ppx 165 | break 166 | 167 | s+='export PATH='+cus['path_bin']+':'+path_example_classification+':$PATH\n' 168 | if cus.get('path_lib','')!='': 169 | s+='export LD_LIBRARY_PATH="'+cus['path_lib']+'":$LD_LIBRARY_PATH\n' 170 | s+='export LIBRARY_PATH="'+cus['path_lib']+'":$LIBRARY_PATH\n\n' 171 | 172 | x='' 173 | if win!='yes': x='lib' 174 | 175 | cus['static_lib']=libname[0]+sext 176 | cus['dynamic_lib']=libname[0]+dext 177 | 178 | env[ep+'_STATIC_NAME']=cus.get('static_lib','') 179 | env[ep+'_DYNAMIC_NAME']=cus.get('dynamic_lib','') 180 | 181 | env[ep]=pi 182 | 183 | env[ep+'_EXTRA_INCLUDE']=os.path.join(pi,'.build_release','src') 184 | 185 | env['CAFFE2_INSTALL_DIR']=pi 186 | 187 | # Check if compiled with Python 188 | ppy=os.path.join(pi,'caffe2') 189 | ppy1=os.path.join(ppy,'__init__.py') 190 | if os.path.isdir(ppy) and os.path.isfile(ppy1): 191 | env[ep+'_PYTHON']=pi 192 | if tplat=='win': 193 | s+='\n\nset PYTHONPATH='+pi+';%PYTHONPATH%\n\n' 194 | else: 195 | s+='\n\nexport PYTHONPATH='+pi+':$PYTHONPATH\n\n' 196 | 197 | if tplat=='win': 198 | env[ep+'_CFLAGS']='/D CMAKE_WINDOWS_BUILD' 199 | env[ep+'_CXXFLAGS']='/D CMAKE_WINDOWS_BUILD' 200 | 201 | env[ep+'_LFLAG']=os.path.join(pl,'caffe.lib') 202 | env[ep+'_LFLAG_PROTO']=os.path.join(pl,'proto.lib') 203 | 204 | # HACK - need to check BOOST version and vc ... 205 | env[ep+'_LINK_FLAGS']='/link /NODEFAULTLIB:libboost_date_time-vc140-mt-1_62.lib /NODEFAULTLIB:libboost_filesystem-vc140-mt-1_62.lib /NODEFAULTLIB:libboost_system-vc140-mt-1_62.lib' 206 | 207 | return {'return':0, 'bat':s} 208 | -------------------------------------------------------------------------------- /program/caffe2/.cm/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "backup_data_uid": "883cc4dde19eb5b8", 3 | "data_name": "caffe2", 4 | "no_compile": "yes", 5 | "no_target_file": "yes", 6 | "only_for_target_os_tags": [ 7 | "windows", 8 | "linux" 9 | ], 10 | "print_files_after_run": [ 11 | "stderr2.log", 12 | "stderr.log" 13 | ], 14 | "process_in_tmp": "yes", 15 | "program": "yes", 16 | "run_cmds": { 17 | "classify": { 18 | "dataset_tags": [ 19 | "image", 20 | "jpeg", 21 | "dataset" 22 | ], 23 | "ignore_return_code": "no", 24 | "run_deps": { 25 | "caffe2": { 26 | "force_target_as_host": "yes", 27 | "local": "yes", 28 | "name": "Caffe2 lib", 29 | "sort": 5, 30 | "tags": "lib,caffe2" 31 | }, 32 | "caffemodel2": { 33 | "force_target_as_host": "yes", 34 | "local": "yes", 35 | "name": "Caffe2 model (net and weights)", 36 | "no_tags": "caffemodel", 37 | "sort": 40, 38 | "tags": "caffemodel2" 39 | }, 40 | "python": { 41 | "local": "yes", 42 | "name": "Python", 43 | "sort": 0, 44 | "tags": "compiler,python", 45 | "version_to": [ 46 | 2, 47 | 8 48 | ] 49 | } 50 | }, 51 | "run_time": { 52 | "run_cmd_main": "$<>$ ../classify.py $<>$ $<>$/predict_net.pb ../alexnet_codes $#dataset_path#$$#dataset_filename#$", 53 | "run_cmd_out1": "stderr.log", 54 | "run_cmd_out2": "stderr2.log" 55 | } 56 | }, 57 | "classify_ck_ai_api": { 58 | "ignore_return_code": "no", 59 | "run_deps": { 60 | "caffe2": { 61 | "force_target_as_host": "yes", 62 | "local": "yes", 63 | "name": "Caffe2 lib", 64 | "skip_pruning_by_other_deps": "yes", 65 | "sort": 5, 66 | "tags": "lib,caffe2" 67 | }, 68 | "caffemodel2": { 69 | "force_target_as_host": "yes", 70 | "local": "yes", 71 | "name": "Caffe2 model (net and weights)", 72 | "sort": 40, 73 | "tags": "caffemodel2" 74 | } 75 | }, 76 | "run_time": { 77 | "run_cmd_main": "$<>$ ../classify.py $<>$ $<>$/predict_net.pb ../alexnet_codes $<>$", 78 | "run_cmd_out1": "stderr.log", 79 | "run_cmd_out2": "stderr2.log", 80 | "run_correctness_output_files": [] 81 | } 82 | }, 83 | "convert_caffe1_model_to_caffe2": { 84 | "ignore_return_code": "no", 85 | "run_deps": { 86 | "caffe2": { 87 | "force_target_as_host": "yes", 88 | "local": "yes", 89 | "name": "Caffe2 lib", 90 | "skip_pruning_by_other_deps": "yes", 91 | "sort": 5, 92 | "tags": "lib,caffe2" 93 | }, 94 | "caffemodel": { 95 | "force_target_as_host": "yes", 96 | "local": "yes", 97 | "name": "Caffe model (net and weights)", 98 | "sort": 10, 99 | "tags": "caffemodel" 100 | }, 101 | "python": { 102 | "local": "yes", 103 | "name": "Python", 104 | "sort": 0, 105 | "tags": "compiler,python", 106 | "version_to": [ 107 | 2, 108 | 8 109 | ] 110 | } 111 | }, 112 | "run_time": { 113 | "pre_process_via_ck": { 114 | "script_name": "preprocess" 115 | }, 116 | "run_cmd_main": "$<>$ $<>$/caffe2/python/caffe_translator.py $<>$ $<>$", 117 | "run_correctness_output_files": [], 118 | "run_input_files": [ 119 | "$<>$", 120 | "$<>$", 121 | "imagenet_mean.binaryproto", 122 | "synset_words.txt" 123 | ], 124 | "run_output_files": [] 125 | } 126 | }, 127 | "time_cpu": { 128 | "dataset_tags": [ 129 | "benchmark", 130 | "caffe2", 131 | "dataset", 132 | "vcpu" 133 | ], 134 | "ignore_return_code": "no", 135 | "run_deps": { 136 | "lib-caffe2": { 137 | "local": "yes", 138 | "name": "Caffe2 library", 139 | "sort": 10, 140 | "tags": "lib,caffe2,vcpu" 141 | }, 142 | "python": { 143 | "local": "yes", 144 | "name": "Python", 145 | "sort": 0, 146 | "tags": "compiler,python", 147 | "version_to": [ 148 | 2, 149 | 8 150 | ] 151 | } 152 | }, 153 | "run_time": { 154 | "fine_grain_timer_file": "tmp-ck-timer.json", 155 | "post_process_cmds": [ 156 | "python $#src_path_local#$postprocess_time.py" 157 | ], 158 | "post_process_via_ck": "yes", 159 | "run_cmd_main": "$<>$ ../convnet_benchmarks.py --ck_model $#dataset_path#$ --cpu --batch_size $<>$", 160 | "run_cmd_out1": "stderr.log", 161 | "run_cmd_out2": "stderr2.log", 162 | "run_output_files": [ 163 | "stderr.log", 164 | "stderr2.log", 165 | "tmp-ck-timer.json" 166 | ] 167 | } 168 | }, 169 | "time_cuda": { 170 | "dataset_tags": [ 171 | "benchmark", 172 | "caffe2", 173 | "dataset", 174 | "vcuda" 175 | ], 176 | "ignore_return_code": "no", 177 | "run_deps": { 178 | "lib-caffe2": { 179 | "local": "yes", 180 | "name": "Caffe2 library", 181 | "skip_pruning_by_other_deps": "yes", 182 | "sort": 10, 183 | "tags": "lib,caffe2,vcuda" 184 | }, 185 | "python": { 186 | "local": "yes", 187 | "name": "Python", 188 | "sort": 0, 189 | "tags": "compiler,python", 190 | "version_to": [ 191 | 2, 192 | 8 193 | ] 194 | } 195 | }, 196 | "run_time": { 197 | "fine_grain_timer_file": "tmp-ck-timer.json", 198 | "post_process_cmds": [ 199 | "python $#src_path_local#$postprocess_time.py" 200 | ], 201 | "post_process_via_ck": "yes", 202 | "run_cmd_main": "$<>$ ../convnet_benchmarks.py --ck_model $#dataset_path#$ --batch_size $<>$", 203 | "run_cmd_out1": "stderr.log", 204 | "run_cmd_out2": "stderr2.log", 205 | "run_output_files": [ 206 | "stderr.log", 207 | "stderr2.log", 208 | "tmp-ck-timer.json" 209 | ] 210 | } 211 | } 212 | }, 213 | "run_vars": { 214 | "BATCH_SIZE": 5 215 | }, 216 | "skip_tmp_deps": "yes", 217 | "tags": [ 218 | "program", 219 | "caffe2" 220 | ], 221 | "version": "1.0.0" 222 | } 223 | -------------------------------------------------------------------------------- /package/caffemodel2-bvlc-alexnet/train_val.prototxt: -------------------------------------------------------------------------------- 1 | name: "AlexNet" 2 | layer { 3 | name: "data" 4 | type: "Data" 5 | top: "data" 6 | top: "label" 7 | include { 8 | phase: TRAIN 9 | } 10 | transform_param { 11 | mirror: true 12 | crop_size: 227 13 | mean_file: "$#train_mean#$" 14 | } 15 | data_param { 16 | source: "$#train_lmdb#$" 17 | batch_size: $#train_batch_size#$ 18 | backend: LMDB 19 | } 20 | } 21 | layer { 22 | name: "data" 23 | type: "Data" 24 | top: "data" 25 | top: "label" 26 | include { 27 | phase: TEST 28 | } 29 | transform_param { 30 | mirror: false 31 | crop_size: 227 32 | mean_file: "$#val_mean#$" 33 | } 34 | data_param { 35 | source: "$#val_lmdb#$" 36 | batch_size: $#val_batch_size#$ 37 | backend: LMDB 38 | } 39 | } 40 | layer { 41 | name: "conv1" 42 | type: "Convolution" 43 | bottom: "data" 44 | top: "conv1" 45 | param { 46 | lr_mult: 1 47 | decay_mult: 1 48 | } 49 | param { 50 | lr_mult: 2 51 | decay_mult: 0 52 | } 53 | convolution_param { 54 | num_output: 96 55 | kernel_size: 11 56 | stride: 4 57 | weight_filler { 58 | type: "gaussian" 59 | std: 0.01 60 | } 61 | bias_filler { 62 | type: "constant" 63 | value: 0 64 | } 65 | } 66 | } 67 | layer { 68 | name: "relu1" 69 | type: "ReLU" 70 | bottom: "conv1" 71 | top: "conv1" 72 | } 73 | layer { 74 | name: "norm1" 75 | type: "LRN" 76 | bottom: "conv1" 77 | top: "norm1" 78 | lrn_param { 79 | local_size: 5 80 | alpha: 0.0001 81 | beta: 0.75 82 | } 83 | } 84 | layer { 85 | name: "pool1" 86 | type: "Pooling" 87 | bottom: "norm1" 88 | top: "pool1" 89 | pooling_param { 90 | pool: MAX 91 | kernel_size: 3 92 | stride: 2 93 | } 94 | } 95 | layer { 96 | name: "conv2" 97 | type: "Convolution" 98 | bottom: "pool1" 99 | top: "conv2" 100 | param { 101 | lr_mult: 1 102 | decay_mult: 1 103 | } 104 | param { 105 | lr_mult: 2 106 | decay_mult: 0 107 | } 108 | convolution_param { 109 | num_output: 256 110 | pad: 2 111 | kernel_size: 5 112 | group: 2 113 | weight_filler { 114 | type: "gaussian" 115 | std: 0.01 116 | } 117 | bias_filler { 118 | type: "constant" 119 | value: 0.1 120 | } 121 | } 122 | } 123 | layer { 124 | name: "relu2" 125 | type: "ReLU" 126 | bottom: "conv2" 127 | top: "conv2" 128 | } 129 | layer { 130 | name: "norm2" 131 | type: "LRN" 132 | bottom: "conv2" 133 | top: "norm2" 134 | lrn_param { 135 | local_size: 5 136 | alpha: 0.0001 137 | beta: 0.75 138 | } 139 | } 140 | layer { 141 | name: "pool2" 142 | type: "Pooling" 143 | bottom: "norm2" 144 | top: "pool2" 145 | pooling_param { 146 | pool: MAX 147 | kernel_size: 3 148 | stride: 2 149 | } 150 | } 151 | layer { 152 | name: "conv3" 153 | type: "Convolution" 154 | bottom: "pool2" 155 | top: "conv3" 156 | param { 157 | lr_mult: 1 158 | decay_mult: 1 159 | } 160 | param { 161 | lr_mult: 2 162 | decay_mult: 0 163 | } 164 | convolution_param { 165 | num_output: 384 166 | pad: 1 167 | kernel_size: 3 168 | weight_filler { 169 | type: "gaussian" 170 | std: 0.01 171 | } 172 | bias_filler { 173 | type: "constant" 174 | value: 0 175 | } 176 | } 177 | } 178 | layer { 179 | name: "relu3" 180 | type: "ReLU" 181 | bottom: "conv3" 182 | top: "conv3" 183 | } 184 | layer { 185 | name: "conv4" 186 | type: "Convolution" 187 | bottom: "conv3" 188 | top: "conv4" 189 | param { 190 | lr_mult: 1 191 | decay_mult: 1 192 | } 193 | param { 194 | lr_mult: 2 195 | decay_mult: 0 196 | } 197 | convolution_param { 198 | num_output: 384 199 | pad: 1 200 | kernel_size: 3 201 | group: 2 202 | weight_filler { 203 | type: "gaussian" 204 | std: 0.01 205 | } 206 | bias_filler { 207 | type: "constant" 208 | value: 0.1 209 | } 210 | } 211 | } 212 | layer { 213 | name: "relu4" 214 | type: "ReLU" 215 | bottom: "conv4" 216 | top: "conv4" 217 | } 218 | layer { 219 | name: "conv5" 220 | type: "Convolution" 221 | bottom: "conv4" 222 | top: "conv5" 223 | param { 224 | lr_mult: 1 225 | decay_mult: 1 226 | } 227 | param { 228 | lr_mult: 2 229 | decay_mult: 0 230 | } 231 | convolution_param { 232 | num_output: 256 233 | pad: 1 234 | kernel_size: 3 235 | group: 2 236 | weight_filler { 237 | type: "gaussian" 238 | std: 0.01 239 | } 240 | bias_filler { 241 | type: "constant" 242 | value: 0.1 243 | } 244 | } 245 | } 246 | layer { 247 | name: "relu5" 248 | type: "ReLU" 249 | bottom: "conv5" 250 | top: "conv5" 251 | } 252 | layer { 253 | name: "pool5" 254 | type: "Pooling" 255 | bottom: "conv5" 256 | top: "pool5" 257 | pooling_param { 258 | pool: MAX 259 | kernel_size: 3 260 | stride: 2 261 | } 262 | } 263 | layer { 264 | name: "fc6" 265 | type: "InnerProduct" 266 | bottom: "pool5" 267 | top: "fc6" 268 | param { 269 | lr_mult: 1 270 | decay_mult: 1 271 | } 272 | param { 273 | lr_mult: 2 274 | decay_mult: 0 275 | } 276 | inner_product_param { 277 | num_output: 4096 278 | weight_filler { 279 | type: "gaussian" 280 | std: 0.005 281 | } 282 | bias_filler { 283 | type: "constant" 284 | value: 0.1 285 | } 286 | } 287 | } 288 | layer { 289 | name: "relu6" 290 | type: "ReLU" 291 | bottom: "fc6" 292 | top: "fc6" 293 | } 294 | layer { 295 | name: "drop6" 296 | type: "Dropout" 297 | bottom: "fc6" 298 | top: "fc6" 299 | dropout_param { 300 | dropout_ratio: 0.5 301 | } 302 | } 303 | layer { 304 | name: "fc7" 305 | type: "InnerProduct" 306 | bottom: "fc6" 307 | top: "fc7" 308 | param { 309 | lr_mult: 1 310 | decay_mult: 1 311 | } 312 | param { 313 | lr_mult: 2 314 | decay_mult: 0 315 | } 316 | inner_product_param { 317 | num_output: 4096 318 | weight_filler { 319 | type: "gaussian" 320 | std: 0.005 321 | } 322 | bias_filler { 323 | type: "constant" 324 | value: 0.1 325 | } 326 | } 327 | } 328 | layer { 329 | name: "relu7" 330 | type: "ReLU" 331 | bottom: "fc7" 332 | top: "fc7" 333 | } 334 | layer { 335 | name: "drop7" 336 | type: "Dropout" 337 | bottom: "fc7" 338 | top: "fc7" 339 | dropout_param { 340 | dropout_ratio: 0.5 341 | } 342 | } 343 | layer { 344 | name: "fc8" 345 | type: "InnerProduct" 346 | bottom: "fc7" 347 | top: "fc8" 348 | param { 349 | lr_mult: 1 350 | decay_mult: 1 351 | } 352 | param { 353 | lr_mult: 2 354 | decay_mult: 0 355 | } 356 | inner_product_param { 357 | num_output: 1000 358 | weight_filler { 359 | type: "gaussian" 360 | std: 0.01 361 | } 362 | bias_filler { 363 | type: "constant" 364 | value: 0 365 | } 366 | } 367 | } 368 | layer { 369 | name: "accuracy" 370 | type: "Accuracy" 371 | bottom: "fc8" 372 | bottom: "label" 373 | top: "accuracy" 374 | include { 375 | phase: TEST 376 | } 377 | } 378 | layer { 379 | name: "accuracy_top5" 380 | type: "Accuracy" 381 | bottom: "fc8" 382 | bottom: "label" 383 | top: "accuracy_top5" 384 | include { 385 | phase: TEST 386 | } 387 | accuracy_param { 388 | top_k: 5 389 | } 390 | } 391 | layer { 392 | name: "loss" 393 | type: "SoftmaxWithLoss" 394 | bottom: "fc8" 395 | bottom: "label" 396 | top: "loss" 397 | } 398 | -------------------------------------------------------------------------------- /package/caffemodel2-deepscale-squeezenet-1.1/predict_net.pb: -------------------------------------------------------------------------------- 1 | 2 | F 3 | data 4 | conv1_w 5 | conv1_bconv1"Conv* 6 | 7 | stride* 8 | pad* 9 | 10 | kernel 11 | conv1conv1"ReluW 12 | conv1pool1"MaxPool* 13 | 14 | stride* 15 | pad* 16 | 17 | kernel* 18 | order"NCHW* 19 | 20 | legacy_padh 21 | pool1 22 | fire2/squeeze1x1_w 23 | fire2/squeeze1x1_bfire2/squeeze1x1"Conv* 24 | 25 | stride* 26 | pad* 27 | 28 | kernel* 29 | fire2/squeeze1x1fire2/squeeze1x1"Relup 30 | fire2/squeeze1x1 31 | fire2/expand1x1_w 32 | fire2/expand1x1_bfire2/expand1x1"Conv* 33 | 34 | stride* 35 | pad* 36 | 37 | kernel( 38 | fire2/expand1x1fire2/expand1x1"Relup 39 | fire2/squeeze1x1 40 | fire2/expand3x3_w 41 | fire2/expand3x3_bfire2/expand3x3"Conv* 42 | 43 | stride* 44 | pad* 45 | 46 | kernel( 47 | fire2/expand3x3fire2/expand3x3"Relu[ 48 | fire2/expand1x1 49 | fire2/expand3x3 fire2/concat_fire2/concat_dims"Concat* 50 | order"NCHWo 51 | fire2/concat 52 | fire3/squeeze1x1_w 53 | fire3/squeeze1x1_bfire3/squeeze1x1"Conv* 54 | 55 | stride* 56 | pad* 57 | 58 | kernel* 59 | fire3/squeeze1x1fire3/squeeze1x1"Relup 60 | fire3/squeeze1x1 61 | fire3/expand1x1_w 62 | fire3/expand1x1_bfire3/expand1x1"Conv* 63 | 64 | stride* 65 | pad* 66 | 67 | kernel( 68 | fire3/expand1x1fire3/expand1x1"Relup 69 | fire3/squeeze1x1 70 | fire3/expand3x3_w 71 | fire3/expand3x3_bfire3/expand3x3"Conv* 72 | 73 | stride* 74 | pad* 75 | 76 | kernel( 77 | fire3/expand3x3fire3/expand3x3"Relu[ 78 | fire3/expand1x1 79 | fire3/expand3x3 fire3/concat_fire3/concat_dims"Concat* 80 | order"NCHW^ 81 | fire3/concatpool3"MaxPool* 82 | 83 | stride* 84 | pad* 85 | 86 | kernel* 87 | order"NCHW* 88 | 89 | legacy_padh 90 | pool3 91 | fire4/squeeze1x1_w 92 | fire4/squeeze1x1_bfire4/squeeze1x1"Conv* 93 | 94 | stride* 95 | pad* 96 | 97 | kernel* 98 | fire4/squeeze1x1fire4/squeeze1x1"Relup 99 | fire4/squeeze1x1 100 | fire4/expand1x1_w 101 | fire4/expand1x1_bfire4/expand1x1"Conv* 102 | 103 | stride* 104 | pad* 105 | 106 | kernel( 107 | fire4/expand1x1fire4/expand1x1"Relup 108 | fire4/squeeze1x1 109 | fire4/expand3x3_w 110 | fire4/expand3x3_bfire4/expand3x3"Conv* 111 | 112 | stride* 113 | pad* 114 | 115 | kernel( 116 | fire4/expand3x3fire4/expand3x3"Relu[ 117 | fire4/expand1x1 118 | fire4/expand3x3 fire4/concat_fire4/concat_dims"Concat* 119 | order"NCHWo 120 | fire4/concat 121 | fire5/squeeze1x1_w 122 | fire5/squeeze1x1_bfire5/squeeze1x1"Conv* 123 | 124 | stride* 125 | pad* 126 | 127 | kernel* 128 | fire5/squeeze1x1fire5/squeeze1x1"Relup 129 | fire5/squeeze1x1 130 | fire5/expand1x1_w 131 | fire5/expand1x1_bfire5/expand1x1"Conv* 132 | 133 | stride* 134 | pad* 135 | 136 | kernel( 137 | fire5/expand1x1fire5/expand1x1"Relup 138 | fire5/squeeze1x1 139 | fire5/expand3x3_w 140 | fire5/expand3x3_bfire5/expand3x3"Conv* 141 | 142 | stride* 143 | pad* 144 | 145 | kernel( 146 | fire5/expand3x3fire5/expand3x3"Relu[ 147 | fire5/expand1x1 148 | fire5/expand3x3 fire5/concat_fire5/concat_dims"Concat* 149 | order"NCHW^ 150 | fire5/concatpool5"MaxPool* 151 | 152 | stride* 153 | pad* 154 | 155 | kernel* 156 | order"NCHW* 157 | 158 | legacy_padh 159 | pool5 160 | fire6/squeeze1x1_w 161 | fire6/squeeze1x1_bfire6/squeeze1x1"Conv* 162 | 163 | stride* 164 | pad* 165 | 166 | kernel* 167 | fire6/squeeze1x1fire6/squeeze1x1"Relup 168 | fire6/squeeze1x1 169 | fire6/expand1x1_w 170 | fire6/expand1x1_bfire6/expand1x1"Conv* 171 | 172 | stride* 173 | pad* 174 | 175 | kernel( 176 | fire6/expand1x1fire6/expand1x1"Relup 177 | fire6/squeeze1x1 178 | fire6/expand3x3_w 179 | fire6/expand3x3_bfire6/expand3x3"Conv* 180 | 181 | stride* 182 | pad* 183 | 184 | kernel( 185 | fire6/expand3x3fire6/expand3x3"Relu[ 186 | fire6/expand1x1 187 | fire6/expand3x3 fire6/concat_fire6/concat_dims"Concat* 188 | order"NCHWo 189 | fire6/concat 190 | fire7/squeeze1x1_w 191 | fire7/squeeze1x1_bfire7/squeeze1x1"Conv* 192 | 193 | stride* 194 | pad* 195 | 196 | kernel* 197 | fire7/squeeze1x1fire7/squeeze1x1"Relup 198 | fire7/squeeze1x1 199 | fire7/expand1x1_w 200 | fire7/expand1x1_bfire7/expand1x1"Conv* 201 | 202 | stride* 203 | pad* 204 | 205 | kernel( 206 | fire7/expand1x1fire7/expand1x1"Relup 207 | fire7/squeeze1x1 208 | fire7/expand3x3_w 209 | fire7/expand3x3_bfire7/expand3x3"Conv* 210 | 211 | stride* 212 | pad* 213 | 214 | kernel( 215 | fire7/expand3x3fire7/expand3x3"Relu[ 216 | fire7/expand1x1 217 | fire7/expand3x3 fire7/concat_fire7/concat_dims"Concat* 218 | order"NCHWo 219 | fire7/concat 220 | fire8/squeeze1x1_w 221 | fire8/squeeze1x1_bfire8/squeeze1x1"Conv* 222 | 223 | stride* 224 | pad* 225 | 226 | kernel* 227 | fire8/squeeze1x1fire8/squeeze1x1"Relup 228 | fire8/squeeze1x1 229 | fire8/expand1x1_w 230 | fire8/expand1x1_bfire8/expand1x1"Conv* 231 | 232 | stride* 233 | pad* 234 | 235 | kernel( 236 | fire8/expand1x1fire8/expand1x1"Relup 237 | fire8/squeeze1x1 238 | fire8/expand3x3_w 239 | fire8/expand3x3_bfire8/expand3x3"Conv* 240 | 241 | stride* 242 | pad* 243 | 244 | kernel( 245 | fire8/expand3x3fire8/expand3x3"Relu[ 246 | fire8/expand1x1 247 | fire8/expand3x3 fire8/concat_fire8/concat_dims"Concat* 248 | order"NCHWo 249 | fire8/concat 250 | fire9/squeeze1x1_w 251 | fire9/squeeze1x1_bfire9/squeeze1x1"Conv* 252 | 253 | stride* 254 | pad* 255 | 256 | kernel* 257 | fire9/squeeze1x1fire9/squeeze1x1"Relup 258 | fire9/squeeze1x1 259 | fire9/expand1x1_w 260 | fire9/expand1x1_bfire9/expand1x1"Conv* 261 | 262 | stride* 263 | pad* 264 | 265 | kernel( 266 | fire9/expand1x1fire9/expand1x1"Relup 267 | fire9/squeeze1x1 268 | fire9/expand3x3_w 269 | fire9/expand3x3_bfire9/expand3x3"Conv* 270 | 271 | stride* 272 | pad* 273 | 274 | kernel( 275 | fire9/expand3x3fire9/expand3x3"Relu[ 276 | fire9/expand1x1 277 | fire9/expand3x3 fire9/concat_fire9/concat_dims"Concat* 278 | order"NCHWT 279 | fire9/concat fire9/concat_fire9/concat_mask"Dropout* 280 | ratio?* 281 | is_testQ 282 | fire9/concat 283 | conv10_w 284 | conv10_bconv10"Conv* 285 | 286 | stride* 287 | pad* 288 | 289 | kernel 290 | conv10conv10"Reluq 291 | conv10pool10" AveragePool* 292 | 293 | stride* 294 | pad* 295 | 296 | kernel* 297 | order"NCHW* 298 | 299 | legacy_pad* 300 | global_pooling 301 | pool10prob"Softmax:data:conv1_w:conv1_b:fire2/squeeze1x1_w:fire2/squeeze1x1_b:fire2/expand1x1_w:fire2/expand1x1_b:fire2/expand3x3_w:fire2/expand3x3_b:fire3/squeeze1x1_w:fire3/squeeze1x1_b:fire3/expand1x1_w:fire3/expand1x1_b:fire3/expand3x3_w:fire3/expand3x3_b:fire4/squeeze1x1_w:fire4/squeeze1x1_b:fire4/expand1x1_w:fire4/expand1x1_b:fire4/expand3x3_w:fire4/expand3x3_b:fire5/squeeze1x1_w:fire5/squeeze1x1_b:fire5/expand1x1_w:fire5/expand1x1_b:fire5/expand3x3_w:fire5/expand3x3_b:fire6/squeeze1x1_w:fire6/squeeze1x1_b:fire6/expand1x1_w:fire6/expand1x1_b:fire6/expand3x3_w:fire6/expand3x3_b:fire7/squeeze1x1_w:fire7/squeeze1x1_b:fire7/expand1x1_w:fire7/expand1x1_b:fire7/expand3x3_w:fire7/expand3x3_b:fire8/squeeze1x1_w:fire8/squeeze1x1_b:fire8/expand1x1_w:fire8/expand1x1_b:fire8/expand3x3_w:fire8/expand3x3_b:fire9/squeeze1x1_w:fire9/squeeze1x1_b:fire9/expand1x1_w:fire9/expand1x1_b:fire9/expand3x3_w:fire9/expand3x3_b:conv10_w:conv10_bBprob -------------------------------------------------------------------------------- /package/caffemodel2-deepscale-squeezenet-1.1/deploy.prototxt: -------------------------------------------------------------------------------- 1 | # please cite: 2 | # @article{SqueezeNet, 3 | # Author = {Forrest N. Iandola and Matthew W. Moskewicz and Khalid Ashraf and Song Han and William J. Dally and Kurt Keutzer}, 4 | # Title = {SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and $<$1MB model size}, 5 | # Journal = {arXiv:1602.07360}, 6 | # Year = {2016} 7 | # } 8 | # 9 | # this file is by Hyunjun Kim (rmekdma); taken from: 10 | # https://github.com/DeepScale/SqueezeNet/pull/20 11 | # 12 | 13 | input: "data" 14 | input_shape: { 15 | dim: $#batch_size#$ 16 | dim: 3 17 | dim: 227 18 | dim: 227 19 | } 20 | layer { 21 | name: "conv1" 22 | type: "Convolution" 23 | bottom: "data" 24 | top: "conv1" 25 | convolution_param { 26 | num_output: 64 27 | kernel_size: 3 28 | stride: 2 29 | } 30 | } 31 | layer { 32 | name: "relu_conv1" 33 | type: "ReLU" 34 | bottom: "conv1" 35 | top: "conv1" 36 | } 37 | layer { 38 | name: "pool1" 39 | type: "Pooling" 40 | bottom: "conv1" 41 | top: "pool1" 42 | pooling_param { 43 | pool: MAX 44 | kernel_size: 3 45 | stride: 2 46 | } 47 | } 48 | layer { 49 | name: "fire2/squeeze1x1" 50 | type: "Convolution" 51 | bottom: "pool1" 52 | top: "fire2/squeeze1x1" 53 | convolution_param { 54 | num_output: 16 55 | kernel_size: 1 56 | } 57 | } 58 | layer { 59 | name: "fire2/relu_squeeze1x1" 60 | type: "ReLU" 61 | bottom: "fire2/squeeze1x1" 62 | top: "fire2/squeeze1x1" 63 | } 64 | layer { 65 | name: "fire2/expand1x1" 66 | type: "Convolution" 67 | bottom: "fire2/squeeze1x1" 68 | top: "fire2/expand1x1" 69 | convolution_param { 70 | num_output: 64 71 | kernel_size: 1 72 | } 73 | } 74 | layer { 75 | name: "fire2/relu_expand1x1" 76 | type: "ReLU" 77 | bottom: "fire2/expand1x1" 78 | top: "fire2/expand1x1" 79 | } 80 | layer { 81 | name: "fire2/expand3x3" 82 | type: "Convolution" 83 | bottom: "fire2/squeeze1x1" 84 | top: "fire2/expand3x3" 85 | convolution_param { 86 | num_output: 64 87 | pad: 1 88 | kernel_size: 3 89 | } 90 | } 91 | layer { 92 | name: "fire2/relu_expand3x3" 93 | type: "ReLU" 94 | bottom: "fire2/expand3x3" 95 | top: "fire2/expand3x3" 96 | } 97 | layer { 98 | name: "fire2/concat" 99 | type: "Concat" 100 | bottom: "fire2/expand1x1" 101 | bottom: "fire2/expand3x3" 102 | top: "fire2/concat" 103 | } 104 | layer { 105 | name: "fire3/squeeze1x1" 106 | type: "Convolution" 107 | bottom: "fire2/concat" 108 | top: "fire3/squeeze1x1" 109 | convolution_param { 110 | num_output: 16 111 | kernel_size: 1 112 | } 113 | } 114 | layer { 115 | name: "fire3/relu_squeeze1x1" 116 | type: "ReLU" 117 | bottom: "fire3/squeeze1x1" 118 | top: "fire3/squeeze1x1" 119 | } 120 | layer { 121 | name: "fire3/expand1x1" 122 | type: "Convolution" 123 | bottom: "fire3/squeeze1x1" 124 | top: "fire3/expand1x1" 125 | convolution_param { 126 | num_output: 64 127 | kernel_size: 1 128 | } 129 | } 130 | layer { 131 | name: "fire3/relu_expand1x1" 132 | type: "ReLU" 133 | bottom: "fire3/expand1x1" 134 | top: "fire3/expand1x1" 135 | } 136 | layer { 137 | name: "fire3/expand3x3" 138 | type: "Convolution" 139 | bottom: "fire3/squeeze1x1" 140 | top: "fire3/expand3x3" 141 | convolution_param { 142 | num_output: 64 143 | pad: 1 144 | kernel_size: 3 145 | } 146 | } 147 | layer { 148 | name: "fire3/relu_expand3x3" 149 | type: "ReLU" 150 | bottom: "fire3/expand3x3" 151 | top: "fire3/expand3x3" 152 | } 153 | layer { 154 | name: "fire3/concat" 155 | type: "Concat" 156 | bottom: "fire3/expand1x1" 157 | bottom: "fire3/expand3x3" 158 | top: "fire3/concat" 159 | } 160 | layer { 161 | name: "pool3" 162 | type: "Pooling" 163 | bottom: "fire3/concat" 164 | top: "pool3" 165 | pooling_param { 166 | pool: MAX 167 | kernel_size: 3 168 | stride: 2 169 | } 170 | } 171 | layer { 172 | name: "fire4/squeeze1x1" 173 | type: "Convolution" 174 | bottom: "pool3" 175 | top: "fire4/squeeze1x1" 176 | convolution_param { 177 | num_output: 32 178 | kernel_size: 1 179 | } 180 | } 181 | layer { 182 | name: "fire4/relu_squeeze1x1" 183 | type: "ReLU" 184 | bottom: "fire4/squeeze1x1" 185 | top: "fire4/squeeze1x1" 186 | } 187 | layer { 188 | name: "fire4/expand1x1" 189 | type: "Convolution" 190 | bottom: "fire4/squeeze1x1" 191 | top: "fire4/expand1x1" 192 | convolution_param { 193 | num_output: 128 194 | kernel_size: 1 195 | } 196 | } 197 | layer { 198 | name: "fire4/relu_expand1x1" 199 | type: "ReLU" 200 | bottom: "fire4/expand1x1" 201 | top: "fire4/expand1x1" 202 | } 203 | layer { 204 | name: "fire4/expand3x3" 205 | type: "Convolution" 206 | bottom: "fire4/squeeze1x1" 207 | top: "fire4/expand3x3" 208 | convolution_param { 209 | num_output: 128 210 | pad: 1 211 | kernel_size: 3 212 | } 213 | } 214 | layer { 215 | name: "fire4/relu_expand3x3" 216 | type: "ReLU" 217 | bottom: "fire4/expand3x3" 218 | top: "fire4/expand3x3" 219 | } 220 | layer { 221 | name: "fire4/concat" 222 | type: "Concat" 223 | bottom: "fire4/expand1x1" 224 | bottom: "fire4/expand3x3" 225 | top: "fire4/concat" 226 | } 227 | layer { 228 | name: "fire5/squeeze1x1" 229 | type: "Convolution" 230 | bottom: "fire4/concat" 231 | top: "fire5/squeeze1x1" 232 | convolution_param { 233 | num_output: 32 234 | kernel_size: 1 235 | } 236 | } 237 | layer { 238 | name: "fire5/relu_squeeze1x1" 239 | type: "ReLU" 240 | bottom: "fire5/squeeze1x1" 241 | top: "fire5/squeeze1x1" 242 | } 243 | layer { 244 | name: "fire5/expand1x1" 245 | type: "Convolution" 246 | bottom: "fire5/squeeze1x1" 247 | top: "fire5/expand1x1" 248 | convolution_param { 249 | num_output: 128 250 | kernel_size: 1 251 | } 252 | } 253 | layer { 254 | name: "fire5/relu_expand1x1" 255 | type: "ReLU" 256 | bottom: "fire5/expand1x1" 257 | top: "fire5/expand1x1" 258 | } 259 | layer { 260 | name: "fire5/expand3x3" 261 | type: "Convolution" 262 | bottom: "fire5/squeeze1x1" 263 | top: "fire5/expand3x3" 264 | convolution_param { 265 | num_output: 128 266 | pad: 1 267 | kernel_size: 3 268 | } 269 | } 270 | layer { 271 | name: "fire5/relu_expand3x3" 272 | type: "ReLU" 273 | bottom: "fire5/expand3x3" 274 | top: "fire5/expand3x3" 275 | } 276 | layer { 277 | name: "fire5/concat" 278 | type: "Concat" 279 | bottom: "fire5/expand1x1" 280 | bottom: "fire5/expand3x3" 281 | top: "fire5/concat" 282 | } 283 | layer { 284 | name: "pool5" 285 | type: "Pooling" 286 | bottom: "fire5/concat" 287 | top: "pool5" 288 | pooling_param { 289 | pool: MAX 290 | kernel_size: 3 291 | stride: 2 292 | } 293 | } 294 | layer { 295 | name: "fire6/squeeze1x1" 296 | type: "Convolution" 297 | bottom: "pool5" 298 | top: "fire6/squeeze1x1" 299 | convolution_param { 300 | num_output: 48 301 | kernel_size: 1 302 | } 303 | } 304 | layer { 305 | name: "fire6/relu_squeeze1x1" 306 | type: "ReLU" 307 | bottom: "fire6/squeeze1x1" 308 | top: "fire6/squeeze1x1" 309 | } 310 | layer { 311 | name: "fire6/expand1x1" 312 | type: "Convolution" 313 | bottom: "fire6/squeeze1x1" 314 | top: "fire6/expand1x1" 315 | convolution_param { 316 | num_output: 192 317 | kernel_size: 1 318 | } 319 | } 320 | layer { 321 | name: "fire6/relu_expand1x1" 322 | type: "ReLU" 323 | bottom: "fire6/expand1x1" 324 | top: "fire6/expand1x1" 325 | } 326 | layer { 327 | name: "fire6/expand3x3" 328 | type: "Convolution" 329 | bottom: "fire6/squeeze1x1" 330 | top: "fire6/expand3x3" 331 | convolution_param { 332 | num_output: 192 333 | pad: 1 334 | kernel_size: 3 335 | } 336 | } 337 | layer { 338 | name: "fire6/relu_expand3x3" 339 | type: "ReLU" 340 | bottom: "fire6/expand3x3" 341 | top: "fire6/expand3x3" 342 | } 343 | layer { 344 | name: "fire6/concat" 345 | type: "Concat" 346 | bottom: "fire6/expand1x1" 347 | bottom: "fire6/expand3x3" 348 | top: "fire6/concat" 349 | } 350 | layer { 351 | name: "fire7/squeeze1x1" 352 | type: "Convolution" 353 | bottom: "fire6/concat" 354 | top: "fire7/squeeze1x1" 355 | convolution_param { 356 | num_output: 48 357 | kernel_size: 1 358 | } 359 | } 360 | layer { 361 | name: "fire7/relu_squeeze1x1" 362 | type: "ReLU" 363 | bottom: "fire7/squeeze1x1" 364 | top: "fire7/squeeze1x1" 365 | } 366 | layer { 367 | name: "fire7/expand1x1" 368 | type: "Convolution" 369 | bottom: "fire7/squeeze1x1" 370 | top: "fire7/expand1x1" 371 | convolution_param { 372 | num_output: 192 373 | kernel_size: 1 374 | } 375 | } 376 | layer { 377 | name: "fire7/relu_expand1x1" 378 | type: "ReLU" 379 | bottom: "fire7/expand1x1" 380 | top: "fire7/expand1x1" 381 | } 382 | layer { 383 | name: "fire7/expand3x3" 384 | type: "Convolution" 385 | bottom: "fire7/squeeze1x1" 386 | top: "fire7/expand3x3" 387 | convolution_param { 388 | num_output: 192 389 | pad: 1 390 | kernel_size: 3 391 | } 392 | } 393 | layer { 394 | name: "fire7/relu_expand3x3" 395 | type: "ReLU" 396 | bottom: "fire7/expand3x3" 397 | top: "fire7/expand3x3" 398 | } 399 | layer { 400 | name: "fire7/concat" 401 | type: "Concat" 402 | bottom: "fire7/expand1x1" 403 | bottom: "fire7/expand3x3" 404 | top: "fire7/concat" 405 | } 406 | layer { 407 | name: "fire8/squeeze1x1" 408 | type: "Convolution" 409 | bottom: "fire7/concat" 410 | top: "fire8/squeeze1x1" 411 | convolution_param { 412 | num_output: 64 413 | kernel_size: 1 414 | } 415 | } 416 | layer { 417 | name: "fire8/relu_squeeze1x1" 418 | type: "ReLU" 419 | bottom: "fire8/squeeze1x1" 420 | top: "fire8/squeeze1x1" 421 | } 422 | layer { 423 | name: "fire8/expand1x1" 424 | type: "Convolution" 425 | bottom: "fire8/squeeze1x1" 426 | top: "fire8/expand1x1" 427 | convolution_param { 428 | num_output: 256 429 | kernel_size: 1 430 | } 431 | } 432 | layer { 433 | name: "fire8/relu_expand1x1" 434 | type: "ReLU" 435 | bottom: "fire8/expand1x1" 436 | top: "fire8/expand1x1" 437 | } 438 | layer { 439 | name: "fire8/expand3x3" 440 | type: "Convolution" 441 | bottom: "fire8/squeeze1x1" 442 | top: "fire8/expand3x3" 443 | convolution_param { 444 | num_output: 256 445 | pad: 1 446 | kernel_size: 3 447 | } 448 | } 449 | layer { 450 | name: "fire8/relu_expand3x3" 451 | type: "ReLU" 452 | bottom: "fire8/expand3x3" 453 | top: "fire8/expand3x3" 454 | } 455 | layer { 456 | name: "fire8/concat" 457 | type: "Concat" 458 | bottom: "fire8/expand1x1" 459 | bottom: "fire8/expand3x3" 460 | top: "fire8/concat" 461 | } 462 | layer { 463 | name: "fire9/squeeze1x1" 464 | type: "Convolution" 465 | bottom: "fire8/concat" 466 | top: "fire9/squeeze1x1" 467 | convolution_param { 468 | num_output: 64 469 | kernel_size: 1 470 | } 471 | } 472 | layer { 473 | name: "fire9/relu_squeeze1x1" 474 | type: "ReLU" 475 | bottom: "fire9/squeeze1x1" 476 | top: "fire9/squeeze1x1" 477 | } 478 | layer { 479 | name: "fire9/expand1x1" 480 | type: "Convolution" 481 | bottom: "fire9/squeeze1x1" 482 | top: "fire9/expand1x1" 483 | convolution_param { 484 | num_output: 256 485 | kernel_size: 1 486 | } 487 | } 488 | layer { 489 | name: "fire9/relu_expand1x1" 490 | type: "ReLU" 491 | bottom: "fire9/expand1x1" 492 | top: "fire9/expand1x1" 493 | } 494 | layer { 495 | name: "fire9/expand3x3" 496 | type: "Convolution" 497 | bottom: "fire9/squeeze1x1" 498 | top: "fire9/expand3x3" 499 | convolution_param { 500 | num_output: 256 501 | pad: 1 502 | kernel_size: 3 503 | } 504 | } 505 | layer { 506 | name: "fire9/relu_expand3x3" 507 | type: "ReLU" 508 | bottom: "fire9/expand3x3" 509 | top: "fire9/expand3x3" 510 | } 511 | layer { 512 | name: "fire9/concat" 513 | type: "Concat" 514 | bottom: "fire9/expand1x1" 515 | bottom: "fire9/expand3x3" 516 | top: "fire9/concat" 517 | } 518 | layer { 519 | name: "drop9" 520 | type: "Dropout" 521 | bottom: "fire9/concat" 522 | top: "fire9/concat" 523 | dropout_param { 524 | dropout_ratio: 0.5 525 | } 526 | } 527 | layer { 528 | name: "conv10" 529 | type: "Convolution" 530 | bottom: "fire9/concat" 531 | top: "conv10" 532 | convolution_param { 533 | num_output: 1000 534 | kernel_size: 1 535 | } 536 | } 537 | layer { 538 | name: "relu_conv10" 539 | type: "ReLU" 540 | bottom: "conv10" 541 | top: "conv10" 542 | } 543 | layer { 544 | name: "pool10" 545 | type: "Pooling" 546 | bottom: "conv10" 547 | top: "pool10" 548 | pooling_param { 549 | pool: AVE 550 | global_pooling: true 551 | } 552 | } 553 | layer { 554 | name: "prob" 555 | type: "Softmax" 556 | bottom: "pool10" 557 | top: "prob" 558 | } 559 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![compatibility](https://github.com/ctuning/ck-guide-images/blob/master/ck-compatible.svg)](https://github.com/ctuning/ck) 2 | [![automation](https://github.com/ctuning/ck-guide-images/blob/master/ck-artifact-automated-and-reusable.svg)](http://cTuning.org/ae) 3 | [![workflow](https://github.com/ctuning/ck-guide-images/blob/master/ck-workflow.svg)](http://cKnowledge.org) 4 | 5 | [![DOI](https://zenodo.org/badge/90728442.svg)](https://zenodo.org/badge/latestdoi/90728442) 6 | [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) 7 | 8 | # Unification of AI for collaborative experimentation and optimization using Collective Knowledge workflow framework with common JSON API 9 | 10 | *Note that Caffe2 moved to [PyTorch](https://github.com/pytorch/pytorch) GitHub source tree, so some packages here may not work correctly.* 11 | 12 | ## Introduction 13 | 14 | After spending most of our "research" time not on AI innovation but on dealing with numerous 15 | and ever changing AI engines, their API, and the whole software and hardware stack, 16 | we decided to take an alternative approach. 17 | 18 | [![logo](http://cknowledge.org/images/ai-cloud-resize.png)](http://cKnowledge.org/ai) 19 | 20 | We started adding existing AI frameworks including [Caffe](https://github.com/dividiti/ck-caffe), 21 | [Caffe2](https://github.com/ctuning/ck-caffe2), [TensorFlow](https://github.com/ctuning/ck-tensorflow), 22 | [MXNet](https://github.com/ctuning/ck-mxnet), [CK-PyTorch](https://github.com/ctuning/ck-pytorch), 23 | [CNTK](https://github.com/ctuning/ck-cntk) 24 | and [MVNC](https://github.com/ctuning/ck-mvnc). 25 | 26 | to the non-intrusive open-source [Collective Knowledge workflow framework (CK)](https://github.com/ctuning/ck). 27 | CK allows to plug in various versions of AI frameworks together with libraries, compilers, tools, models 28 | and data sets as [unified and reusable components with JSON API](http://cKnowledge.org/ai-artifacts), 29 | automate and customize their installation across Linux, Windows, MacOS and Android (rather than using ad-hoc scripts) 30 | and provide simple JSON API for common operations such as prediction and training (see [demo](http://cKnowledge.org/ai/ck-api-demo)). 31 | 32 | At the same time, CK allows us to continuously optimize ([1](https://arxiv.org/abs/1506.06256), [2](http://doi.acm.org/10.1145/2909437.2909449)) 33 | the whole AI stack (SW/HW/models) across diverse platforms from mobile devices and IoT to supercomputers 34 | in terms of accuracy, execution time, power consumption, resource usage and other costs with the 35 | help of the community (see [public CK repo](http://cKnowledge.org/repo) 36 | and [reproducible and CK-powered AI/SW/HW co-design competitions at ACM/IEEE conferences](http://cKnowledge.org/request)). 37 | 38 | See [cKnowledge.org/ai](http://cKnowledge.org/ai) for more details. 39 | 40 | ## Maintainers 41 | * [dividiti](http://dividiti.com) - not actively maintained 42 | 43 | ## Example of Caffe and Caffe2 unified CPU installation on Ubuntu via CK 44 | 45 | Note that you need Python 2.x! 46 | 47 | ``` 48 | $ sudo apt install coreutils build-essential make cmake wget git python python-pip 49 | $ sudo pip install jupyter pandas numpy scipy matplotlib scikit-image scikit-learn pyyaml protobuf future google 50 | $ sudo pip install --upgrade beautifulsoup4 51 | $ sudo pip install --upgrade html5lib 52 | 53 | $ sudo pip install ck 54 | 55 | $ ck pull repo --url=https://github.com/dividiti/ck-caffe 56 | $ ck pull repo:ck-caffe2 57 | 58 | $ ck install package --tags=lib,caffe,vcpu --env.CAFFE_BUILD_PYTHON=ON 59 | $ ck install package --tags=lib,caffe2,vcpu 60 | ``` 61 | 62 | Using compiled Caffe (with python) as a virtual environment: 63 | ``` 64 | $ ck virtual env --tags=lib,caffe 65 | $ ipython 66 | ``` 67 | 68 | ## Dependencies for Windows 69 | 70 | We tested it with Anaconda Python 2.x (should be in path for pip). Note that only stable package currently works - 0.8.1 (there is an issue with custom protobuf in the master branch) 71 | 72 | ``` 73 | $ pip install jupyter pandas numpy scipy matplotlib scikit-image scikit-learn pyyaml protobuf future google 74 | $ pip install flask glog graphviz pydot python-nvd3 pyyaml requests scikit-image setuptools tornado 75 | $ pip install future hypothesis six 76 | $ pip install --upgrade beautifulsoup4 77 | $ pip install --upgrade html5lib 78 | ``` 79 | 80 | 81 | ## Example of Caffe2 unified CPU installation on Raspberry Pi 3+ 82 | 83 | 84 | ``` 85 | $ sudo apt install coreutils build-essential make cmake python python-pip libblas-dev python-scipy 86 | $ sudo apt install python-numpy python-pandas python-matplotlib python-scikit-image 87 | $ sudo pip install scikit-image pyyaml protobuf future google 88 | $ sudo pip install --upgrade beautifulsoup4 89 | $ sudo pip install --upgrade html5lib 90 | 91 | $ sudo pip install ck 92 | 93 | $ ck pull repo:ck-caffe2 94 | 95 | $ ck install package --tags=lib,caffe2,vcpu --env.CK_HOST_CPU_NUMBER_OF_PROCESSORS=2 --env.CAFFE2_CPU_FLAGS="-mfpu=neon -mfloat-abi=hard" 96 | ``` 97 | 98 | ## Example of Caffe and Caffe2 unified CUDA installation on Ubuntu via CK 99 | 100 | If you have CUDA-compatible GPGPU with drivers, CUDA and cuDNN installed, 101 | you can install Caffe and Caffe2 for GPGPU via CK as follows 102 | (CK will automatically find your CUDA installation): 103 | 104 | ``` 105 | $ ck install package:lib-caffe-bvlc-master-cuda-universal --env.CAFFE_BUILD_PYTHON=ON 106 | $ ck install package:lib-caffe-bvlc-master-cudnn-universal --env.CAFFE_BUILD_PYTHON=ON 107 | $ ck install package:lib-caffe2-master-eigen-cuda-universal --env.CAFFE_BUILD_PYTHON=ON 108 | ``` 109 | You can find detailed instructions to install Caffe (CPU, CUDA, OpenCL versions) via CK 110 | on Ubuntu, Gentoo, Yocto, Raspberry Pi, Odroid, Windows and Android [here](https://github.com/dividiti/ck-caffe/wiki/Installation). 111 | Caffe2 detailed instructions about customized CK builds are coming soon! 112 | 113 | ## Example of Caffe and Caffe2 unified classification on Ubuntu via CK 114 | 115 | ``` 116 | $ ck run program:caffe --cmd_key=classify 117 | $ ck run program:caffe2 --cmd_key=classify 118 | ``` 119 | 120 | Note, that Caffe2, besides some very useful improvements, also changed various support programs 121 | and API. However, our approach helped our collaborators hide these changes via CK API and thus 122 | protect higher-level experimental workflows! 123 | 124 | You can find and install additional Caffe and Caffe2 models via CK: 125 | ``` 126 | $ ck search package:* --tags=caffemodel 127 | $ ck search package:* --tags=caffemodel2 128 | 129 | $ ck install package:caffemodel-bvlc-googlenet 130 | $ ck install package:caffemodel-bvlc-alexnet 131 | 132 | $ ck install package:caffemodel2-deepscale-squeezenet-1.1 133 | $ ck install package:caffemodel2-resnet50 134 | ``` 135 | 136 | ## Collaborative and unified benchmarking of DNN 137 | 138 | Additional motivation to use CK wrappers for DNN is the possibility 139 | to assemble various experimental workflows, crowdsource experiments 140 | and engage with the community to collaboratively solve complex problems 141 | ([notes](https://www.researchgate.net/publication/304010295_Collective_Knowledge_Towards_RD_Sustainability)). 142 | For example, we added basic support to collaboratively evaluate various DNN engines 143 | via unified CK API: 144 | 145 | ``` 146 | $ ck crowdbench caffe --env.BATCH_SIZE=5 147 | $ ck crowdbench caffe2 --env.BATCH_SIZE=5 --user=i_want_to_ack_my_contribution 148 | ``` 149 | 150 | Performance results are continuously aggregated in the public [CK repository](http://cKnowledge.org/repo), 151 | however they can also be aggregated only on your local machine or in your workgroup - you just need to add flag "--local". 152 | 153 | ## Unified, multi-dimensional and multi-objective autotuning 154 | 155 | It is now possible to take advantage of our [universal multi-objective CK autotuner](https://github.com/ctuning/ck/wiki/Autotuning) 156 | to optimize Caffe. As a first simple example, we added batch size tuning via CK. You can invoke it as follows: 157 | 158 | ``` 159 | $ ck autotune caffe 160 | $ ck autotune caffe2 161 | ``` 162 | 163 | All results will be recorded in the local CK repository and 164 | you will be given command lines to plot graphs or replay experiments such as: 165 | ``` 166 | $ ck plot graph:{experiment UID} 167 | $ ck replay experiment:{experiment UID} --point={specific optimization point} 168 | ``` 169 | 170 | ## Collaborative and unified optimization of DNN 171 | 172 | We are now working to extend above autotuner and crowdsource optimization 173 | of the whole SW/HW/model/data set stack ([paper 1](https://scholar.google.com/citations?view_op=view_citation&hl=en&user=IwcnpkwAAAAJ&citation_for_view=IwcnpkwAAAAJ:maZDTaKrznsC), 174 | [paper 2](https://arxiv.org/abs/1506.06256)). 175 | 176 | We would like to thank the community for their interest and feedback about 177 | this collaborative AI optimization approach powered by CK 178 | at [ARM TechCon'16](https://github.com/ctuning/ck/wiki/Demo-ARM-TechCon'16) 179 | and the Embedded Vision Summit'17 - so please stay tuned ;) ! 180 | 181 | [![logo](http://cKnowledge.org/images/dividiti_arm_stand.jpg)](https://www.researchgate.net/publication/304010295_Collective_Knowledge_Towards_RD_Sustainability) 182 | 183 | ## Unified DNN API via CK 184 | 185 | We added similar support to install, use and evaluate [TensorFlow](https://www.tensorflow.org) via CK: 186 | 187 | ``` 188 | $ ck pull repo:ck-tensorflow 189 | 190 | $ ck install lib-tensorflow-1.1.0-cpu 191 | $ ck install lib-tensorflow-1.1.0-cuda 192 | 193 | $ ck run program:tensorflow --cmd_key=classify 194 | 195 | $ ck crowdbench tensorflow --env.BATCH_SIZE=5 196 | 197 | $ ck autotune tensorflow 198 | ``` 199 | 200 | ## Online demo of a unified CK-AI API 201 | 202 | * [Simple demo](http://cknowledge.org/repo/web.php?template=ck-ai-basic) to classify images with 203 | continuous optimization of DNN engines underneath, sharing of mispredictions and creation of a community training set; 204 | and to predict compiler optimizations based on program features. 205 | 206 | ## Realistic/representative training sets 207 | 208 | We provided an option in all our AI crowd-tuning tools to let the community report 209 | and share mispredictions (images, correct label and wrong misprediction) 210 | to gradually and collaboratively build realistic data/training sets: 211 | * [Public repository (see "mispredictions and unexpected behavior)](http://cknowledge.org/repo/web.php?action=index&module_uoa=wfe&native_action=show&native_module_uoa=program.optimization) 212 | * [Misclassified images via CK-based AI web-service](http://cknowledge.org/repo/web.php?action=index&module_uoa=wfe&native_action=show&native_module_uoa=program.optimization) 213 | 214 | ## Next steps 215 | 216 | We would like to improve Caffe2 installation via CK on Android similar to [CK-Caffe](https://github.com/dividiti/ck-caffe/wiki/Installation). 217 | 218 | ## Long term vision 219 | 220 | CK-Caffe, CK-Caffe2, CK-Tensorflow are part of an ambitious long-term and community-driven 221 | project to enable collaborative and systematic optimization 222 | of realistic workloads across diverse hardware 223 | in terms of performance, energy usage, accuracy, reliability, 224 | hardware price and other costs 225 | ([ARM TechCon'16 talk and demo](https://github.com/ctuning/ck/wiki/Demo-ARM-TechCon'16), 226 | [DATE'16](http://tinyurl.com/zyupd5v), 227 | [CPC'15](http://arxiv.org/abs/1506.06256)). 228 | 229 | We are working with the community to unify and crowdsource performance analysis 230 | and tuning of various DNN frameworks (or any realistic workload) 231 | using Collective Knowledge Technology: 232 | * [Android app for DNN crowd-benchmarking and crowd-tuning](http://cKnowledge.org/android-apps.html) 233 | * [CK-TensorFlow](https://github.com/ctuning/ck-tensorflow) 234 | * [CK-Caffe](https://github.com/dividiti/ck-caffe) 235 | * [CK-Caffe2](https://github.com/ctuning/ck-caffe2) 236 | 237 | We continue gradually exposing various design and optimization 238 | choices including full parameterization of existing models. 239 | 240 | ## Open R&D challenges 241 | 242 | We use crowd-benchmarking and crowd-tuning of such realistic workloads across diverse hardware for 243 | [open academic and industrial R&D challenges](https://github.com/ctuning/ck/wiki/Research-and-development-challenges.mediawiki) - 244 | join this community effort! 245 | 246 | ## Related Publications with long term vision 247 | 248 | ``` 249 | @inproceedings{ck-date16, 250 | title = {{Collective Knowledge}: towards {R\&D} sustainability}, 251 | author = {Fursin, Grigori and Lokhmotov, Anton and Plowman, Ed}, 252 | booktitle = {Proceedings of the Conference on Design, Automation and Test in Europe (DATE'16)}, 253 | year = {2016}, 254 | month = {March}, 255 | url = {https://www.researchgate.net/publication/304010295_Collective_Knowledge_Towards_RD_Sustainability} 256 | } 257 | 258 | @inproceedings{cm:29db2248aba45e59:cd11e3a188574d80, 259 | url = {http://arxiv.org/abs/1506.06256}, 260 | title = {{Collective Mind, Part II: Towards Performance- and Cost-Aware Software Engineering as a Natural Science.}}, 261 | author = {Fursin, Grigori and Memon, Abdul and Guillon, Christophe and Lokhmotov, Anton}, 262 | booktitle = {{18th International Workshop on Compilers for Parallel Computing (CPC'15)}}, 263 | publisher = {ArXiv}, 264 | year = {2015}, 265 | month = January, 266 | pdf = {http://arxiv.org/pdf/1506.06256v1} 267 | } 268 | 269 | ``` 270 | 271 | * [All references with BibTex related to CK concept](https://github.com/ctuning/ck/wiki/Publications) 272 | 273 | ## Testimonials and awards 274 | 275 | * 2017: We received [CGO test of time award](http://dividiti.blogspot.fr/2017/02/we-received-test-of-time-award-for-our.html) for our CGO'07 paper which later motivated creation of [Collective Knowledge](https://github.com/ctuning/ck) 276 | * 2015: ARM and the cTuning foundation use CK to accelerate computer engineering: [HiPEAC Info'45 page 17](https://www.hipeac.net/assets/public/publications/newsletter/hipeacinfo45.pdf), [ARM TechCon'16 presentation and demo](https://github.com/ctuning/ck/wiki/Demo-ARM-TechCon'16), [public CK repo](https://github.com/ctuning/ck-wa) 277 | 278 | ## Feedback 279 | 280 | Get in touch with CK-AI developers [here](https://github.com/ctuning/ck/wiki/Contacts). Also feel free to engage with our community via this mailing list: 281 | * http://groups.google.com/group/collective-knowledge 282 | --------------------------------------------------------------------------------