diff --git a/CHANGES b/CHANGES index a0734ec..0e30193 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,5 @@ * 2017.10.09 - added package:lib-armcl-* packages (CPU/OpenCL with master/17.09 version) + - moved outdated package:lib-acl-* to ck-old-packages repo * 2017.06.01 - removing patch3 from CLBlast (was added to mainline) diff --git a/package/.cm/alias-a-lib-acl-17.06 b/package/.cm/alias-a-lib-acl-17.06 deleted file mode 100644 index 542c412..0000000 --- a/package/.cm/alias-a-lib-acl-17.06 +++ /dev/null @@ -1 +0,0 @@ -70e4c868f4b0f404 diff --git a/package/.cm/alias-a-lib-acl-dev-universal b/package/.cm/alias-a-lib-acl-dev-universal deleted file mode 100644 index e91f792..0000000 --- a/package/.cm/alias-a-lib-acl-dev-universal +++ /dev/null @@ -1 +0,0 @@ -abf812a129984483 diff --git a/package/.cm/alias-a-lib-acl-master-universal b/package/.cm/alias-a-lib-acl-master-universal deleted file mode 100644 index c65ac00..0000000 --- a/package/.cm/alias-a-lib-acl-master-universal +++ /dev/null @@ -1 +0,0 @@ -c979c5ee89c04b82 diff --git a/package/.cm/alias-a-lib-acl-opencl-17.06 b/package/.cm/alias-a-lib-acl-opencl-17.06 deleted file mode 100644 index 2e0f975..0000000 --- a/package/.cm/alias-a-lib-acl-opencl-17.06 +++ /dev/null @@ -1 +0,0 @@ -b420f42d04d49a98 diff --git a/package/.cm/alias-u-70e4c868f4b0f404 b/package/.cm/alias-u-70e4c868f4b0f404 deleted file mode 100644 index e5807d5..0000000 --- a/package/.cm/alias-u-70e4c868f4b0f404 +++ /dev/null @@ -1 +0,0 @@ -lib-acl-17.06 diff --git a/package/.cm/alias-u-abf812a129984483 b/package/.cm/alias-u-abf812a129984483 deleted file mode 100644 index ac70368..0000000 --- a/package/.cm/alias-u-abf812a129984483 +++ /dev/null @@ -1 +0,0 @@ -lib-acl-dev-universal diff --git a/package/.cm/alias-u-b420f42d04d49a98 b/package/.cm/alias-u-b420f42d04d49a98 deleted file mode 100644 index 68ffc27..0000000 --- a/package/.cm/alias-u-b420f42d04d49a98 +++ /dev/null @@ -1 +0,0 @@ -lib-acl-opencl-17.06 diff --git a/package/.cm/alias-u-c979c5ee89c04b82 b/package/.cm/alias-u-c979c5ee89c04b82 deleted file mode 100644 index 17036a6..0000000 --- a/package/.cm/alias-u-c979c5ee89c04b82 +++ /dev/null @@ -1 +0,0 @@ -lib-acl-master-universal diff --git a/package/lib-acl-17.06/.cm/desc.json b/package/lib-acl-17.06/.cm/desc.json deleted file mode 100644 index 0967ef4..0000000 --- a/package/lib-acl-17.06/.cm/desc.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/package/lib-acl-17.06/.cm/info.json b/package/lib-acl-17.06/.cm/info.json deleted file mode 100644 index 32aff7e..0000000 --- a/package/lib-acl-17.06/.cm/info.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "backup_data_uid": "70e4c868f4b0f404", - "backup_module_uid": "1dc07ee0f4742028", - "backup_module_uoa": "package", - "control": { - "author": "Grigori Fursin", - "author_email": "Grigori.Fursin@cTuning.org", - "author_webpage": "http://fursin.net", - "copyright": "See CK COPYRIGHT.txt for copyright details", - "engine": "CK", - "iso_datetime": "2017-08-31T11:15:43.541699", - "license": "See CK LICENSE.txt for licensing details", - "version": [ - "1", - "9", - "1", - "1" - ] - }, - "data_name": "lib-acl-17.06" -} diff --git a/package/lib-acl-17.06/.cm/meta.json b/package/lib-acl-17.06/.cm/meta.json deleted file mode 100644 index e185675..0000000 --- a/package/lib-acl-17.06/.cm/meta.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "customize": { - "extra_dir": "", - "git_src_dir": "src", - "install_env": { - "PACKAGE_AUTOGEN": "NO", - "PACKAGE_GIT": "YES", - "PACKAGE_SUB_DIR": "src", - "PACKAGE_SUB_DIR1": "src", - "PACKAGE_GIT_CHECKOUT": "v17.06", - "PACKAGE_URL": "https://github.com/ARM-software/ComputeLibrary", - "PACKAGE_SKIP_LINUX_MAKE": "YES", - "USE_ARM64_V82A": "OFF", - "USE_BARE_METAL": "OFF", - "USE_CPPTHREADS": "ON", - "USE_NEON": "ON", - "USE_OPENMP": "OFF" - }, - "version": "17.06" - }, - "deps": { - "compiler": { - "local": "yes", - "name": "C++ compiler", - "sort": 10, - "tags": "compiler,lang-cpp" - } - }, - "end_full_path": { - "android": "install$#sep#$lib$#sep#$libarm_compute.a", - "linux": "install/lib/libarm_compute.a", - "mingw": "install\\lib\\arm_compute.a", - "win": "install\\lib\\arm_compute.lib" - }, - "need_cpu_info": "yes", - "only_for_host_os_tags": [ - "windows", - "linux" - ], - "only_for_target_os_tags": [ - "windows", - "linux", - "android" - ], - "process_script": "install", - "soft_uoa": "fc544df6941a5491", - "suggested_path": "lib-acl", - "tags": [ - "lib", - "arm", - "acl", - "arm-compute-library", - "vneon", - "vmaster" - ], - "use_scripts_from_another_entry": { - "data_uoa": "cd9ccc74060b3d18", - "module_uoa": "script" - } -} diff --git a/package/lib-acl-17.06/Makefile b/package/lib-acl-17.06/Makefile deleted file mode 100644 index abb772a..0000000 --- a/package/lib-acl-17.06/Makefile +++ /dev/null @@ -1,32 +0,0 @@ - -CXX=$(CK_CXX) -AR_RCS=$(CK_LB) - -CXXFLAGS=$(CK_COMPILER_FLAGS_OBLIGATORY) $(CK_FLAGS_STATIC_LIB) $(CK_CXXFLAGS) $(CK_FLAG_PREFIX_INCLUDE).. -MMD -MP -LDFLAGS=$(CK_LFLAGS) - -SRC=$(CK_SRC_FILES) -OBJ=$(SRC:.cpp=.o) -DEP=$(SRC:.cpp=.d) - -TARGET_DIR=$(INSTALL_DIR)/install/lib -LIB_STATIC=$(TARGET_DIR)/$(CK_TARGET_LIB)$(CK_LIB_EXT) -LIB_DYNAMIC=$(TARGET_DIR)/$(CK_TARGET_LIB)$(CK_DLL_EXT) - -.PHONY: all clean - -all: $(LIB_STATIC) $(LIB_DYNAMIC) - --include $(DEP) - -$(LIB_STATIC): $(OBJ) | $(TARGET_DIR) - $(AR_RCS) $@ $(OBJ) - -$(LIB_DYNAMIC): $(OBJ) | $(TARGET_DIR) - $(CXX) $(CK_FLAGS_DLL) $(CXXFLAGS) $(CK_FLAGS_OUTPUT) $(LIB_DYNAMIC) $(CK_FLAGS_DLL_EXTRA) $(CK_LD_FLAGS_MISC) $(CK_LD_FLAGS_EXTRA) $(OBJ) $(CK_LFLAGS) - -clean: - rm -rf $(OBJ) $(LIB_STATIC) $(LIB_DYNAMIC) $(DEP) - -$(TARGET_DIR): - mkdir -p $@ diff --git a/package/lib-acl-17.06/README.md b/package/lib-acl-17.06/README.md deleted file mode 100644 index 78d95a4..0000000 --- a/package/lib-acl-17.06/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Grigori Fursin converted the original sconscript from the [ARM Compute -Library](https://github.com/ctuning/ck-wa) (ACL) into the CK format in order to -add ACL to CK auto/crowd-tuning workflows. diff --git a/package/lib-acl-17.06/build.bat b/package/lib-acl-17.06/build.bat deleted file mode 100644 index 6fce3f9..0000000 --- a/package/lib-acl-17.06/build.bat +++ /dev/null @@ -1,19 +0,0 @@ -@echo off - -rem ******************************************************************************************************************************* - -mkdir "%INSTALL_DIR%\src\obj" -cd "%INSTALL_DIR%\src\obj" - -"%CK_MAKE%" -j %CK_HOST_CPU_NUMBER_OF_PROCESSORS% -f "%ORIGINAL_PACKAGE_DIR%\Makefile" %* -set code=%errorlevel% - -if %code% equ 0 ( - cd .. - xcopy arm_compute ..\install\include\arm_compute /e /c /i /y - xcopy tests ..\install\include\arm_compute\tests /e /c /i /y -) - -cd "%INSTALL_DIR%" - -exit /b %code% diff --git a/package/lib-acl-17.06/build.sh b/package/lib-acl-17.06/build.sh deleted file mode 100644 index b6769d9..0000000 --- a/package/lib-acl-17.06/build.sh +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/bash - -# -# Make script for CK libraries -# (depends on configured/installed compilers via CK) -# -# See CK LICENSE.txt for licensing details. -# See CK COPYRIGHT.txt for copyright details. -# -# Developer(s): -# - Grigori Fursin, 2015-2017 -# - Anton Lokhmotov, 2017 -# - Dmitry Savenko, 2017 -# - -# ****************************************************************************** - -mkdir -p ${INSTALL_DIR}/src/obj -cd ${INSTALL_DIR}/src/obj - -${CK_MAKE} -j ${CK_HOST_CPU_NUMBER_OF_PROCESSORS} -f ${ORIGINAL_PACKAGE_DIR}/Makefile $@ - -cd .. -rm -rf ../install/include -mkdir ../install/include -cp -rf arm_compute ../install/include -cp -rf tests ../install/include/arm_compute diff --git a/package/lib-acl-17.06/custom.py b/package/lib-acl-17.06/custom.py deleted file mode 100644 index 1e6ce3c..0000000 --- a/package/lib-acl-17.06/custom.py +++ /dev/null @@ -1,365 +0,0 @@ -#!/usr/bin/python - -# -# Developers: -# - Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net -# - Anton Lokhmotov, anton@dividiti.com -# - -import os -import sys -import json -import errno - -############################################################################## -# customize installation - -def setup(i): - """ - Input: { - cfg - meta of the soft entry - self_cfg - meta of module soft - ck_kernel - import CK kernel module (to reuse functions) - - host_os_uoa - host OS UOA - host_os_uid - host OS UID - host_os_dict - host OS meta - - target_os_uoa - target OS UOA - target_os_uid - target OS UID - target_os_dict - target OS meta - - target_device_id - target device ID (if via ADB) - - tags - list of tags used to search this entry - - env - updated environment vars from meta - customize - updated customize vars from meta - - deps - resolved dependencies for this soft - - interactive - if 'yes', can ask questions, otherwise quiet - - path - path to entry (with scripts) - install_path - installation path - } - - Output: { - return - return code = 0, if successful - > 0, if error - (error) - error text if return > 0 - - (install_env) - prepare environment to be used before the install script - } - - """ - - import os - import shutil - import glob - - # Get variables - o=i.get('out','') - - ck=i['ck_kernel'] - - hos=i['host_os_uoa'] - tos=i['target_os_uoa'] - - hosd=i['host_os_dict'] - tosd=i['target_os_dict'] - - hbits=hosd.get('bits','') - tbits=tosd.get('bits','') - - hname=hosd.get('ck_name','') # win, linux - hname2=hosd.get('ck_name2','') # win, mingw, linux, android - tname2=tosd.get('ck_name2','') # win, mingw, linux, android - - macos=hosd.get('macos','') # yes/no - - hft=i.get('features',{}) # host platform features - habi=hft.get('os',{}).get('abi','') # host ABI (only for ARM-based); if you want to get target ABI, use tosd ... - # armv7l, etc... - - p=i['path'] - - env=i['new_env'] - - pi=i.get('install_path','') - - cus=i['customize'] - ie=cus.get('install_env',{}) - nie={} # new env - - deps=i.get('deps','') - - # Converting sconscript to CK format - flags = ['-D_GLIBCXX_USE_NANOSLEEP','-Wno-deprecated-declarations','-Wall','-DARCH_ARM', - '-Wextra','-Wno-unused-parameter','-pedantic','-Wdisabled-optimization','-Wformat=2', - '-Winit-self','-Wstrict-overflow=2','-Wswitch-default', - '-fpermissive','-std=gnu++11','-Wno-vla','-Woverloaded-virtual', - '-Wctor-dtor-privacy','-Wsign-promo','-Weffc++','-Wno-format-nonliteral','-Wno-overlength-strings','-Wno-strict-overflow'] - - lcore_flags=['-ldl'] - lflags=['-ldl'] - - # Check various target params from CK - cpu_features=tosd.get('cpu_features',{}) - tneon=cpu_features.get('arm_fp_neon','') - thardfp=cpu_features.get('arm_fp_hard','') - - # ABI for Android - tabi=tosd.get('abi','') - if tabi=='': # Means host - tabi=habi # Means ARM - if tabi=='': # Means x86 (indirectly) - tabi='x86' - if str(tbits)=='64': tabi='x86_64' - - neon=False - if env.get('USE_NEON','').lower()=='on' or tneon=='yes': - neon=True - nie['USE_NEON']='ON' - - hardfp=False - if env.get('USE_BARE_METAL','').lower()=='on' or thardfp=='yes': - hardfp=True - nie['USE_BARE_METAL']='ON' - - if neon and 'x86' in tabi: - return {'return':1, 'error':'Cannot compile NEON for x86'} - - compiler_env=deps['compiler'].get('dict',{}).get('env',{}) - cxx=compiler_env['CK_CXX'] - - if compiler_env.get('CK_ENV_LIB_STDCPP_INCLUDE','')!='': - flags+=['-I'+compiler_env['CK_ENV_LIB_STDCPP_INCLUDE']] - if compiler_env.get('CK_ENV_LIB_STDCPP_INCLUDE_EXTRA','')!='': - flags+=['-I'+compiler_env['CK_ENV_LIB_STDCPP_INCLUDE_EXTRA']] - -# env['CK_ENV_LIB_STDCPP_STATIC']=libstdcpppath+sep+'libgnustl_static.a' -# env['CK_ENV_LIB_STDCPP_DYNAMIC']=libstdcpppath+sep+'libgnustl_shared.so' -# env['CK_ENV_LIB_STDCPP_INCLUDE_EXTRA']=libstdcpppath+sep+'include' - - - if 'clang++' in cxx: - flags += ['-Wno-format-nonliteral','-Wno-deprecated-increment-bool','-Wno-vla-extension','-Wno-mismatched-tags'] - elif 'g++' in cxx: - flags += ['-Wlogical-op','-Wnoexcept','-Wstrict-null-sentinel'] - - if env.get('USE_CPPTHREADS','').lower()=='on': - flags += ['-DARM_COMPUTE_CPP_SCHEDULER=1'] - - if env.get('USE_OPENMP','').lower()=='on': - if 'clang++' in cxx: - return {'return':1, 'error':'Clang does not support OpenMP. Use --env.USE_CPPTHREADS=ON'} - - flags += ['-DARM_COMPUTE_OPENMP_SCHEDULER=1','-fopenmp'] - lflags += ['-fopenmp'] - lcore_flags += ['-fopenmp'] - - if 'v7a' in tabi: - flags += ['-march=armv7-a','-mthumb','-mfpu=neon'] - - if hardfp: - flags += ['-mfloat-abi=hard'] - elif tname2=='android': - flags += ['-mfloat-abi=softfp'] - elif 'arm64' in tabi: - flags += ['-march=armv8-a'] - elif env.get('USE_ARM64_V82A','').lower()=='on': - flags += ['-march=armv8.2-a+fp16+simd'] - flags += ['-DARM_COMPUTE_ENABLE_FP16'] - elif tabi=='x86': - flags += ['-m32'] - elif tabi=='x86_64': - flags += ['-m64'] - - if tname2=='android': - flags += ['-DANDROID'] - if compiler_env.get('CK_ENV_LIB_STDCPP_STATIC','')!='': - lflags+=[compiler_env['CK_ENV_LIB_STDCPP_STATIC']] - lcore_flags+=[compiler_env['CK_ENV_LIB_STDCPP_STATIC']] -# Done via CK -# lflags+=['-static-libstdc++'] -# lcore_flags+=['-static-libstdc++'] - elif env.get('USE_BARE_METAL','').lower()=='on': - flags += ['-fPIC','-DNO_MULTI_THREADING'] - lflags+=['-static'] - lcore_flags+=['-static'] - else: - lflags += ['-lpthread'] - - flags += ['-O3','-ftree-vectorize'] - - nie['CXXFLAGS']=' '.join(flags) - nie['LFLAGS']=' '.join(lflags) - nie['LCORE_FLAGS']=' '.join(lcore_flags) - - return {'return':0, 'install_env':nie} - -############################################################################## -# customize installation after download - -def _slash(s): - return s.replace('\\','/') - -def post_setup(i): - """ - Input: { - The same as in setup(i) - - new_env - last env (can be directly updated) - } - - Output: { - return - return code = 0, if successful - > 0, if error - (error) - error text if return > 0 - } - - """ - - import os - import shutil - import glob - import subprocess - - # Get variables - o=i.get('out','') - - ck=i['ck_kernel'] - - cfg=i.get('cfg',{}) - hosd=i['host_os_dict'] - tosd=i['target_os_dict'] - env=i.get('new_env',{}) - deps=i.get('deps',{}) - - hname=hosd.get('ck_name','') # win, linux - hname2=hosd.get('ck_name2','') # win, mingw, linux, android - tname2=tosd.get('ck_name2','') # win, mingw, linux, android - winh=hosd.get('windows_base','') - - lib_prefix='' - if winh!='yes' or tname2=='android': - lib_prefix='lib' - - flags=env.get('CXXFLAGS','') - lflags=env.get('LFLAGS','') - lcore_flags=env.get('LCORE_FLAGS','') - bare_metal=env.get('USE_BARE_METAL','').lower() - use_neon=env.get('USE_NEON','').lower() - - pop=i.get('path_original_package','') - pi=i.get('install_path','') - pi1=cfg.get('customize',{}).get('extra_dir','') - if pi1=='': pi1=cfg.get('customize',{}).get('git_src_dir','') - - build_dir=pi - if pi1!='': build_dir=os.path.join(pi,pi1) - - if not os.path.isdir(build_dir): - return {'return':1, 'error':'Something is wrong - build directory is not there ('+build_dir+')'} - - os.chdir(build_dir) - - xcore_files = glob.glob('src/core/*.cpp') - xcore_files += glob.glob('src/core/CPP/*.cpp') - - xfiles = glob.glob('src/runtime/*.cpp') - - embed_files = [] - xcore_files += glob.glob('src/core/CPP/kernels/*.cpp') - - # CLHarrisCorners uses the Scheduler to run CPP kernels - xfiles += glob.glob('src/runtime/CPP/SingleThreadScheduler.cpp') - - if bare_metal=='on': - if env.get('USE_CPPTHREADS','').lower()=='on' or env.get('USE_OPENMP','').lower()=='on': - return {'return':1, 'error':'OpenMP and C++11 threads not supported in bare_metal. use --env.USE_CPPTHREADS=OFF --env.USE_OPENMP=OFF'} - else: - if env.get('USE_CPPTHREADS','').lower()=='on': - xfiles += glob.glob('src/runtime/CPP/CPPScheduler.cpp') - if env.get('USE_OPENMP','').lower()=='on': - xfiles += glob.glob('src/runtime/OMP/OMPScheduler.cpp') - - if use_neon=='on': - xcore_files += glob.glob('src/core/NEON/*.cpp') - xcore_files += glob.glob('src/core/NEON/kernels/*.cpp') - xfiles += glob.glob('src/runtime/NEON/*.cpp') - xfiles += glob.glob('src/runtime/NEON/functions/*.cpp') - - # Generate string with build options library version to embed in the library: - r=ck.run_and_get_stdout({'cmd':['git','rev-parse','HEAD']}) - if r['return']==0 and r['return_code']==0: - git_hash=r['stdout'].strip() - - version_filename = 'arm_compute_version.embed' #"%s/arm_compute_version.embed" % os.path.dirname(glob.glob("src/core/*")[0].rstr()) - build_info = "\"arm_compute_version=%s Build options: %s Git hash=%s\"" % ('', '', git_hash.strip()) - - r=ck.save_text_file({'text_file':version_filename, 'string':build_info}) - if r['return']>0: return r - - # Common functionality to build the core lib or the core+runtime libs. - def build(lib_target, files, link_flags, hosd, deps, pop, bare_metal, build_script_name): - oext=deps.get('compiler',{}).get('dict',{}).get('env',{}).get('CK_OBJ_EXT','') - sext=hosd.get('script_ext','') - eset=hosd.get('env_set','') - eifs=hosd.get('env_quotes_if_space','') - - # Prepare obj names. - core_files='' - obj_core_files='' - for f in files: - f=_slash(f) - fo=os.path.splitext(f)[0]+oext - - core_files+=' ../'+f - obj_core_files+=' ../'+fo - - # Set up compiler env. - sb=hosd.get('batch_prefix','')+'\n' - - sb+=deps.get('compiler',{}).get('bat','')+'\n' - - sb+=eset+' INSTALL_DIR='+_slash(pi)+'\n\n' - sb+=eset+' BUILD_DIR='+_slash(build_dir)+'\n\n' - sb+=eset+' CK_TARGET_LIB='+_slash(lib_target)+'\n\n' - sb+=eset+' CK_BARE_METAL='+_slash(bare_metal)+'\n\n' - sb+=eset+' CK_CXXFLAGS='+_slash(eifs+flags+eifs)+'\n\n' - sb+=eset+' CK_LFLAGS='+_slash(eifs+link_flags+eifs)+'\n\n' - sb+=eset+' CK_SRC_FILES='+_slash(eifs+core_files+eifs)+'\n\n' - sb+=eset+' ORIGINAL_PACKAGE_DIR='+_slash(pop)+'\n\n' - sb+=eset+' CK_HOST_CPU_NUMBER_OF_PROCESSORS='+str(env.get('CK_HOST_CPU_NUMBER_OF_PROCESSORS', 1))+'\n\n' - - rest_params_var = '%*' if hname == 'win' else '$@' - sb+=hosd.get('env_call','')+' '+os.path.join(pop,'build'+sext) + ' ' + rest_params_var - - # Prepare build script - fn=os.path.join(pi, build_script_name + sext) - try: - os.makedirs(os.path.dirname(fn)) - except OSError as exc: - if exc.errno != errno.EEXIST: - raise - rx=ck.save_text_file({'text_file':fn, 'string':sb}) - if rx['return']>0: return rx - - # Set script as executable if required. - se=hosd.get('set_executable','') - if se!='': - x=se+' '+fn - rx=os.system(x) - - # Run script. - rx=os.system(fn) - - # Build the core lib. - build(lib_prefix+'arm_compute_core', xcore_files, lcore_flags, hosd, deps, pop, bare_metal, 'build_core') - - # Build the core and runtime libs. - build(lib_prefix+'arm_compute', xcore_files+xfiles, lflags, hosd, deps, pop, bare_metal, 'build') - - return {'return':0} diff --git a/package/lib-acl-dev-universal/.cm/desc.json b/package/lib-acl-dev-universal/.cm/desc.json deleted file mode 100644 index 0967ef4..0000000 --- a/package/lib-acl-dev-universal/.cm/desc.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/package/lib-acl-dev-universal/.cm/info.json b/package/lib-acl-dev-universal/.cm/info.json deleted file mode 100644 index 53f0172..0000000 --- a/package/lib-acl-dev-universal/.cm/info.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "backup_data_uid": "abf812a129984483", - "backup_module_uid": "1dc07ee0f4742028", - "backup_module_uoa": "package", - "control": { - "author": "Grigori Fursin", - "author_email": "Grigori.Fursin@cTuning.org", - "author_webpage": "http://fursin.net", - "copyright": "See CK COPYRIGHT.txt for copyright details", - "engine": "CK", - "iso_datetime": "2017-06-06T10:54:02.343740", - "license": "See CK LICENSE.txt for licensing details", - "version": [ - "1", - "9", - "1", - "1" - ] - }, - "data_name": "lib-acl-dev-universal" -} diff --git a/package/lib-acl-dev-universal/.cm/meta.json b/package/lib-acl-dev-universal/.cm/meta.json deleted file mode 100644 index a03f8ce..0000000 --- a/package/lib-acl-dev-universal/.cm/meta.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "customize": { - "extra_dir": "", - "git_src_dir": "src", - "install_env": { - "USE_NEON":"OFF", - "USE_BARE_METAL":"OFF", - "USE_ARM64_V82A":"OFF", - "USE_CPPTHREADS":"ON", - "USE_OPENMP":"OFF", - "USE_VALIDATION_TEST":"OFF", - "USE_BENCHMARK_TEST":"OFF", - "USE_OPENCL":"ON", - "USE_EMBEDDED_KERNELS":"OFF", - "PACKAGE_AUTOGEN": "NO", - "PACKAGE_GIT": "YES", - "PACKAGE_SKIP_CLEAN_INSTALL": "NO", - "PACKAGE_SKIP_CLEAN_OBJ": "NO", - "PACKAGE_SKIP_CLEAN_PACKAGE": "NO", - "PACKAGE_SKIP_CLEAN_SRC_DIR": "NO", - "PACKAGE_SKIP_CMAKE_TARGET": "NO", - "PACKAGE_SKIP_LINUX_MAKE": "YES", - "PACKAGE_SUB_DIR": "src", - "PACKAGE_SUB_DIR1": "src", - "PACKAGE_URL": "https://github.com/ARM-software/ComputeLibrary" - }, - "use_git_revision": "yes", - "version": "master" - }, - "deps": { - "compiler": { - "local": "yes", - "name": "C++ compiler", - "sort": 10, - "tags": "compiler,lang-cpp" - }, - "opencl": { - "local": "yes", - "name": "OpenCL library", - "skip_installed": { - "android": "yes" - }, - "sort": 20, - "tags": "lib,opencl" - } - }, - "end_full_path": { - "android": "install$#sep#$lib$#sep#$libarm_compute.a", - "linux": "install/lib/libarm_compute.a", - "mingw": "install\\lib\\arm_compute.a", - "win": "install\\lib\\arm_compute.lib" - }, - "need_cpu_info": "yes", - "only_for_host_os_tags": [ - "windows", - "linux" - ], - "only_for_target_os_tags": [ - "windows", - "linux", - "android" - ], - "process_script": "install", - "soft_uoa": "fc544df6941a5491", - "suggested_path": "lib-acl-dev", - "tags": [ - "lib", - "arm", - "acl", - "arm-compute-lib", - "vopencl", - "vmaster" - ], - "use_scripts_from_another_entry": { - "data_uoa": "cd9ccc74060b3d18", - "module_uoa": "script" - } -} diff --git a/package/lib-acl-dev-universal/README.txt b/package/lib-acl-dev-universal/README.txt deleted file mode 100644 index a7da7c6..0000000 --- a/package/lib-acl-dev-universal/README.txt +++ /dev/null @@ -1,8 +0,0 @@ -Grigori Fursin converted original sconscript from ARM Compute Lib -(https://github.com/ARM-software/ComputeLibrary) -to multi-platform software manager in the CK -(https://github.com/ctuning/ck/wiki/Portable-workflows) -to support portable experimental workflows. - - - diff --git a/package/lib-acl-dev-universal/arc/sconscript b/package/lib-acl-dev-universal/arc/sconscript deleted file mode 100644 index 6ec52f6..0000000 --- a/package/lib-acl-dev-universal/arc/sconscript +++ /dev/null @@ -1,380 +0,0 @@ -# Copyright (c) 2016, 2017 ARM Limited. -# -# SPDX-License-Identifier: MIT -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -import collections -import os.path -import re -import subprocess -import SCons - -VERSION = "v17.05" -SONAME_VERSION="2.0.0" - -Import('env') -Import('vars') - -def version_at_least(version, required): - end = min(len(version), len(required)) - - for i in range(0, end, 2): - if int(version[i]) < int(required[i]): - return False - elif int(version[i]) > int(required[i]): - return True - - return True - -def build_library(name, sources, libs, static=False): - if static: - obj = env.StaticLibrary(name, source = sources, LIBS=libs ) - else: - if env['set_soname']: - obj = env.SharedLibrary(name, source = sources, LIBS=libs, SHLIBVERSION=SONAME_VERSION) - symlinks = [] - # Manually delete symlinks or SCons will get confused: - directory = os.path.dirname( obj[0].path ) - library_prefix = obj[0].path[:-(1+len(SONAME_VERSION))] - real_lib="%s.%s" % (library_prefix, SONAME_VERSION) - for f in Glob( "#%s*" % library_prefix): - if str(f) != real_lib: - symlinks.append("%s/%s" % (directory,str(f))) - clean = env.Command('clean-%s' % str(obj[0]), [], Delete(symlinks)) - Default(clean) - Depends(obj, clean) - else: - obj = env.SharedLibrary(name, source = sources, LIBS=libs) - - Default(obj) - return obj - -def resolve_includes(target, source, env): - # File collection - FileEntry = collections.namedtuple('FileEntry', 'target_name file_contents') - - # Include pattern - pattern = re.compile("#include \"(.*)\"") - - # Get file contents - files = [] - for s in source: - name = s.rstr().split("/")[-1] - contents = s.get_contents().splitlines() - embed_target_name = s.abspath + "embed" - entry = FileEntry(target_name=embed_target_name, file_contents=contents) - files.append((name,entry)) - - # Create dictionary of tupled list - files_dict = dict(files) - - # Check for includes (can only be files in the same folder) - final_files = [] - for file in files: - done = False - tmp_file = file[1].file_contents - while not done: - file_count = 0 - updated_file = [] - for line in tmp_file: - found = pattern.search(line) - if found: - include_file = found.group(1) - data = files_dict[include_file].file_contents - updated_file.extend(data) - else: - updated_file.append(line) - file_count += 1 - - # Check if all include are replaced. - if file_count == len(tmp_file): - done = True - - # Update temp file - tmp_file = updated_file - - # Append and prepend string literal identifiers and add expanded file to final list - tmp_file.insert(0, "R\"(\n") - tmp_file.append("\n)\"") - entry = FileEntry(target_name=file[1].target_name, file_contents=tmp_file) - final_files.append((file[0], entry)) - - # Write output files - for file in final_files: - with open(file[1].target_name, 'w+') as out_file: - contents = file[1].file_contents - for line in contents: - out_file.write("%s\n" % line) - -if GetOption("help"): - Exit(0) - -flags = ['-D_GLIBCXX_USE_NANOSLEEP','-Wno-deprecated-declarations','-Wall','-DARCH_ARM', - '-Wextra','-Wno-unused-parameter','-pedantic','-Wdisabled-optimization','-Wformat=2', - '-Winit-self','-Wstrict-overflow=2','-Wswitch-default', - '-fpermissive','-std=gnu++11','-Wno-vla','-Woverloaded-virtual', - '-Wctor-dtor-privacy','-Wsign-promo','-Weffc++','-Wno-format-nonliteral','-Wno-overlength-strings','-Wno-strict-overflow'] - -if env['neon'] and 'x86' in env['arch']: - print "Cannot compile NEON for x86" - Exit(1) - -if env['set_soname'] and not version_at_least(SCons.__version__, "2.4"): - print "Setting the library's SONAME / SHLIBVERSION requires SCons 2.4 or above" - print "Update your version of SCons or use set_soname=0" - Exit(1) - -if os.environ.get('CXX','g++') == 'clang++': - flags += ['-Wno-format-nonliteral','-Wno-deprecated-increment-bool','-Wno-vla-extension','-Wno-mismatched-tags'] -else: - flags += ['-Wlogical-op','-Wnoexcept','-Wstrict-null-sentinel'] - -if env['cppthreads']: - flags += ['-DARM_COMPUTE_CPP_SCHEDULER=1'] - -if env['openmp']: - if os.environ.get('CXX','g++') == 'clang++': - print "Clang does not support OpenMP. Use scheduler=cpp." - Exit(1) - - flags += ['-DARM_COMPUTE_OPENMP_SCHEDULER=1','-fopenmp'] - env.Append(LINKFLAGS=['-fopenmp']) - -files_to_delete = [] - -# Generate string with build options library version to embed in the library: -try: - git_hash = subprocess.check_output(["git", "rev-parse","HEAD"]) -except (OSError, subbprocess.CalledProcessError): - git_hash="unknown" - -version_filename = "%s/arm_compute_version.embed" % os.path.dirname(Glob("src/core/*")[0].rstr()) -build_info = "\"arm_compute_version=%s Build options: %s Git hash=%s\"" % (VERSION, vars.args, git_hash.strip()) - -with open(version_filename, "w") as fd: - fd.write(build_info) - -files_to_delete.append(version_filename) - -core_libs = ['dl'] -libs = ['dl'] - -prefix="" - -if env['arch'] == 'armv7a': - flags += ['-march=armv7-a','-mthumb','-mfpu=neon'] - - if env['os'] in ['linux','bare_metal']: - prefix = "arm-linux-gnueabihf-" - flags += ['-mfloat-abi=hard'] - elif env['os'] == 'android': - prefix = "arm-linux-androideabi-" - flags += ['-mfloat-abi=softfp'] -elif env['arch'] == 'arm64-v8a': - flags += ['-march=armv8-a'] - - if env['os'] in ['linux','bare_metal']: - prefix = "aarch64-linux-gnu-" - elif env['os'] == 'android': - prefix = "aarch64-linux-android-" -elif env['arch'] == 'arm64-v8.2-a': - flags += ['-march=armv8.2-a+fp16+simd'] - flags += ['-DARM_COMPUTE_ENABLE_FP16'] - - if env['os'] in ['linux','bare_metal']: - prefix = "aarch64-linux-gnu-" - elif env['os'] == 'android': - prefix = "aarch64-linux-android-" -elif env['arch'] == 'x86_32': - flags += ['-m32'] -elif env['arch'] == 'x86_64': - flags += ['-m64'] - -if env['build'] == 'native': - prefix = "" - -env['CC'] = prefix + os.environ.get('CC','gcc') -env['CXX'] = prefix + os.environ.get('CXX','g++') -env['LD'] = prefix + "ld" -env['AS'] = prefix + "as" -env['AR'] = prefix + "ar" -env['RANLIB'] = prefix + "ranlib" - -try: - compiler_ver = subprocess.check_output( [env['CXX'] , "-dumpversion"] ).strip() -except OSError: - print "ERROR: Compiler '%s' not found" % env['CXX'] - Exit(1) - -if os.environ.get('CXX','g++') == 'g++': - if env['arch'] == 'arm64-v8.2-a' and not version_at_least(compiler_ver, '6.2.1'): - print "GCC 6.2.1 or newer is required to compile armv8.2-a code" - Exit(1) - - if env['arch'] == 'arm64-v8a' and not version_at_least(compiler_ver, '4.9'): - print "GCC 4.9 or newer is required to compile NEON code for AArch64" - Exit(1) - - if version_at_least(compiler_ver, '6.1'): - flags += ['-Wno-ignored-attributes'] - - if compiler_ver == '4.8.3': - flags += ['-Wno-array-bounds'] - -if env['Werror']: - flags += ['-Werror'] - -example_libs = [] - -if env['os'] == 'android': - flags += ['-DANDROID'] - env.Append(LINKFLAGS=['-pie','-static-libstdc++']) - example_libs = ['arm_compute-static'] -elif env['os'] == 'bare_metal': - env.Append(LINKFLAGS=['-static']) - flags += ['-fPIC','-DNO_MULTI_THREADING'] - example_libs = ['arm_compute-static'] -else: - libs += ['pthread'] - example_libs = ['arm_compute'] - -if env['opencl']: - if env['os'] == 'bare_metal': - raise Exception("Cannot link OpenCL statically, which is required on bare metal") - if env['embed_kernels']: - flags += ['-DEMBEDDED_KERNELS'] - -if env['debug']: - env['asserts'] = True - flags += ['-O0','-g','-gdwarf-2'] -else: - flags += ['-O3','-ftree-vectorize'] - -if env['asserts']: - flags += ['-DARM_COMPUTE_ASSERTS_ENABLED'] - -env.Append(CPPPATH=['.','#include']) -env.Append(LIBPATH=['#build/%s' % env['build_dir'],'.']) -env.Append(CXXFLAGS=flags) -env.Append(CXXFLAGS=env['extra_cxx_flags']) - -core_files = Glob('src/core/*.cpp') -core_files += Glob('src/core/CPP/*.cpp') - -files = Glob('src/runtime/*.cpp') - -embed_files = [] -core_files += Glob('src/core/CPP/kernels/*.cpp') -# CLHarrisCorners uses the Scheduler to run CPP kernels -files += Glob('src/runtime/CPP/SingleThreadScheduler.cpp') - -if env['os'] == 'bare_metal': - if env['cppthreads'] or env['openmp']: - print "ERROR: OpenMP and C++11 threads not supported in bare_metal. Use cppthreads=0 openmp=0" - Exit(1) -else: - if env['cppthreads']: - files += Glob('src/runtime/CPP/CPPScheduler.cpp') - if env['openmp']: - files += Glob('src/runtime/OMP/OMPScheduler.cpp') - -if env['opencl']: - core_files += Glob('src/core/CL/*.cpp') - core_files += Glob('src/core/CL/kernels/*.cpp') - files += Glob('src/runtime/CL/*.cpp') - files += Glob('src/runtime/CL/functions/*.cpp') - - # Generate embed files - if env['embed_kernels']: - cl_files = Glob('src/core/CL/cl_kernels/*.cl') + Glob('src/core/CL/cl_kernels/*.h') - source_list = [] - for file in cl_files: - source_name = file.rstr() - source_list.append(source_name) - embed_files.append(source_name + "embed") - generate_embed = env.Command(embed_files, source_list, action=resolve_includes) - Default(generate_embed) - files_to_delete += embed_files - -if env['neon']: - core_files += Glob('src/core/NEON/*.cpp') - core_files += Glob('src/core/NEON/kernels/*.cpp') - files += Glob('src/runtime/NEON/*.cpp') - files += Glob('src/runtime/NEON/functions/*.cpp') - -objects=[] -static_core_objects = [ env.StaticObject( f ) for f in core_files ] -shared_core_objects = [ env.SharedObject( f ) for f in core_files ] - -arm_compute_core_a = build_library('arm_compute_core-static', static_core_objects, core_libs, static=True) -objects.append(arm_compute_core_a) -Export('arm_compute_core_a') - -if env['os'] != 'bare_metal': - arm_compute_core_so = build_library('arm_compute_core', shared_core_objects, core_libs, static=False) - objects.append(arm_compute_core_so) - Export('arm_compute_core_so') - -shared_objects = [ env.SharedObject( f ) for f in files ] -static_objects = [ env.StaticObject( f ) for f in files ] - -arm_compute_a = build_library('arm_compute-static', static_core_objects + static_objects, libs, static=True) -objects.append(arm_compute_a) -Export('arm_compute_a') - -if env['os'] != 'bare_metal': - arm_compute_so = build_library('arm_compute', shared_core_objects + shared_objects, libs, static=False) - objects.append(arm_compute_so) - Export('arm_compute_so') - -# Delete produced embed files -clean_embed = env.Command('clean-embed', [], Delete(files_to_delete)) -Default(clean_embed) -env.Depends(clean_embed, objects) -alias = env.Alias("arm_compute",objects) -Default(alias) - -# Build examples -test_helpers = env.Object("test_helpers/Utils.cpp") - -if env['opencl'] and env['neon']: - for file in Glob("examples/neoncl_*.cpp"): - example = os.path.basename( os.path.splitext(str(file))[0]) - prog = env.Program(example, ['examples/%s.cpp' % example, test_helpers], LIBS=example_libs+['OpenCL']) - alias = env.Alias(example, prog) - Depends(prog, objects) - Default( alias ) - -if env['opencl']: - for file in Glob("examples/cl_*.cpp"): - example = os.path.basename( os.path.splitext(str(file))[0]) - prog = env.Program(example, ['examples/%s.cpp' % example, test_helpers], LIBS=example_libs+['OpenCL']) - alias = env.Alias(example, prog) - Depends(prog, objects) - Default( alias ) - -if env['neon']: - for file in Glob("examples/neon_*.cpp"): - example = os.path.basename( os.path.splitext(str(file))[0]) - prog = env.Program(example, ['examples/%s.cpp' % example, test_helpers], LIBS=example_libs) - alias = env.Alias(example, prog) - Depends(prog, objects) - Default( alias ) - -Export('env') diff --git a/package/lib-acl-dev-universal/build.bat b/package/lib-acl-dev-universal/build.bat deleted file mode 100644 index e296e2c..0000000 --- a/package/lib-acl-dev-universal/build.bat +++ /dev/null @@ -1,85 +0,0 @@ -@echo off - -rem ******************************************************************************************************************************* - -mkdir ..\install -mkdir ..\install\lib -mkdir ..\install\include - -mkdir obj -cd obj - -rem ******************************************************************************************************************************* - -echo. -echo Building static library ... -echo. - -set CK_TARGET_FILE=%CK_TARGET_LIB%%CK_LIB_EXT% -del /q %CK_TARGET_FILE% - -echo %CK_CXX% %CK_COMPILER_FLAGS_OBLIGATORY% %CK_FLAGS_STATIC_LIB% %CK_FLAGS_CREATE_OBJ% %CK_CXXFLAGS% %CK_SRC_FILES% %CK_FLAG_PREFIX_INCLUDE%.. -echo. - -%CK_CXX% %CK_COMPILER_FLAGS_OBLIGATORY% %CK_FLAGS_STATIC_LIB% %CK_FLAGS_CREATE_OBJ% %CK_CXXFLAGS% %CK_SRC_FILES% %CK_FLAG_PREFIX_INCLUDE%.. -if %errorlevel% neq 0 ( - echo. - echo Building failed! - exit /b 1 -) - -echo %CK_LB% %CK_LB_OUTPUT%%CK_TARGET_FILE% %CK_OBJ_FILES% -echo. - -%CK_LB% %CK_LB_OUTPUT%%CK_TARGET_FILE% %CK_OBJ_FILES% -if %errorlevel% neq 0 ( - echo. - echo Building static library failed! - exit /b 1 -) - -copy /b %CK_TARGET_FILE% ..\..\install\lib -if %errorlevel% neq 0 ( - echo. - echo Copying static library failed! - exit /b 1 -) - -rem ******************************************************************************************************************************* - -set CK_TARGET_FILE_D=%CK_TARGET_LIB%%CK_DLL_EXT% -if not "%CK_BARE_METAL%" == "on" ( - - echo. - echo Building dynamic library ... - echo. - - del /q %CK_TARGET_FILE_D% - - echo %CK_CXX% %CK_COMPILER_FLAGS_OBLIGATORY% %CK_FLAGS_DLL% %CK_CXXFLAGS% %CK_SRC_FILES% %CK_FLAG_PREFIX_INCLUDE%.. %CK_FLAGS_OUTPUT%%CK_TARGET_FILE_D% %CK_FLAGS_DLL_EXTRA% %CK_LD_FLAGS_MISC% %CK_LD_FLAGS_EXTRA% %CK_LFLAGS% - %CK_CXX% %CK_COMPILER_FLAGS_OBLIGATORY% %CK_FLAGS_DLL% %CK_CXXFLAGS% %CK_SRC_FILES% %CK_FLAG_PREFIX_INCLUDE%.. %CK_FLAGS_OUTPUT%%CK_TARGET_FILE_D% %CK_FLAGS_DLL_EXTRA% %CK_LD_FLAGS_MISC% %CK_LD_FLAGS_EXTRA% %CK_LFLAGS% - if %errorlevel% neq 0 ( - echo. - echo Building dynamic library failed! - exit /b 1 - ) - - copy /b %CK_TARGET_FILE_D% ..\..\install\lib - if %errorlevel% neq 0 ( - echo. - echo Copying dynamic library failed! - exit /b 1 - ) -) - -rem ******************************************************************************************************************************* - -echo. -echo Copying include files ... -echo. - -cd .. -xcopy arm_compute ..\install\include\arm_compute /e /c /i /y -xcopy test_helpers ..\install\include\test_helpers /e /c /i /y - -exit /b 0 diff --git a/package/lib-acl-dev-universal/build.sh b/package/lib-acl-dev-universal/build.sh deleted file mode 100644 index 3b2ca65..0000000 --- a/package/lib-acl-dev-universal/build.sh +++ /dev/null @@ -1,97 +0,0 @@ -#! /bin/bash - -# -# Make script for CK libraries -# (depends on configured/installed compilers via CK) -# -# See CK LICENSE.txt for licensing details. -# See CK Copyright.txt for copyright details. -# -# Developer(s): Grigori Fursin, 2015 -# - - -# ******************************************************************************************************************************* - -mkdir ../install - -mkdir ../install/lib - -mkdir obj -cd obj - -# ******************************************************************************************************************************* - -echo "" -echo "Building static library ..." -echo "" - -CK_TARGET_FILE=${CK_TARGET_LIB}${CK_LIB_EXT} -rm -f $CK_TARGET_FILE - -echo "${CK_CXX} ${CK_COMPILER_FLAGS_OBLIGATORY} ${CK_FLAGS_STATIC_LIB} ${CK_FLAGS_CREATE_OBJ} ${CK_CXXFLAGS} ${CK_SRC_FILES} ${CK_FLAG_PREFIX_INCLUDE}.." -echo "" - -${CK_CXX} ${CK_COMPILER_FLAGS_OBLIGATORY} ${CK_FLAGS_STATIC_LIB} ${CK_FLAGS_CREATE_OBJ} ${CK_CXXFLAGS} ${CK_SRC_FILES} ${CK_FLAG_PREFIX_INCLUDE}.. -if [ "${?}" != "0" ] ; then - echo "" - echo "Building failed!" - exit 1 -fi - -echo "${CK_LB} ${CK_LB_OUTPUT}${CK_TARGET_FILE} ${CK_OBJ_FILES}" -echo "" - -${CK_LB} ${CK_LB_OUTPUT}${CK_TARGET_FILE} ${CK_OBJ_FILES} -if [ "${?}" != "0" ] ; then - echo "" - echo "Building static library failed!" - exit 1 -fi - -cp -f $CK_TARGET_FILE ../../install/lib -if [ "${?}" != "0" ] ; then - echo "" - echo "Copying static library failed" - exit 1 -fi - -# ******************************************************************************************************************************* - -CK_TARGET_FILE_D=${CK_TARGET_LIB}${CK_DLL_EXT} -if [ "${CK_BARE_METAL}" != "on" ] ; then - echo "" - echo "Building dynamic library ..." - echo "" - - rm -f $CK_TARGET_FILE_D - - echo "${CK_CXX} ${CK_COMPILER_FLAGS_OBLIGATORY} ${CK_FLAGS_DLL} ${CK_CXXFLAGS} ${CK_SRC_FILES} ${CK_FLAG_PREFIX_INCLUDE}.. ${CK_FLAGS_OUTPUT}${CK_TARGET_FILE_D} ${CK_FLAGS_DLL_EXTRA} ${CK_LD_FLAGS_MISC} ${CK_LD_FLAGS_EXTRA} ${CK_LFLAGS}" - ${CK_CXX} ${CK_COMPILER_FLAGS_OBLIGATORY} ${CK_FLAGS_DLL} ${CK_CXXFLAGS} ${CK_SRC_FILES} ${CK_FLAG_PREFIX_INCLUDE}.. ${CK_FLAGS_OUTPUT}${CK_TARGET_FILE_D} ${CK_FLAGS_DLL_EXTRA} ${CK_LD_FLAGS_MISC} ${CK_LD_FLAGS_EXTRA} ${CK_LFLAGS} - if [ "${?}" != "0" ] ; then - echo "" - echo "Building dynamic library failed!" - exit 1 - fi - - cp -f $CK_TARGET_FILE_D ../../install/lib - if [ "${?}" != "0" ] ; then - echo "" - echo "Copying dynamic library failed!" - exit 1 - fi -fi - -# ******************************************************************************************************************************* - -echo "" -echo "Copying include files ..." -echo "" - -cd .. -rm -rf ../install/include -mkdir ../install/include -cp -rf arm_compute ../install/include/arm_compute -cp -rf test_helpers ../install/include/test_helpers - -exit 0 diff --git a/package/lib-acl-dev-universal/custom.py b/package/lib-acl-dev-universal/custom.py deleted file mode 100644 index a70b43d..0000000 --- a/package/lib-acl-dev-universal/custom.py +++ /dev/null @@ -1,501 +0,0 @@ - - -# -# Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net -# - -import os -import sys -import json -import re -import collections -############################################################################## -def file_get_contents(filename): - return open(filename).read() -def resolve_includes(target, source, lpath): - # File collection - FileEntry = collections.namedtuple('FileEntry', 'target_name file_contents') - # Include pattern - pattern = re.compile("#include \"(.*)\"") - - # Get file contents - files = [] - for s in source: - name = s.split("/")[-1] - s_absp = lpath +'/src/'+ s - mycontents = file_get_contents(s_absp) - contents=mycontents.splitlines() - embed_target_name = s_absp + "embed" - entry = FileEntry(target_name=embed_target_name, file_contents=contents) - files.append((name,entry)) - - # Create dictionary of tupled list - files_dict = dict(files) - - # Check for includes (can only be files in the same folder) - final_files = [] - for file in files: - done = False - tmp_file = file[1].file_contents - while not done: - file_count = 0 - updated_file = [] - for line in tmp_file: - found = pattern.search(line) - if found: - include_file = found.group(1) - data = files_dict[include_file].file_contents - updated_file.extend(data) - else: - updated_file.append(line) - file_count += 1 - - # Check if all include are replaced. - if file_count == len(tmp_file): - done = True - - # Update temp file - tmp_file = updated_file - - # Append and prepend string literal identifiers and add expanded file to final list - tmp_file.insert(0, "R\"(\n") - tmp_file.append("\n)\"") - entry = FileEntry(target_name=file[1].target_name, file_contents=tmp_file) - final_files.append((file[0], entry)) - - # Write output files - for file in final_files: - with open(file[1].target_name, 'w+') as out_file: - contents = file[1].file_contents - for line in contents: - out_file.write("%s\n" % line) - -def setup(i): - """ - Input: { - cfg - meta of the soft entry - self_cfg - meta of module soft - ck_kernel - import CK kernel module (to reuse functions) - - host_os_uoa - host OS UOA - host_os_uid - host OS UID - host_os_dict - host OS meta - - target_os_uoa - target OS UOA - target_os_uid - target OS UID - target_os_dict - target OS meta - - target_device_id - target device ID (if via ADB) - - tags - list of tags used to search this entry - - env - updated environment vars from meta - customize - updated customize vars from meta - - deps - resolved dependencies for this soft - - interactive - if 'yes', can ask questions, otherwise quiet - - path - path to entry (with scripts) - install_path - installation path - } - - Output: { - return - return code = 0, if successful - > 0, if error - (error) - error text if return > 0 - - (install_env) - prepare environment to be used before the install script - } - - """ - - import os - import shutil - import glob - - # Get variables - o=i.get('out','') - - ck=i['ck_kernel'] - - hos=i['host_os_uoa'] - tos=i['target_os_uoa'] - - hosd=i['host_os_dict'] - tosd=i['target_os_dict'] - - hbits=hosd.get('bits','') - tbits=tosd.get('bits','') - - hname=hosd.get('ck_name','') # win, linux - hname2=hosd.get('ck_name2','') # win, mingw, linux, android - tname2=tosd.get('ck_name2','') # win, mingw, linux, android - - macos=hosd.get('macos','') # yes/no - - hft=i.get('features',{}) # host platform features - habi=hft.get('os',{}).get('abi','') # host ABI (only for ARM-based); if you want to get target ABI, use tosd ... - # armv7l, etc... - - p=i['path'] - - env=i['new_env'] - - pi=i.get('install_path','') - - cus=i['customize'] - ie=cus.get('install_env',{}) - nie={} # new env - - deps=i.get('deps','') - - # Converting sconscript to CK format - flags = ['-D_GLIBCXX_USE_NANOSLEEP','-Wno-deprecated-declarations','-Wall','-DARCH_ARM', - '-Wextra','-Wno-unused-parameter','-pedantic','-Wdisabled-optimization','-Wformat=2', - '-Winit-self','-Wstrict-overflow=2','-Wswitch-default', - '-fpermissive','-std=gnu++11','-Wno-vla','-Woverloaded-virtual', - '-Wctor-dtor-privacy','-Wsign-promo','-Weffc++','-Wno-format-nonliteral','-Wno-overlength-strings','-Wno-strict-overflow'] - - lcore_flags=['-ldl'] - lflags=['-ldl'] - - # Check various target params from CK - cpu_features=tosd.get('cpu_features',{}) - tneon=cpu_features.get('arm_fp_neon','') - thardfp=cpu_features.get('arm_fp_hard','') - - # ABI for Android - tabi=tosd.get('abi','') - if tabi=='': # Means host - tabi=habi # Means ARM - if tabi=='': # Means x86 (indirectly) - tabi='x86' - if str(tbits)=='64': tabi='x86_64' - - neon=False - if env.get('USE_NEON','').lower()=='on' or tneon=='yes': - neon=True - nie['USE_NEON']='ON' - - opencl=False - if env.get('USE_OPENCL','').lower()=='on': - opencl=True - nie['USE_OPENCL']='ON' - openclenv = deps['opencl']['dict'].get('customize') -# ck.debug_out(openclenv) - ipath = openclenv.get('path_include') - lpath = openclenv.get('path_lib') -# flags += ['-I'+ipath] ACL uses local CL/cl.h cl2.h - flags += ['-I../include'] -# nie['CK_FLAG_PREFIX_INCLUDE'] = '' - lflags +=['-L'+lpath+' -lOpenCL'] -# lcore_flags += [''] - if env.get('USE_EMBEDDED_KERNELS','').lower()=='on': - flags += ['-DEMBEDDED_KERNELS'] - - hardfp=False - if env.get('USE_BARE_METAL','').lower()=='on' or thardfp=='yes': - hardfp=True - nie['USE_BARE_METAL']='ON' - - -# if env.get('USE_VALIDATION_TEST','').lower()=='on': -# print "VALIDATION" - -# if env.get('USE_BENCHMARK_TEST','').lower()=='on': -# print "BENCHMARK" - - - if neon and 'x86' in tabi: - return {'return':1, 'error':'Cannot compile NEON for x86'} - - - compiler_env=deps['compiler'].get('dict',{}).get('env',{}) - cxx=compiler_env['CK_CXX'] - - if compiler_env.get('CK_ENV_LIB_STDCPP_INCLUDE','')!='': - flags+=['-I'+compiler_env['CK_ENV_LIB_STDCPP_INCLUDE']] - if compiler_env.get('CK_ENV_LIB_STDCPP_INCLUDE_EXTRA','')!='': - flags+=['-I'+compiler_env['CK_ENV_LIB_STDCPP_INCLUDE_EXTRA']] -# env['CK_ENV_LIB_STDCPP_STATIC']=libstdcpppath+sep+'libgnustl_static.a' -# env['CK_ENV_LIB_STDCPP_DYNAMIC']=libstdcpppath+sep+'libgnustl_shared.so' -# env['CK_ENV_LIB_STDCPP_INCLUDE_EXTRA']=libstdcpppath+sep+'include' - - - if 'clang++' in cxx: - flags += ['-Wno-format-nonliteral','-Wno-deprecated-increment-bool','-Wno-vla-extension','-Wno-mismatched-tags'] - elif 'g++' in cxx: - flags += ['-Wlogical-op','-Wnoexcept','-Wstrict-null-sentinel'] - - if env.get('USE_CPPTHREADS','').lower()=='on': - flags += ['-DARM_COMPUTE_CPP_SCHEDULER=1'] - - if env.get('USE_OPENMP','').lower()=='on': - if 'clang++' in cxx: - return {'return':1, 'error':'Clang does not support OpenMP. Use --env.USE_CPPTHREADS=ON'} - - flags += ['-DARM_COMPUTE_OPENMP_SCHEDULER=1','-fopenmp'] - lflags += ['-fopenmp'] - lcore_flags += ['-fopenmp'] - - if 'v7a' in tabi: - flags += ['-march=armv7-a','-mthumb','-mfpu=neon'] - - if hardfp: - flags += ['-mfloat-abi=hard'] - elif tname2=='android': - flags += ['-mfloat-abi=softfp'] - elif 'arm64' in tabi: - flags += ['-march=armv8-a'] - elif env.get('USE_ARM64_V82A','').lower()=='on': - flags += ['-march=armv8.2-a+fp16+simd'] - flags += ['-DARM_COMPUTE_ENABLE_FP16'] - elif tabi=='x86': - flags += ['-m32'] - elif tabi=='x86_64': - flags += ['-m64'] - - if tname2=='android': - flags += ['-DANDROID'] - if compiler_env.get('CK_ENV_LIB_STDCPP_STATIC','')!='': - lflags+=[compiler_env['CK_ENV_LIB_STDCPP_STATIC']] - lcore_flags+=[compiler_env['CK_ENV_LIB_STDCPP_STATIC']] -# Done via CK -# lflags+=['-static-libstdc++'] -# lcore_flags+=['-static-libstdc++'] - elif env.get('USE_BARE_METAL','').lower()=='on': - flags += ['-fPIC','-DNO_MULTI_THREADING'] - lflags+=['-static'] - lcore_flags+=['-static'] - else: - lflags += ['-lpthread'] - - flags += ['-O3','-ftree-vectorize'] - - nie['CXXFLAGS']=' '.join(flags) - nie['LFLAGS']=' '.join(lflags) - nie['LCORE_FLAGS']=' '.join(lcore_flags) - - return {'return':0, 'install_env':nie} - -############################################################################## -# customize installation after download - -def post_setup(i): - """ - Input: { - The same as in setup(i) - - new_env - last env (can be directly updated) - } - - Output: { - return - return code = 0, if successful - > 0, if error - (error) - error text if return > 0 - } - - """ - - import os - import shutil - import glob - import subprocess - - # Get variables - o=i.get('out','') - - ck=i['ck_kernel'] - - cfg=i.get('cfg',{}) - hosd=i['host_os_dict'] - tosd=i['target_os_dict'] - - winh=hosd.get('windows_base','') - - eset=hosd.get('env_set','') - eifs=hosd.get('env_quotes_if_space','') - sext=hosd.get('script_ext','') - - hname=hosd.get('ck_name','') # win, linux - hname2=hosd.get('ck_name2','') # win, mingw, linux, android - tname2=tosd.get('ck_name2','') # win, mingw, linux, android - - env=i.get('new_env',{}) - - deps=i.get('deps',{}) - pi=i.get('install_path','') - libprefix='' - if winh!='yes' or tname2=='android': - libprefix='lib' - - compiler_env=deps['compiler'].get('dict',{}).get('env',{}) - obj_ext=compiler_env.get('CK_OBJ_EXT') - - flags=env.get('CXXFLAGS','') - lflags=env.get('LFLAGS','') - lcore_flags=env.get('LCORE_FLAGS','') - bare_metal=env.get('USE_BARE_METAL','').lower() - use_neon=env.get('USE_NEON','').lower() - use_opencl= env.get('USE_OPENCL','').lower() - use_embed_kernel= env.get('USE_EMBEDDED_KERNELS','').lower() - - pp=i.get('path_original_package','') - - pi=i.get('install_path','') - pi1=cfg.get('customize',{}).get('extra_dir','') - if pi1=='': pi1=cfg.get('customize',{}).get('git_src_dir','') - - build_dir=pi - if pi1!='': build_dir=os.path.join(pi,pi1) - - if not os.path.isdir(build_dir): - return {'return':1, 'error':'Something is wrong - build directory is not there ('+build_dir+')'} - - os.chdir(build_dir) - - xcore_files = glob.glob('src/core/*.cpp') - xcore_files += glob.glob('src/core/CPP/*.cpp') - - xfiles = glob.glob('src/runtime/*.cpp') - - embed_files = [] - files_to_delete = [] - - xcore_files += glob.glob('src/core/CPP/kernels/*.cpp') - - # CLHarrisCorners uses the Scheduler to run CPP kernels - xfiles += glob.glob('src/runtime/CPP/SingleThreadScheduler.cpp') - - if bare_metal=='on': - if env.get('USE_CPPTHREADS','').lower()=='on' or env.get('USE_OPENMP','').lower()=='on': - return {'return':1, 'error':'OpenMP and C++11 threads not supported in bare_metal. use --env.USE_CPPTHREADS=OFF --env.USE_OPENMP=OFF'} - else: - if env.get('USE_CPPTHREADS','').lower()=='on': - xfiles += glob.glob('src/runtime/CPP/CPPScheduler.cpp') - if env.get('USE_OPENMP','').lower()=='on': - xfiles += glob.glob('src/runtime/OMP/OMPScheduler.cpp') - - if use_opencl=='on': - xcore_files += glob.glob('src/core/CL/*.cpp') - xcore_files += glob.glob('src/core/CL/kernels/*.cpp') - xfiles += glob.glob('src/runtime/CL/*.cpp') - xfiles += glob.glob('src/runtime/CL/functions/*.cpp') - if use_embed_kernel == 'on': - cl_files = glob.glob('src/core/CL/cl_kernels/*.cl') + glob.glob('src/core/CL/cl_kernels/*.h') - source_list = [] - for file in cl_files: - source_name = file - source_list.append(source_name) - embed_files.append(source_name + "embed") -# generate_embed = env.Command(embed_files, source_list, action=resolve_includes) - generate_embed = resolve_includes(embed_files, source_list,pi) - #Default(generate_embed) - files_to_delete += embed_files - if use_neon=='on': - xcore_files += glob.glob('src/core/NEON/*.cpp') - xcore_files += glob.glob('src/core/NEON/kernels/*.cpp') - xfiles += glob.glob('src/runtime/NEON/*.cpp') - xfiles += glob.glob('src/runtime/NEON/functions/*.cpp') - - - - - - # Generate string with build options library version to embed in the library: - r=ck.run_and_get_stdout({'cmd':['git','rev-parse','HEAD']}) - if r['return']==0 and r['return_code']==0: - git_hash=r['stdout'].strip() - - version_filename = 'arm_compute_version.embed' #"%s/arm_compute_version.embed" % os.path.dirname(glob.glob("src/core/*")[0].rrstr()) - build_info = "\"arm_compute_version=%s Build options: %s Git hash=%s\"" % ('', '', git_hash.strip()) - - r=ck.save_text_file({'text_file':version_filename, 'string':build_info}) - if r['return']>0: return r - - # BUILDING CORE LIB ************************************************************** - # Clean up files and prepare obj names - core_files='' - obj_core_files='' - - for f in xcore_files: - f=f.replace('\\','/') # fix windows names - fo=os.path.basename(os.path.splitext(f)[0]+obj_ext) - - core_files+=' ../'+f - obj_core_files+=' '+fo - - # Compiler env - sb=hosd.get('batch_prefix','')+'\n' - - sb+=deps.get('compiler',{}).get('bat','')+'\n' - - sb+=eset+' CK_CXXFLAGS='+eifs+flags+eifs+'\n' - sb+=eset+' CK_LFLAGS='+eifs+lcore_flags+eifs+'\n' - sb+=eset+' CK_SRC_FILES='+eifs+core_files+eifs+'\n' - sb+=eset+' CK_OBJ_FILES='+eifs+obj_core_files+eifs+'\n' - sb+=eset+' CK_TARGET_LIB='+libprefix+'arm_compute_core\n' - sb+=eset+' CK_BARE_METAL='+bare_metal+'\n' - - sb+=hosd.get('env_call','')+' '+os.path.join(pp,'build'+sext) - - # Prepare tmp bat file - rx=ck.gen_tmp_file({'prefix':'tmp-ck-', 'suffix':sext}) - if rx['return']>0: return rx - fn=rx['file_name'] - - rx=ck.save_text_file({'text_file':fn, 'string':sb}) - if rx['return']>0: return rx - - # Check if need to set executable flags - se=hosd.get('set_executable','') - if se!='': - x=se+' '+fn - rx=os.system(x) - - # Run script - rx=os.system(fn) - - # BUILDING CORE + RUNTIME LIB ************************************************************** - # Clean up files and prepare obj names - files='' - for f in xfiles: - f=f.replace('\\','/') # fix windows names - fo=os.path.basename(os.path.splitext(f)[0]+obj_ext) - - core_files+=' ../'+f - obj_core_files+=' '+fo - - # Compiler env - sb=hosd.get('batch_prefix','')+'\n' - - sb+=deps.get('compiler',{}).get('bat','')+'\n' - - sb+=eset+' CK_CXXFLAGS='+eifs+flags+eifs+'\n' - sb+=eset+' CK_LFLAGS='+eifs+lflags+eifs+'\n' - sb+=eset+' CK_SRC_FILES='+eifs+core_files+eifs+'\n' - sb+=eset+' CK_OBJ_FILES='+eifs+obj_core_files+eifs+'\n' - sb+=eset+' CK_TARGET_LIB='+libprefix+'arm_compute\n' - sb+=eset+' CK_BARE_METAL='+bare_metal+'\n' - - sb+=hosd.get('env_call','')+' '+os.path.join(pp,'build'+sext) - - # Prepare tmp bat file - rx=ck.gen_tmp_file({'prefix':'tmp-ck-', 'suffix':sext}) - if rx['return']>0: return rx - fn=rx['file_name'] - - rx=ck.save_text_file({'text_file':fn, 'string':sb}) - if rx['return']>0: return rx - - # Check if need to set executable flags - se=hosd.get('set_executable','') - if se!='': - x=se+' '+fn - rx=os.system(x) - - # Run script - rx=os.system(fn) - - return {'return':0} diff --git a/package/lib-acl-master-universal/.cm/desc.json b/package/lib-acl-master-universal/.cm/desc.json deleted file mode 100644 index 0967ef4..0000000 --- a/package/lib-acl-master-universal/.cm/desc.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/package/lib-acl-master-universal/.cm/info.json b/package/lib-acl-master-universal/.cm/info.json deleted file mode 100644 index eada667..0000000 --- a/package/lib-acl-master-universal/.cm/info.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "backup_data_uid": "c979c5ee89c04b82", - "backup_module_uid": "1dc07ee0f4742028", - "backup_module_uoa": "package", - "control": { - "author": "Grigori Fursin", - "author_email": "Grigori.Fursin@cTuning.org", - "author_webpage": "http://fursin.net", - "copyright": "See CK COPYRIGHT.txt for copyright details", - "engine": "CK", - "iso_datetime": "2017-05-07T15:44:36.554532", - "license": "See CK LICENSE.txt for licensing details", - "version": [ - "1", - "9", - "1", - "1" - ] - }, - "data_name": "lib-acl-master-universal" -} diff --git a/package/lib-acl-master-universal/.cm/meta.json b/package/lib-acl-master-universal/.cm/meta.json deleted file mode 100644 index 8d9e1da..0000000 --- a/package/lib-acl-master-universal/.cm/meta.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "customize": { - "extra_dir": "", - "git_src_dir": "src", - "install_env": { - "USE_NEON": "ON", - "USE_BARE_METAL": "OFF", - "USE_ARM64_V82A": "OFF", - "USE_CPPTHREADS": "ON", - "USE_OPENMP": "OFF", - "PACKAGE_AUTOGEN": "NO", - "PACKAGE_GIT": "YES", - "PACKAGE_PATCH": "YES", - "PACKAGE_SKIP_CLEAN_INSTALL": "NO", - "PACKAGE_SKIP_CLEAN_OBJ": "NO", - "PACKAGE_SKIP_CLEAN_PACKAGE": "NO", - "PACKAGE_SKIP_CLEAN_SRC_DIR": "NO", - "PACKAGE_SKIP_CMAKE_TARGET": "NO", - "PACKAGE_SKIP_LINUX_MAKE": "YES", - "PACKAGE_SUB_DIR": "src", - "PACKAGE_SUB_DIR1": "src", - "PACKAGE_URL": "https://github.com/ARM-software/ComputeLibrary" - }, - "use_git_revision": "yes", - "version": "master" - }, - "deps": { - "compiler": { - "local": "yes", - "name": "C++ compiler", - "sort": 10, - "tags": "compiler,lang-cpp" - } - }, - "end_full_path": { - "android": "install$#sep#$lib$#sep#$libarm_compute.a", - "linux": "install/lib/libarm_compute.a", - "mingw": "install\\lib\\arm_compute.a", - "win": "install\\lib\\arm_compute.lib" - }, - "need_cpu_info": "yes", - "only_for_host_os_tags": [ - "windows", - "linux" - ], - "only_for_target_os_tags": [ - "windows", - "linux", - "android" - ], - "process_script": "install", - "soft_uoa": "fc544df6941a5491", - "suggested_path": "lib-acl-neon", - "tags": [ - "lib", - "arm", - "acl", - "arm-compute-library", - "vneon", - "vmaster" - ], - "use_scripts_from_another_entry": { - "data_uoa": "cd9ccc74060b3d18", - "module_uoa": "script" - } -} diff --git a/package/lib-acl-master-universal/README.md b/package/lib-acl-master-universal/README.md deleted file mode 100644 index 78d95a4..0000000 --- a/package/lib-acl-master-universal/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Grigori Fursin converted the original sconscript from the [ARM Compute -Library](https://github.com/ctuning/ck-wa) (ACL) into the CK format in order to -add ACL to CK auto/crowd-tuning workflows. diff --git a/package/lib-acl-master-universal/build.bat b/package/lib-acl-master-universal/build.bat deleted file mode 100644 index e296e2c..0000000 --- a/package/lib-acl-master-universal/build.bat +++ /dev/null @@ -1,85 +0,0 @@ -@echo off - -rem ******************************************************************************************************************************* - -mkdir ..\install -mkdir ..\install\lib -mkdir ..\install\include - -mkdir obj -cd obj - -rem ******************************************************************************************************************************* - -echo. -echo Building static library ... -echo. - -set CK_TARGET_FILE=%CK_TARGET_LIB%%CK_LIB_EXT% -del /q %CK_TARGET_FILE% - -echo %CK_CXX% %CK_COMPILER_FLAGS_OBLIGATORY% %CK_FLAGS_STATIC_LIB% %CK_FLAGS_CREATE_OBJ% %CK_CXXFLAGS% %CK_SRC_FILES% %CK_FLAG_PREFIX_INCLUDE%.. -echo. - -%CK_CXX% %CK_COMPILER_FLAGS_OBLIGATORY% %CK_FLAGS_STATIC_LIB% %CK_FLAGS_CREATE_OBJ% %CK_CXXFLAGS% %CK_SRC_FILES% %CK_FLAG_PREFIX_INCLUDE%.. -if %errorlevel% neq 0 ( - echo. - echo Building failed! - exit /b 1 -) - -echo %CK_LB% %CK_LB_OUTPUT%%CK_TARGET_FILE% %CK_OBJ_FILES% -echo. - -%CK_LB% %CK_LB_OUTPUT%%CK_TARGET_FILE% %CK_OBJ_FILES% -if %errorlevel% neq 0 ( - echo. - echo Building static library failed! - exit /b 1 -) - -copy /b %CK_TARGET_FILE% ..\..\install\lib -if %errorlevel% neq 0 ( - echo. - echo Copying static library failed! - exit /b 1 -) - -rem ******************************************************************************************************************************* - -set CK_TARGET_FILE_D=%CK_TARGET_LIB%%CK_DLL_EXT% -if not "%CK_BARE_METAL%" == "on" ( - - echo. - echo Building dynamic library ... - echo. - - del /q %CK_TARGET_FILE_D% - - echo %CK_CXX% %CK_COMPILER_FLAGS_OBLIGATORY% %CK_FLAGS_DLL% %CK_CXXFLAGS% %CK_SRC_FILES% %CK_FLAG_PREFIX_INCLUDE%.. %CK_FLAGS_OUTPUT%%CK_TARGET_FILE_D% %CK_FLAGS_DLL_EXTRA% %CK_LD_FLAGS_MISC% %CK_LD_FLAGS_EXTRA% %CK_LFLAGS% - %CK_CXX% %CK_COMPILER_FLAGS_OBLIGATORY% %CK_FLAGS_DLL% %CK_CXXFLAGS% %CK_SRC_FILES% %CK_FLAG_PREFIX_INCLUDE%.. %CK_FLAGS_OUTPUT%%CK_TARGET_FILE_D% %CK_FLAGS_DLL_EXTRA% %CK_LD_FLAGS_MISC% %CK_LD_FLAGS_EXTRA% %CK_LFLAGS% - if %errorlevel% neq 0 ( - echo. - echo Building dynamic library failed! - exit /b 1 - ) - - copy /b %CK_TARGET_FILE_D% ..\..\install\lib - if %errorlevel% neq 0 ( - echo. - echo Copying dynamic library failed! - exit /b 1 - ) -) - -rem ******************************************************************************************************************************* - -echo. -echo Copying include files ... -echo. - -cd .. -xcopy arm_compute ..\install\include\arm_compute /e /c /i /y -xcopy test_helpers ..\install\include\test_helpers /e /c /i /y - -exit /b 0 diff --git a/package/lib-acl-master-universal/build.sh b/package/lib-acl-master-universal/build.sh deleted file mode 100644 index d1d52f2..0000000 --- a/package/lib-acl-master-universal/build.sh +++ /dev/null @@ -1,103 +0,0 @@ -#! /bin/bash - -# -# Make script for CK libraries -# (depends on configured/installed compilers via CK) -# -# See CK LICENSE.txt for licensing details. -# See CK COPYRIGHT.txt for copyright details. -# -# Developer(s): -# - Grigori Fursin, 2015-2017 -# - Anton Lokhmotov, 2017 -# - -# ****************************************************************************** - -echo "Installing into ... \`${INSTALL_DIR}\`" - -mkdir -p ${INSTALL_DIR}/install -mkdir -p ${INSTALL_DIR}/install/lib -mkdir -p ${INSTALL_DIR}/install/include - -mkdir -p ${INSTALL_DIR}/src -mkdir -p ${INSTALL_DIR}/src/obj -cd ${INSTALL_DIR}/src/obj - -# ****************************************************************************** - -echo "" -echo "Building static library ..." -echo "" - -CK_TARGET_FILE=${CK_TARGET_LIB}${CK_LIB_EXT} -rm -f ${CK_TARGET_FILE} - -echo "${CK_CXX} ${CK_COMPILER_FLAGS_OBLIGATORY} ${CK_FLAGS_STATIC_LIB} ${CK_FLAGS_CREATE_OBJ} ${CK_CXXFLAGS} ${CK_SRC_FILES} ${CK_FLAG_PREFIX_INCLUDE}.." -echo "" - -${CK_CXX} ${CK_COMPILER_FLAGS_OBLIGATORY} ${CK_FLAGS_STATIC_LIB} ${CK_FLAGS_CREATE_OBJ} ${CK_CXXFLAGS} ${CK_SRC_FILES} ${CK_FLAG_PREFIX_INCLUDE}.. -if [ "${?}" != "0" ] ; then - echo "" - echo "Building static library failed!" - exit 1 -fi - -echo "${CK_LB} ${CK_LB_OUTPUT}${CK_TARGET_FILE} ${CK_OBJ_FILES}" -echo "" - -${CK_LB} ${CK_LB_OUTPUT}${CK_TARGET_FILE} ${CK_OBJ_FILES} -if [ "${?}" != "0" ] ; then - echo "" - echo "Building static library failed!" - exit 1 -fi - -cp -f ${CK_TARGET_FILE} ${INSTALL_DIR}/install/lib -if [ "${?}" != "0" ] ; then - echo "" - echo "Copying static library failed" - exit 1 -fi - -# ****************************************************************************** - -CK_TARGET_FILE_D=${CK_TARGET_LIB}${CK_DLL_EXT} -if [ "${CK_BARE_METAL}" != "on" ] ; then - echo "" - echo "Building dynamic library ..." - echo "" - - rm -f $CK_TARGET_FILE_D - - echo "${CK_CXX} ${CK_COMPILER_FLAGS_OBLIGATORY} ${CK_FLAGS_DLL} ${CK_CXXFLAGS} ${CK_SRC_FILES} ${CK_FLAG_PREFIX_INCLUDE}.. ${CK_FLAGS_OUTPUT}${CK_TARGET_FILE_D} ${CK_FLAGS_DLL_EXTRA} ${CK_LD_FLAGS_MISC} ${CK_LD_FLAGS_EXTRA} ${CK_LFLAGS}" - ${CK_CXX} ${CK_COMPILER_FLAGS_OBLIGATORY} ${CK_FLAGS_DLL} ${CK_CXXFLAGS} ${CK_SRC_FILES} ${CK_FLAG_PREFIX_INCLUDE}.. ${CK_FLAGS_OUTPUT}${CK_TARGET_FILE_D} ${CK_FLAGS_DLL_EXTRA} ${CK_LD_FLAGS_MISC} ${CK_LD_FLAGS_EXTRA} ${CK_LFLAGS} - if [ "${?}" != "0" ] ; then - echo "" - echo "Building dynamic library failed!" - exit 1 - fi - - cp -f $CK_TARGET_FILE_D ${INSTALL_DIR}/install/lib - if [ "${?}" != "0" ] ; then - echo "" - echo "Copying dynamic library failed!" - exit 1 - fi -fi - -# ****************************************************************************** - -echo "" -echo "Copying include headers ..." -echo "" - -cp -rf ${INSTALL_DIR}/src/arm_compute ${INSTALL_DIR}/install/include/arm_compute -cp -rf ${INSTALL_DIR}/src/tests/ ${INSTALL_DIR}/install/include/arm_compute -if [ "${?}" != "0" ] ; then - echo "" - echo "Copying include headers failed!" - exit 1 -fi - -exit 0 diff --git a/package/lib-acl-master-universal/custom.py b/package/lib-acl-master-universal/custom.py deleted file mode 100644 index 25bd9e4..0000000 --- a/package/lib-acl-master-universal/custom.py +++ /dev/null @@ -1,357 +0,0 @@ -#!/usr/bin/python - -# -# Developers: -# - Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net -# - Anton Lokhmotov, anton@dividiti.com -# - -import os -import sys -import json - -############################################################################## -# customize installation - -def setup(i): - """ - Input: { - cfg - meta of the soft entry - self_cfg - meta of module soft - ck_kernel - import CK kernel module (to reuse functions) - - host_os_uoa - host OS UOA - host_os_uid - host OS UID - host_os_dict - host OS meta - - target_os_uoa - target OS UOA - target_os_uid - target OS UID - target_os_dict - target OS meta - - target_device_id - target device ID (if via ADB) - - tags - list of tags used to search this entry - - env - updated environment vars from meta - customize - updated customize vars from meta - - deps - resolved dependencies for this soft - - interactive - if 'yes', can ask questions, otherwise quiet - - path - path to entry (with scripts) - install_path - installation path - } - - Output: { - return - return code = 0, if successful - > 0, if error - (error) - error text if return > 0 - - (install_env) - prepare environment to be used before the install script - } - - """ - - import os - import shutil - import glob - - # Get variables - o=i.get('out','') - - ck=i['ck_kernel'] - - hos=i['host_os_uoa'] - tos=i['target_os_uoa'] - - hosd=i['host_os_dict'] - tosd=i['target_os_dict'] - - hbits=hosd.get('bits','') - tbits=tosd.get('bits','') - - hname=hosd.get('ck_name','') # win, linux - hname2=hosd.get('ck_name2','') # win, mingw, linux, android - tname2=tosd.get('ck_name2','') # win, mingw, linux, android - - macos=hosd.get('macos','') # yes/no - - hft=i.get('features',{}) # host platform features - habi=hft.get('os',{}).get('abi','') # host ABI (only for ARM-based); if you want to get target ABI, use tosd ... - # armv7l, etc... - - p=i['path'] - - env=i['new_env'] - - pi=i.get('install_path','') - - cus=i['customize'] - ie=cus.get('install_env',{}) - nie={} # new env - - deps=i.get('deps','') - - # Converting sconscript to CK format - flags = ['-D_GLIBCXX_USE_NANOSLEEP','-Wno-deprecated-declarations','-Wall','-DARCH_ARM', - '-Wextra','-Wno-unused-parameter','-pedantic','-Wdisabled-optimization','-Wformat=2', - '-Winit-self','-Wstrict-overflow=2','-Wswitch-default', - '-fpermissive','-std=gnu++11','-Wno-vla','-Woverloaded-virtual', - '-Wctor-dtor-privacy','-Wsign-promo','-Weffc++','-Wno-format-nonliteral','-Wno-overlength-strings','-Wno-strict-overflow'] - - lcore_flags=['-ldl'] - lflags=['-ldl'] - - # Check various target params from CK - cpu_features=tosd.get('cpu_features',{}) - tneon=cpu_features.get('arm_fp_neon','') - thardfp=cpu_features.get('arm_fp_hard','') - - # ABI for Android - tabi=tosd.get('abi','') - if tabi=='': # Means host - tabi=habi # Means ARM - if tabi=='': # Means x86 (indirectly) - tabi='x86' - if str(tbits)=='64': tabi='x86_64' - - neon=False - if env.get('USE_NEON','').lower()=='on' or tneon=='yes': - neon=True - nie['USE_NEON']='ON' - - hardfp=False - if env.get('USE_BARE_METAL','').lower()=='on' or thardfp=='yes': - hardfp=True - nie['USE_BARE_METAL']='ON' - - if neon and 'x86' in tabi: - return {'return':1, 'error':'Cannot compile NEON for x86'} - - compiler_env=deps['compiler'].get('dict',{}).get('env',{}) - cxx=compiler_env['CK_CXX'] - - if compiler_env.get('CK_ENV_LIB_STDCPP_INCLUDE','')!='': - flags+=['-I'+compiler_env['CK_ENV_LIB_STDCPP_INCLUDE']] - if compiler_env.get('CK_ENV_LIB_STDCPP_INCLUDE_EXTRA','')!='': - flags+=['-I'+compiler_env['CK_ENV_LIB_STDCPP_INCLUDE_EXTRA']] - -# env['CK_ENV_LIB_STDCPP_STATIC']=libstdcpppath+sep+'libgnustl_static.a' -# env['CK_ENV_LIB_STDCPP_DYNAMIC']=libstdcpppath+sep+'libgnustl_shared.so' -# env['CK_ENV_LIB_STDCPP_INCLUDE_EXTRA']=libstdcpppath+sep+'include' - - - if 'clang++' in cxx: - flags += ['-Wno-format-nonliteral','-Wno-deprecated-increment-bool','-Wno-vla-extension','-Wno-mismatched-tags'] - elif 'g++' in cxx: - flags += ['-Wlogical-op','-Wnoexcept','-Wstrict-null-sentinel'] - - if env.get('USE_CPPTHREADS','').lower()=='on': - flags += ['-DARM_COMPUTE_CPP_SCHEDULER=1'] - - if env.get('USE_OPENMP','').lower()=='on': - if 'clang++' in cxx: - return {'return':1, 'error':'Clang does not support OpenMP. Use --env.USE_CPPTHREADS=ON'} - - flags += ['-DARM_COMPUTE_OPENMP_SCHEDULER=1','-fopenmp'] - lflags += ['-fopenmp'] - lcore_flags += ['-fopenmp'] - - if 'v7a' in tabi: - flags += ['-march=armv7-a','-mthumb','-mfpu=neon'] - - if hardfp: - flags += ['-mfloat-abi=hard'] - elif tname2=='android': - flags += ['-mfloat-abi=softfp'] - elif 'arm64' in tabi: - flags += ['-march=armv8-a'] - elif env.get('USE_ARM64_V82A','').lower()=='on': - flags += ['-march=armv8.2-a+fp16+simd'] - flags += ['-DARM_COMPUTE_ENABLE_FP16'] - elif tabi=='x86': - flags += ['-m32'] - elif tabi=='x86_64': - flags += ['-m64'] - - if tname2=='android': - flags += ['-DANDROID'] - if compiler_env.get('CK_ENV_LIB_STDCPP_STATIC','')!='': - lflags+=[compiler_env['CK_ENV_LIB_STDCPP_STATIC']] - lcore_flags+=[compiler_env['CK_ENV_LIB_STDCPP_STATIC']] -# Done via CK -# lflags+=['-static-libstdc++'] -# lcore_flags+=['-static-libstdc++'] - elif env.get('USE_BARE_METAL','').lower()=='on': - flags += ['-fPIC','-DNO_MULTI_THREADING'] - lflags+=['-static'] - lcore_flags+=['-static'] - else: - lflags += ['-lpthread'] - - flags += ['-O3','-ftree-vectorize'] - - nie['CXXFLAGS']=' '.join(flags) - nie['LFLAGS']=' '.join(lflags) - nie['LCORE_FLAGS']=' '.join(lcore_flags) - - return {'return':0, 'install_env':nie} - -############################################################################## -# customize installation after download - -def post_setup(i): - """ - Input: { - The same as in setup(i) - - new_env - last env (can be directly updated) - } - - Output: { - return - return code = 0, if successful - > 0, if error - (error) - error text if return > 0 - } - - """ - - import os - import shutil - import glob - import subprocess - - # Get variables - o=i.get('out','') - - ck=i['ck_kernel'] - - cfg=i.get('cfg',{}) - hosd=i['host_os_dict'] - tosd=i['target_os_dict'] - env=i.get('new_env',{}) - deps=i.get('deps',{}) - - hname=hosd.get('ck_name','') # win, linux - hname2=hosd.get('ck_name2','') # win, mingw, linux, android - tname2=tosd.get('ck_name2','') # win, mingw, linux, android - winh=hosd.get('windows_base','') - - lib_prefix='' - if winh!='yes' or tname2=='android': - lib_prefix='lib' - - flags=env.get('CXXFLAGS','') - lflags=env.get('LFLAGS','') - lcore_flags=env.get('LCORE_FLAGS','') - bare_metal=env.get('USE_BARE_METAL','').lower() - use_neon=env.get('USE_NEON','').lower() - - pop=i.get('path_original_package','') - pi=i.get('install_path','') - pi1=cfg.get('customize',{}).get('extra_dir','') - if pi1=='': pi1=cfg.get('customize',{}).get('git_src_dir','') - - build_dir=pi - if pi1!='': build_dir=os.path.join(pi,pi1) - - if not os.path.isdir(build_dir): - return {'return':1, 'error':'Something is wrong - build directory is not there ('+build_dir+')'} - - os.chdir(build_dir) - - xcore_files = glob.glob('src/core/*.cpp') - xcore_files += glob.glob('src/core/CPP/*.cpp') - - xfiles = glob.glob('src/runtime/*.cpp') - - embed_files = [] - xcore_files += glob.glob('src/core/CPP/kernels/*.cpp') - - # CLHarrisCorners uses the Scheduler to run CPP kernels - xfiles += glob.glob('src/runtime/CPP/SingleThreadScheduler.cpp') - - if bare_metal=='on': - if env.get('USE_CPPTHREADS','').lower()=='on' or env.get('USE_OPENMP','').lower()=='on': - return {'return':1, 'error':'OpenMP and C++11 threads not supported in bare_metal. use --env.USE_CPPTHREADS=OFF --env.USE_OPENMP=OFF'} - else: - if env.get('USE_CPPTHREADS','').lower()=='on': - xfiles += glob.glob('src/runtime/CPP/CPPScheduler.cpp') - if env.get('USE_OPENMP','').lower()=='on': - xfiles += glob.glob('src/runtime/OMP/OMPScheduler.cpp') - - if use_neon=='on': - xcore_files += glob.glob('src/core/NEON/*.cpp') - xcore_files += glob.glob('src/core/NEON/kernels/*.cpp') - xfiles += glob.glob('src/runtime/NEON/*.cpp') - xfiles += glob.glob('src/runtime/NEON/functions/*.cpp') - - # Generate string with build options library version to embed in the library: - r=ck.run_and_get_stdout({'cmd':['git','rev-parse','HEAD']}) - if r['return']==0 and r['return_code']==0: - git_hash=r['stdout'].strip() - - version_filename = 'arm_compute_version.embed' #"%s/arm_compute_version.embed" % os.path.dirname(glob.glob("src/core/*")[0].rstr()) - build_info = "\"arm_compute_version=%s Build options: %s Git hash=%s\"" % ('', '', git_hash.strip()) - - r=ck.save_text_file({'text_file':version_filename, 'string':build_info}) - if r['return']>0: return r - - # Common functionality to build the core lib or the core+runtime libs. - def build(lib_target, files, link_flags, hosd, deps, pop, bare_metal): - oext=deps.get('compiler',{}).get('dict',{}).get('env',{}).get('CK_OBJ_EXT','') - sext=hosd.get('script_ext','') - eset=hosd.get('env_set','') - eifs=hosd.get('env_quotes_if_space','') - - # Prepare obj names. - core_files='' - obj_core_files='' - for f in files: - f=f.replace('\\','/') # fix windows names - fo=os.path.basename(os.path.splitext(f)[0]+oext) - - core_files+=' ../'+f - obj_core_files+=' '+fo - - # Set up compiler env. - sb=hosd.get('batch_prefix','')+'\n' - - sb+=deps.get('compiler',{}).get('bat','')+'\n' - - sb+=eset+' INSTALL_DIR='+pi+'\n' - sb+=eset+' BUILD_DIR='+build_dir+'\n' - sb+=eset+' CK_TARGET_LIB='+lib_target+'\n' - sb+=eset+' CK_BARE_METAL='+bare_metal+'\n' - sb+=eset+' CK_CXXFLAGS='+eifs+flags+eifs+'\n' - sb+=eset+' CK_LFLAGS='+eifs+link_flags+eifs+'\n' - sb+=eset+' CK_SRC_FILES='+eifs+core_files+eifs+'\n' - sb+=eset+' CK_OBJ_FILES='+eifs+obj_core_files+eifs+'\n' - - sb+=hosd.get('env_call','')+' '+os.path.join(pop,'build'+sext) - - # Prepare tmp script. - rx=ck.gen_tmp_file({'prefix':'tmp-ck-', 'suffix':sext}) - if rx['return']>0: return rx - fn=rx['file_name'] - - rx=ck.save_text_file({'text_file':fn, 'string':sb}) - if rx['return']>0: return rx - - # Set script as executable if required. - se=hosd.get('set_executable','') - if se!='': - x=se+' '+fn - rx=os.system(x) - - # Run script. - rx=os.system(fn) - - # Build the core lib. - build(lib_prefix+'arm_compute_core', xcore_files, lcore_flags, hosd, deps, pop, bare_metal) - - # Build the core and runtime libs. - build(lib_prefix+'arm_compute', xcore_files+xfiles, lflags, hosd, deps, pop, bare_metal) - - return {'return':0} diff --git a/package/lib-acl-opencl-17.06/.cm/desc.json b/package/lib-acl-opencl-17.06/.cm/desc.json deleted file mode 100644 index 0967ef4..0000000 --- a/package/lib-acl-opencl-17.06/.cm/desc.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/package/lib-acl-opencl-17.06/.cm/info.json b/package/lib-acl-opencl-17.06/.cm/info.json deleted file mode 100644 index 39c461a..0000000 --- a/package/lib-acl-opencl-17.06/.cm/info.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "backup_data_uid": "b420f42d04d49a98", - "backup_module_uid": "1dc07ee0f4742028", - "backup_module_uoa": "package", - "control": { - "author": "Grigori Fursin", - "author_email": "Grigori.Fursin@cTuning.org", - "author_webpage": "http://fursin.net", - "copyright": "See CK COPYRIGHT.txt for copyright details", - "engine": "CK", - "iso_datetime": "2017-09-04T11:36:46.588961", - "license": "See CK LICENSE.txt for licensing details", - "version": [ - "1", - "9", - "1", - "1" - ] - }, - "data_name": "lib-acl-opencl-17.06" -} diff --git a/package/lib-acl-opencl-17.06/.cm/meta.json b/package/lib-acl-opencl-17.06/.cm/meta.json deleted file mode 100644 index c0b3a26..0000000 --- a/package/lib-acl-opencl-17.06/.cm/meta.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "customize": { - "extra_dir": "", - "git_src_dir": "src", - "install_env": { - "PACKAGE_AUTOGEN": "NO", - "PACKAGE_GIT": "YES", - "PACKAGE_SUB_DIR": "src", - "PACKAGE_SUB_DIR1": "src", - "PACKAGE_GIT_CHECKOUT": "v17.06", - "PACKAGE_URL": "https://github.com/ARM-software/ComputeLibrary", - "PACKAGE_SKIP_LINUX_MAKE": "YES", - "USE_ARM64_V82A": "OFF", - "USE_BARE_METAL": "OFF", - "USE_BENCHMARK_TEST": "OFF", - "USE_CPPTHREADS": "ON", - "USE_EMBEDDED_KERNELS": "OFF", - "USE_NEON": "OFF", - "USE_OPENCL": "ON", - "USE_OPENMP": "OFF", - "USE_VALIDATION_TEST": "OFF" - }, - "version": "17.06" - }, - "deps": { - "compiler": { - "local": "yes", - "name": "C++ compiler", - "sort": 10, - "tags": "compiler,lang-cpp" - }, - "opencl": { - "local": "yes", - "name": "OpenCL library", - "skip_installed": { - "android": "yes" - }, - "sort": 20, - "tags": "lib,opencl" - } - }, - "end_full_path": { - "android": "install$#sep#$lib$#sep#$libarm_compute.a", - "linux": "install/lib/libarm_compute.a", - "mingw": "install\\lib\\arm_compute.a", - "win": "install\\lib\\arm_compute.lib" - }, - "need_cpu_info": "yes", - "only_for_host_os_tags": [ - "windows", - "linux" - ], - "only_for_target_os_tags": [ - "windows", - "linux", - "android" - ], - "process_script": "install", - "soft_uoa": "fc544df6941a5491", - "suggested_path": "lib-acl-opencl", - "tags": [ - "lib", - "arm", - "acl", - "arm-compute-lib", - "vopencl", - "vmaster" - ], - "use_scripts_from_another_entry": { - "data_uoa": "cd9ccc74060b3d18", - "module_uoa": "script" - } -} diff --git a/package/lib-acl-opencl-17.06/Makefile b/package/lib-acl-opencl-17.06/Makefile deleted file mode 100644 index abb772a..0000000 --- a/package/lib-acl-opencl-17.06/Makefile +++ /dev/null @@ -1,32 +0,0 @@ - -CXX=$(CK_CXX) -AR_RCS=$(CK_LB) - -CXXFLAGS=$(CK_COMPILER_FLAGS_OBLIGATORY) $(CK_FLAGS_STATIC_LIB) $(CK_CXXFLAGS) $(CK_FLAG_PREFIX_INCLUDE).. -MMD -MP -LDFLAGS=$(CK_LFLAGS) - -SRC=$(CK_SRC_FILES) -OBJ=$(SRC:.cpp=.o) -DEP=$(SRC:.cpp=.d) - -TARGET_DIR=$(INSTALL_DIR)/install/lib -LIB_STATIC=$(TARGET_DIR)/$(CK_TARGET_LIB)$(CK_LIB_EXT) -LIB_DYNAMIC=$(TARGET_DIR)/$(CK_TARGET_LIB)$(CK_DLL_EXT) - -.PHONY: all clean - -all: $(LIB_STATIC) $(LIB_DYNAMIC) - --include $(DEP) - -$(LIB_STATIC): $(OBJ) | $(TARGET_DIR) - $(AR_RCS) $@ $(OBJ) - -$(LIB_DYNAMIC): $(OBJ) | $(TARGET_DIR) - $(CXX) $(CK_FLAGS_DLL) $(CXXFLAGS) $(CK_FLAGS_OUTPUT) $(LIB_DYNAMIC) $(CK_FLAGS_DLL_EXTRA) $(CK_LD_FLAGS_MISC) $(CK_LD_FLAGS_EXTRA) $(OBJ) $(CK_LFLAGS) - -clean: - rm -rf $(OBJ) $(LIB_STATIC) $(LIB_DYNAMIC) $(DEP) - -$(TARGET_DIR): - mkdir -p $@ diff --git a/package/lib-acl-opencl-17.06/README.txt b/package/lib-acl-opencl-17.06/README.txt deleted file mode 100644 index a7da7c6..0000000 --- a/package/lib-acl-opencl-17.06/README.txt +++ /dev/null @@ -1,8 +0,0 @@ -Grigori Fursin converted original sconscript from ARM Compute Lib -(https://github.com/ARM-software/ComputeLibrary) -to multi-platform software manager in the CK -(https://github.com/ctuning/ck/wiki/Portable-workflows) -to support portable experimental workflows. - - - diff --git a/package/lib-acl-opencl-17.06/build.bat b/package/lib-acl-opencl-17.06/build.bat deleted file mode 100644 index 6fce3f9..0000000 --- a/package/lib-acl-opencl-17.06/build.bat +++ /dev/null @@ -1,19 +0,0 @@ -@echo off - -rem ******************************************************************************************************************************* - -mkdir "%INSTALL_DIR%\src\obj" -cd "%INSTALL_DIR%\src\obj" - -"%CK_MAKE%" -j %CK_HOST_CPU_NUMBER_OF_PROCESSORS% -f "%ORIGINAL_PACKAGE_DIR%\Makefile" %* -set code=%errorlevel% - -if %code% equ 0 ( - cd .. - xcopy arm_compute ..\install\include\arm_compute /e /c /i /y - xcopy tests ..\install\include\arm_compute\tests /e /c /i /y -) - -cd "%INSTALL_DIR%" - -exit /b %code% diff --git a/package/lib-acl-opencl-17.06/build.sh b/package/lib-acl-opencl-17.06/build.sh deleted file mode 100644 index b6769d9..0000000 --- a/package/lib-acl-opencl-17.06/build.sh +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/bash - -# -# Make script for CK libraries -# (depends on configured/installed compilers via CK) -# -# See CK LICENSE.txt for licensing details. -# See CK COPYRIGHT.txt for copyright details. -# -# Developer(s): -# - Grigori Fursin, 2015-2017 -# - Anton Lokhmotov, 2017 -# - Dmitry Savenko, 2017 -# - -# ****************************************************************************** - -mkdir -p ${INSTALL_DIR}/src/obj -cd ${INSTALL_DIR}/src/obj - -${CK_MAKE} -j ${CK_HOST_CPU_NUMBER_OF_PROCESSORS} -f ${ORIGINAL_PACKAGE_DIR}/Makefile $@ - -cd .. -rm -rf ../install/include -mkdir ../install/include -cp -rf arm_compute ../install/include -cp -rf tests ../install/include/arm_compute diff --git a/package/lib-acl-opencl-17.06/custom.py b/package/lib-acl-opencl-17.06/custom.py deleted file mode 100644 index ee8f77b..0000000 --- a/package/lib-acl-opencl-17.06/custom.py +++ /dev/null @@ -1,519 +0,0 @@ - - -# -# Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net -# - -import os -import sys -import json -import re -import collections -import errno - -############################################################################## -def file_get_contents(filename): - return open(filename).read() -def resolve_includes(target, source, lpath): - # File collection - FileEntry = collections.namedtuple('FileEntry', 'target_name file_contents') - # Include pattern - pattern = re.compile("#include \"(.*)\"") - - # Get file contents - files = [] - for s in source: - name = s.split("/")[-1] - s_absp = lpath +'/src/'+ s - mycontents = file_get_contents(s_absp) - contents=mycontents.splitlines() - embed_target_name = s_absp + "embed" - entry = FileEntry(target_name=embed_target_name, file_contents=contents) - files.append((name,entry)) - - # Create dictionary of tupled list - files_dict = dict(files) - - # Check for includes (can only be files in the same folder) - final_files = [] - for file in files: - done = False - tmp_file = file[1].file_contents - while not done: - file_count = 0 - updated_file = [] - for line in tmp_file: - found = pattern.search(line) - if found: - include_file = found.group(1) - data = files_dict[include_file].file_contents - updated_file.extend(data) - else: - updated_file.append(line) - file_count += 1 - - # Check if all include are replaced. - if file_count == len(tmp_file): - done = True - - # Update temp file - tmp_file = updated_file - - # Append and prepend string literal identifiers and add expanded file to final list - tmp_file.insert(0, "R\"(\n") - tmp_file.append("\n)\"") - entry = FileEntry(target_name=file[1].target_name, file_contents=tmp_file) - final_files.append((file[0], entry)) - - # Write output files - for file in final_files: - with open(file[1].target_name, 'w+') as out_file: - contents = file[1].file_contents - for line in contents: - out_file.write("%s\n" % line) - -def setup(i): - """ - Input: { - cfg - meta of the soft entry - self_cfg - meta of module soft - ck_kernel - import CK kernel module (to reuse functions) - - host_os_uoa - host OS UOA - host_os_uid - host OS UID - host_os_dict - host OS meta - - target_os_uoa - target OS UOA - target_os_uid - target OS UID - target_os_dict - target OS meta - - target_device_id - target device ID (if via ADB) - - tags - list of tags used to search this entry - - env - updated environment vars from meta - customize - updated customize vars from meta - - deps - resolved dependencies for this soft - - interactive - if 'yes', can ask questions, otherwise quiet - - path - path to entry (with scripts) - install_path - installation path - } - - Output: { - return - return code = 0, if successful - > 0, if error - (error) - error text if return > 0 - - (install_env) - prepare environment to be used before the install script - } - - """ - - import os - import shutil - import glob - - # Get variables - o=i.get('out','') - - ck=i['ck_kernel'] - - hos=i['host_os_uoa'] - tos=i['target_os_uoa'] - - hosd=i['host_os_dict'] - tosd=i['target_os_dict'] - - hbits=hosd.get('bits','') - tbits=tosd.get('bits','') - - hname=hosd.get('ck_name','') # win, linux - hname2=hosd.get('ck_name2','') # win, mingw, linux, android - tname2=tosd.get('ck_name2','') # win, mingw, linux, android - - macos=hosd.get('macos','') # yes/no - - hft=i.get('features',{}) # host platform features - habi=hft.get('os',{}).get('abi','') # host ABI (only for ARM-based); if you want to get target ABI, use tosd ... - # armv7l, etc... - - p=i['path'] - - env=i['new_env'] - - pi=i.get('install_path','') - - cus=i['customize'] - ie=cus.get('install_env',{}) - nie={} # new env - - deps=i.get('deps','') - - # Converting sconscript to CK format - flags = ['-D_GLIBCXX_USE_NANOSLEEP','-Wno-deprecated-declarations','-Wall','-DARCH_ARM', - '-Wextra','-Wno-unused-parameter','-pedantic','-Wdisabled-optimization','-Wformat=2', - '-Winit-self','-Wstrict-overflow=2','-Wswitch-default', - '-fpermissive','-std=gnu++11','-Wno-vla','-Woverloaded-virtual', - '-Wctor-dtor-privacy','-Wsign-promo','-Weffc++','-Wno-format-nonliteral','-Wno-overlength-strings','-Wno-strict-overflow'] - - lcore_flags=['-ldl'] - lflags=['-ldl'] - - # Check various target params from CK - cpu_features=tosd.get('cpu_features',{}) - tneon=cpu_features.get('arm_fp_neon','') - thardfp=cpu_features.get('arm_fp_hard','') - - # ABI for Android - tabi=tosd.get('abi','') - if tabi=='': # Means host - tabi=habi # Means ARM - if tabi=='': # Means x86 (indirectly) - tabi='x86' - if str(tbits)=='64': tabi='x86_64' - - neon=False - if env.get('USE_NEON','').lower()=='on' or tneon=='yes': - neon=True - nie['USE_NEON']='ON' - - opencl=False - if env.get('USE_OPENCL','').lower()=='on': - opencl=True - nie['USE_OPENCL']='ON' - openclenv = deps['opencl']['dict'].get('customize') -# ck.debug_out(openclenv) - ipath = openclenv.get('path_include') - lpath = openclenv.get('path_lib') -# flags += ['-I'+ipath] ACL uses local CL/cl.h cl2.h - flags += ['-I../include'] -# nie['CK_FLAG_PREFIX_INCLUDE'] = '' - lflags +=['-L'+lpath+' -lOpenCL'] -# lcore_flags += [''] - if env.get('USE_EMBEDDED_KERNELS','').lower()=='on': - flags += ['-DEMBEDDED_KERNELS'] - - hardfp=False - if env.get('USE_BARE_METAL','').lower()=='on' or thardfp=='yes': - hardfp=True - nie['USE_BARE_METAL']='ON' - - -# if env.get('USE_VALIDATION_TEST','').lower()=='on': -# print "VALIDATION" - -# if env.get('USE_BENCHMARK_TEST','').lower()=='on': -# print "BENCHMARK" - - - if neon and 'x86' in tabi: - return {'return':1, 'error':'Cannot compile NEON for x86'} - - - compiler_env=deps['compiler'].get('dict',{}).get('env',{}) - cxx=compiler_env['CK_CXX'] - - if compiler_env.get('CK_ENV_LIB_STDCPP_INCLUDE','')!='': - flags+=['-I'+compiler_env['CK_ENV_LIB_STDCPP_INCLUDE']] - if compiler_env.get('CK_ENV_LIB_STDCPP_INCLUDE_EXTRA','')!='': - flags+=['-I'+compiler_env['CK_ENV_LIB_STDCPP_INCLUDE_EXTRA']] -# env['CK_ENV_LIB_STDCPP_STATIC']=libstdcpppath+sep+'libgnustl_static.a' -# env['CK_ENV_LIB_STDCPP_DYNAMIC']=libstdcpppath+sep+'libgnustl_shared.so' -# env['CK_ENV_LIB_STDCPP_INCLUDE_EXTRA']=libstdcpppath+sep+'include' - - - if 'clang++' in cxx: - flags += ['-Wno-format-nonliteral','-Wno-deprecated-increment-bool','-Wno-vla-extension','-Wno-mismatched-tags'] - elif 'g++' in cxx: - flags += ['-Wlogical-op','-Wnoexcept','-Wstrict-null-sentinel'] - - if env.get('USE_CPPTHREADS','').lower()=='on': - flags += ['-DARM_COMPUTE_CPP_SCHEDULER=1'] - - if env.get('USE_OPENMP','').lower()=='on': - if 'clang++' in cxx: - return {'return':1, 'error':'Clang does not support OpenMP. Use --env.USE_CPPTHREADS=ON'} - - flags += ['-DARM_COMPUTE_OPENMP_SCHEDULER=1','-fopenmp'] - lflags += ['-fopenmp'] - lcore_flags += ['-fopenmp'] - - if 'v7a' in tabi: - flags += ['-march=armv7-a','-mthumb','-mfpu=neon'] - - if hardfp: - flags += ['-mfloat-abi=hard'] - elif tname2=='android': - flags += ['-mfloat-abi=softfp'] - elif 'arm64' in tabi: - flags += ['-march=armv8-a'] - elif env.get('USE_ARM64_V82A','').lower()=='on': - flags += ['-march=armv8.2-a+fp16+simd'] - flags += ['-DARM_COMPUTE_ENABLE_FP16'] - elif tabi=='x86': - flags += ['-m32'] - elif tabi=='x86_64': - flags += ['-m64'] - - if tname2=='android': - flags += ['-DANDROID'] - if compiler_env.get('CK_ENV_LIB_STDCPP_STATIC','')!='': - lflags+=[compiler_env['CK_ENV_LIB_STDCPP_STATIC']] - lcore_flags+=[compiler_env['CK_ENV_LIB_STDCPP_STATIC']] -# Done via CK -# lflags+=['-static-libstdc++'] -# lcore_flags+=['-static-libstdc++'] - elif env.get('USE_BARE_METAL','').lower()=='on': - flags += ['-fPIC','-DNO_MULTI_THREADING'] - lflags+=['-static'] - lcore_flags+=['-static'] - else: - lflags += ['-lpthread'] - - flags += ['-O3','-ftree-vectorize'] - - nie['CXXFLAGS']=' '.join(flags) - nie['LFLAGS']=' '.join(lflags) - nie['LCORE_FLAGS']=' '.join(lcore_flags) - - return {'return':0, 'install_env':nie} - -############################################################################## -# customize installation after download - -def _slash(s): - return s.replace('\\','/') - -def post_setup(i): - """ - Input: { - The same as in setup(i) - - new_env - last env (can be directly updated) - } - - Output: { - return - return code = 0, if successful - > 0, if error - (error) - error text if return > 0 - } - - """ - - import os - import shutil - import glob - import subprocess - - # Get variables - o=i.get('out','') - - ck=i['ck_kernel'] - - cfg=i.get('cfg',{}) - hosd=i['host_os_dict'] - tosd=i['target_os_dict'] - - winh=hosd.get('windows_base','') - - eset=hosd.get('env_set','') - eifs=hosd.get('env_quotes_if_space','') - sext=hosd.get('script_ext','') - - hname=hosd.get('ck_name','') # win, linux - hname2=hosd.get('ck_name2','') # win, mingw, linux, android - tname2=tosd.get('ck_name2','') # win, mingw, linux, android - - env=i.get('new_env',{}) - - deps=i.get('deps',{}) - pi=i.get('install_path','') - libprefix='' - if winh!='yes' or tname2=='android': - libprefix='lib' - - compiler_env=deps['compiler'].get('dict',{}).get('env',{}) - obj_ext=compiler_env.get('CK_OBJ_EXT') - - flags=env.get('CXXFLAGS','') - lflags=env.get('LFLAGS','') - lcore_flags=env.get('LCORE_FLAGS','') - bare_metal=env.get('USE_BARE_METAL','').lower() - use_neon=env.get('USE_NEON','').lower() - use_opencl= env.get('USE_OPENCL','').lower() - use_embed_kernel= env.get('USE_EMBEDDED_KERNELS','').lower() - - pp=i.get('path_original_package','') - - pi=i.get('install_path','') - pi1=cfg.get('customize',{}).get('extra_dir','') - if pi1=='': pi1=cfg.get('customize',{}).get('git_src_dir','') - - build_dir=pi - if pi1!='': build_dir=os.path.join(pi,pi1) - - if not os.path.isdir(build_dir): - return {'return':1, 'error':'Something is wrong - build directory is not there ('+build_dir+')'} - - os.chdir(build_dir) - - xcore_files = glob.glob('src/core/*.cpp') - xcore_files += glob.glob('src/core/CPP/*.cpp') - - xfiles = glob.glob('src/runtime/*.cpp') - - embed_files = [] - files_to_delete = [] - - xcore_files += glob.glob('src/core/CPP/kernels/*.cpp') - - # CLHarrisCorners uses the Scheduler to run CPP kernels - xfiles += glob.glob('src/runtime/CPP/SingleThreadScheduler.cpp') - - if bare_metal=='on': - if env.get('USE_CPPTHREADS','').lower()=='on' or env.get('USE_OPENMP','').lower()=='on': - return {'return':1, 'error':'OpenMP and C++11 threads not supported in bare_metal. use --env.USE_CPPTHREADS=OFF --env.USE_OPENMP=OFF'} - else: - if env.get('USE_CPPTHREADS','').lower()=='on': - xfiles += glob.glob('src/runtime/CPP/CPPScheduler.cpp') - if env.get('USE_OPENMP','').lower()=='on': - xfiles += glob.glob('src/runtime/OMP/OMPScheduler.cpp') - - if use_opencl=='on': - xcore_files += glob.glob('src/core/CL/*.cpp') - xcore_files += glob.glob('src/core/CL/kernels/*.cpp') - xfiles += glob.glob('src/runtime/CL/*.cpp') - xfiles += glob.glob('src/runtime/CL/functions/*.cpp') - if use_embed_kernel == 'on': - cl_files = glob.glob('src/core/CL/cl_kernels/*.cl') + glob.glob('src/core/CL/cl_kernels/*.h') - source_list = [] - for file in cl_files: - source_name = file - source_list.append(source_name) - embed_files.append(source_name + "embed") -# generate_embed = env.Command(embed_files, source_list, action=resolve_includes) - generate_embed = resolve_includes(embed_files, source_list,pi) - #Default(generate_embed) - files_to_delete += embed_files - if use_neon=='on': - xcore_files += glob.glob('src/core/NEON/*.cpp') - xcore_files += glob.glob('src/core/NEON/kernels/*.cpp') - xfiles += glob.glob('src/runtime/NEON/*.cpp') - xfiles += glob.glob('src/runtime/NEON/functions/*.cpp') - - - - - - # Generate string with build options library version to embed in the library: - r=ck.run_and_get_stdout({'cmd':['git','rev-parse','HEAD']}) - if r['return']==0 and r['return_code']==0: - git_hash=r['stdout'].strip() - - version_filename = 'arm_compute_version.embed' #"%s/arm_compute_version.embed" % os.path.dirname(glob.glob("src/core/*")[0].rrstr()) - build_info = "\"arm_compute_version=%s Build options: %s Git hash=%s\"" % ('', '', git_hash.strip()) - - r=ck.save_text_file({'text_file':version_filename, 'string':build_info}) - if r['return']>0: return r - - # BUILDING CORE LIB ************************************************************** - # Clean up files and prepare obj names - core_files='' - obj_core_files='' - - for f in xcore_files: - f=_slash(f) # fix windows names - fo=os.path.splitext(f)[0]+obj_ext - - core_files+=' ../'+f - obj_core_files+=' ../'+fo - - # Compiler env - sb=hosd.get('batch_prefix','')+'\n' - - sb+=deps.get('compiler',{}).get('bat','')+'\n' - - sb+=eset+' INSTALL_DIR='+_slash(pi)+'\n\n' - sb+=eset+' BUILD_DIR='+_slash(build_dir)+'\n\n' - sb+=eset+' CK_CXXFLAGS='+_slash(eifs+flags+eifs)+'\n' - sb+=eset+' CK_LFLAGS='+_slash(eifs+lcore_flags+eifs)+'\n' - sb+=eset+' CK_SRC_FILES='+_slash(eifs+core_files+eifs)+'\n' - sb+=eset+' CK_TARGET_LIB='+_slash(libprefix)+'arm_compute_core\n' - sb+=eset+' CK_BARE_METAL='+bare_metal+'\n' - sb+=eset+' ORIGINAL_PACKAGE_DIR='+_slash(pp)+'\n\n' - sb+=eset+' CK_HOST_CPU_NUMBER_OF_PROCESSORS='+str(env.get('CK_HOST_CPU_NUMBER_OF_PROCESSORS', 1))+'\n\n' - - rest_params_var = '%*' if hname == 'win' else '$@' - sb+=hosd.get('env_call','')+' '+os.path.join(pp,'build'+sext) + ' ' + rest_params_var - - # Prepare build script - fn=os.path.join(pi, 'build_core' + sext) - try: - os.makedirs(os.path.dirname(fn)) - except OSError as exc: - if exc.errno != errno.EEXIST: - raise - - rx=ck.save_text_file({'text_file':fn, 'string':sb}) - if rx['return']>0: return rx - - # Check if need to set executable flags - se=hosd.get('set_executable','') - if se!='': - x=se+' '+fn - rx=os.system(x) - - # Run script - rx=os.system(fn) - - # BUILDING CORE + RUNTIME LIB ************************************************************** - # Clean up files and prepare obj names - files='' - for f in xfiles: - f=_slash(f) # fix windows names - fo=os.path.splitext(f)[0]+obj_ext - - core_files+=' ../'+f - obj_core_files+=' ../'+fo - - # Compiler env - sb=hosd.get('batch_prefix','')+'\n' - - sb+=deps.get('compiler',{}).get('bat','')+'\n' - - sb+=eset+' INSTALL_DIR='+_slash(pi)+'\n\n' - sb+=eset+' BUILD_DIR='+_slash(build_dir)+'\n\n' - sb+=eset+' CK_CXXFLAGS='+_slash(eifs+flags+eifs)+'\n' - sb+=eset+' CK_LFLAGS='+_slash(eifs+lflags+eifs)+'\n' - sb+=eset+' CK_SRC_FILES='+_slash(eifs+core_files+eifs)+'\n' - sb+=eset+' CK_TARGET_LIB='+_slash(libprefix)+'arm_compute\n' - sb+=eset+' CK_BARE_METAL='+bare_metal+'\n' - sb+=eset+' ORIGINAL_PACKAGE_DIR='+_slash(pp)+'\n\n' - sb+=eset+' CK_HOST_CPU_NUMBER_OF_PROCESSORS='+str(env.get('CK_HOST_CPU_NUMBER_OF_PROCESSORS', 1))+'\n\n' - - sb+=hosd.get('env_call','')+' '+os.path.join(pp,'build'+sext) + ' ' + rest_params_var - - # Prepare build script - fn=os.path.join(pi, 'build' + sext) - try: - os.makedirs(os.path.dirname(fn)) - except OSError as exc: - if exc.errno != errno.EEXIST: - raise - - rx=ck.save_text_file({'text_file':fn, 'string':sb}) - if rx['return']>0: return rx - - # Check if need to set executable flags - se=hosd.get('set_executable','') - if se!='': - x=se+' '+fn - rx=os.system(x) - - # Run script - rx=os.system(fn) - - return {'return':0}