Installation Glow编译器安装指南 sudo忍者所有 [0/1]正在运行CMake。。。 --找到带有新式glog目标的glog。 --找到LLVM 8.0.1 --在中使用LLVMConfig.cmake:/usr/local/lib/cmake/llvm 添加CPU后端。 添加CMakeFiles后端。 添加解释器后端。 --*******摘要******** --CMake版本:3.5.1 --CMake命令:/usr/bin/CMake --系统:Linux C++编译器:/Ur/bin /C++ --C++编译器版本:5.5.0 --CXX标志:-Wall-Wnon虚拟dtor-fno异常-fno rtti-Wno psabi-Wnon虚拟dtor --构建类型:发布 --编译定义:GIT_SHA1=“ef7f916”;GIT_DATE=“2019-09-12”;与_PNG;发光,发光系数为1;用_CPU=1发光_;谷歌协议;ONNX\u名称空间=glow\u ONNX --CMAKE_前缀_路径:/usr/bin --CMAKE\u安装前缀:/usr/local --CMAKE_模块路径:/home/tcs/sairam/glow/CMAKE/modules --ONNX版本:1.5.0 --ONNX名称空间:glow\u ONNX --ONNX_构建_测试:关闭 --ONNX_构建_基准:关闭 --ONNX\u使用\u LITE\u协议:关闭 --ONNXIFI\u虚拟\u后端:关闭 --ONNXIFI\u启用\u扩展:关闭 --Protobuf编译器:/usr/bin/protoc --Protobuf include:/usr/include --Protobuf库:优化/usr/lib/x86_64-linux-gnu/libprotobuf.so;调试/usr/lib/x86_64-linux-gnu/libprotobuf.so-pthread --BUILD\u ONNX\u PYTHON:OFF --找不到LLVM文件检查 --git版本:v1.5.0 --版本:1.5.0 --执行测试HAVE_STD_REGEX——成功 --执行测试HAVE_GNU_POSIX_REGEX--编译失败 --执行测试HAVE_POSIX_REGEX——成功 --执行测试时时钟稳定-成功 正在跳过添加测试en2gr\u cpu\u测试,因为它需要一个models目录。使用-DGLOW_MODELS_DIR进行配置。 正在跳过添加测试en2gr\u量化\u测试,因为它需要模型目录。使用-DGLOW_MODELS_DIR进行配置。 正在跳过添加测试en2gr\u cpu\u分区\u测试,因为它需要模型目录。使用-DGLOW_MODELS_DIR进行配置。 正在跳过添加测试en2gr\u cpu\u config\u测试,因为它需要一个models目录。使用-DGLOW_MODELS_DIR进行配置。 正在跳过添加测试resnet\u runtime\u测试,因为它需要一个models目录。使用-DGLOW_MODELS_DIR进行配置。 --配置完成 --生成完成 --生成文件已写入:/home/glow [1/111]链接CXX可执行文件bin/resnet验证 失败:bin/resnet验证 :&&/usr/bin/c++-Wall-Wnon virtual dtor-fno exceptions-fno rtti-Wno psabi-O3-DNDEBUG-march=native-ffast math-fno finite math only examples/cmakfiles/resnet verify.cpp.o-o-bin/resnet verify lib/ExecutionEngine.a lib/Graph/libGraph.a lib/Importer/libImporter.a lib/Runtime/HostManager/libHostManager.alib/Partitioner/libPartitioner.a lib/Runtime/Provisioner/libProvisioner.a lib/Runtime/Executor/libExecutor.a lib/Optimizer/GraphOptimizer/libGraphOptimizer.a lib/Backends/libBackends.a lib/Quantization/libQuantization.a lib/Backend/libBackend.a lib/ExecutionContext/libExecutionContext.a lib/CodeGen/IR/libIR.alib/Optimizer/GraphOptimizerPipeline/libGraphOptimizerPipeline.a/usr/local/lib/libLLVMCore.a/usr/local/lib/libLLVMBinaryFormat.a lib/Converter/libConverter.a lib/Graph/libGraph/libGraph.a lib/Quantization/Base/libQuantizationBase/libQuantizationBase.a lib/Support/TensorPool.a lib/Base/lib/libTensorPool.a/lib/lib/lib/libSupport/lib.a/usr/local/lib/libglog.a/usr/local/lib/libLLVMSupport.a-lz-lrt-ldl-ltinfo-lpthread-lm/usr/local/lib/libLLVMDemangle.a lib/Importer/build_onnx/libonnx_proto.a-pthread/usr/lib/x86_64-linux-gnu/libprotobuf.so&: lib/Runtime/hotmanager/libhotmanager.a(hotmanager.cpp.o):函数中的glow::Runtime::hotmanager::exportMemoryCounters()':hotmanager.cpp:(.text+0x601):对glow::Stats()的未定义引用 hotmanager.cpp:(.text+0x618):未定义对glow::StatExporterRegistry::setCounter(llvm::StringRef,long)的引用。'hotmanager.cpp:(.text+0x61d):未定义对glow::Stats()的引用' hotmanager.cpp:(.text+0x634):未定义对glow::StatExporterRegistry::setCounter(llvm::StringRef,long)的引用。'hotmanager.cpp:(.text+0x639):未定义对glow::Stats()的引用' HostManager.cpp:(.text+0x650):对glow::statexporterRegistry::setCounter(llvm::StringRef,long)“lib/Runtime/HostManager/libHostManager.a(HostManager.cpp.o)”的未定义引用:在函数glow::Runtime::HostManager::clearHost()中: HostManager.cpp:(.text+0x3521):未定义对glow::Stats()的引用。'HostManager.cpp:(.text+0x3537):未定义对glow::StatExporterRegistry::setCounter的引用(llvm::StringRef,long)' HostManager.cpp:(.text+0x353c):未定义对glow::Stats()的引用。'HostManager.cpp:(.text+0x3552):未定义对glow::StatExporterRegistry::setCounter的引用(llvm::StringRef,long)' HostManager.cpp:(.text+0x3557):未定义对glow::Stats()的引用。'HostManager.cpp:(.text+0x356d):未定义对glow::StatExporterRegistry::setCounter的引用(llvm::StringRef,long)' lib/Base/libBase.a(Image.cpp.o):函数中的glow::getPngInfo(char const*)':Image.cpp:(.text+0x1b5):对png_set_longjmp_fn的未定义引用 lib/Base/libBase.a(Image.cpp.o):在函数glow::writePngImage(glow::Tensor*,char const*,std::pair,llvm::ArrayRef,llvm::ArrayRef)“中:Image.cpp:(.text+0x5e6):对png_set_longjmpfn的未定义引用” Image.cpp:(.text+0x641):未定义对png_集_longjmp_fn'图像的引用。cpp:(.text+0x6c8):未定义对png_集_longjmp_fn'的引用 Image.cpp:(.text+0x8a6):对png_set_longjmp_fn'lib/Base/libBase.a的未定义引用(Image.cpp.o):Image.cpp:(.text+0xa4f):下面是对png_set_longjmp_fn'的更多未定义引用 collect2:错误:ld返回了1个退出状态
Glow编译器先决条件:Installation Glow编译器安装指南 sudo忍者所有 [0/1]正在运行CMake。。。 --找到带有新式glog目标的glog。 --找到LLVM 8.0.1 --在中使用LLVMConfig.cmake:/usr/local/lib/cmake/llvm 添加CPU后端。 添加CMakeFiles后端。 添加解释器后端。 --*******摘要******** --CMake版本:3.5.1 --CMake命令:/usr/bin/CMake --系统:Linux C++编译器:/Ur/bin /C++ --C++编译器版本:5.5.0 --CXX标志:-Wall-Wnon虚拟dtor-fno异常-fno rtti-Wno psabi-Wnon虚拟dtor --构建类型:发布 --编译定义:GIT_SHA1=“ef7f916”;GIT_DATE=“2019-09-12”;与_PNG;发光,发光系数为1;用_CPU=1发光_;谷歌协议;ONNX\u名称空间=glow\u ONNX --CMAKE_前缀_路径:/usr/bin --CMAKE\u安装前缀:/usr/local --CMAKE_模块路径:/home/tcs/sairam/glow/CMAKE/modules --ONNX版本:1.5.0 --ONNX名称空间:glow\u ONNX --ONNX_构建_测试:关闭 --ONNX_构建_基准:关闭 --ONNX\u使用\u LITE\u协议:关闭 --ONNXIFI\u虚拟\u后端:关闭 --ONNXIFI\u启用\u扩展:关闭 --Protobuf编译器:/usr/bin/protoc --Protobuf include:/usr/include --Protobuf库:优化/usr/lib/x86_64-linux-gnu/libprotobuf.so;调试/usr/lib/x86_64-linux-gnu/libprotobuf.so-pthread --BUILD\u ONNX\u PYTHON:OFF --找不到LLVM文件检查 --git版本:v1.5.0 --版本:1.5.0 --执行测试HAVE_STD_REGEX——成功 --执行测试HAVE_GNU_POSIX_REGEX--编译失败 --执行测试HAVE_POSIX_REGEX——成功 --执行测试时时钟稳定-成功 正在跳过添加测试en2gr\u cpu\u测试,因为它需要一个models目录。使用-DGLOW_MODELS_DIR进行配置。 正在跳过添加测试en2gr\u量化\u测试,因为它需要模型目录。使用-DGLOW_MODELS_DIR进行配置。 正在跳过添加测试en2gr\u cpu\u分区\u测试,因为它需要模型目录。使用-DGLOW_MODELS_DIR进行配置。 正在跳过添加测试en2gr\u cpu\u config\u测试,因为它需要一个models目录。使用-DGLOW_MODELS_DIR进行配置。 正在跳过添加测试resnet\u runtime\u测试,因为它需要一个models目录。使用-DGLOW_MODELS_DIR进行配置。 --配置完成 --生成完成 --生成文件已写入:/home/glow [1/111]链接CXX可执行文件bin/resnet验证 失败:bin/resnet验证 :&&/usr/bin/c++-Wall-Wnon virtual dtor-fno exceptions-fno rtti-Wno psabi-O3-DNDEBUG-march=native-ffast math-fno finite math only examples/cmakfiles/resnet verify.cpp.o-o-bin/resnet verify lib/ExecutionEngine.a lib/Graph/libGraph.a lib/Importer/libImporter.a lib/Runtime/HostManager/libHostManager.alib/Partitioner/libPartitioner.a lib/Runtime/Provisioner/libProvisioner.a lib/Runtime/Executor/libExecutor.a lib/Optimizer/GraphOptimizer/libGraphOptimizer.a lib/Backends/libBackends.a lib/Quantization/libQuantization.a lib/Backend/libBackend.a lib/ExecutionContext/libExecutionContext.a lib/CodeGen/IR/libIR.alib/Optimizer/GraphOptimizerPipeline/libGraphOptimizerPipeline.a/usr/local/lib/libLLVMCore.a/usr/local/lib/libLLVMBinaryFormat.a lib/Converter/libConverter.a lib/Graph/libGraph/libGraph.a lib/Quantization/Base/libQuantizationBase/libQuantizationBase.a lib/Support/TensorPool.a lib/Base/lib/libTensorPool.a/lib/lib/lib/libSupport/lib.a/usr/local/lib/libglog.a/usr/local/lib/libLLVMSupport.a-lz-lrt-ldl-ltinfo-lpthread-lm/usr/local/lib/libLLVMDemangle.a lib/Importer/build_onnx/libonnx_proto.a-pthread/usr/lib/x86_64-linux-gnu/libprotobuf.so&: lib/Runtime/hotmanager/libhotmanager.a(hotmanager.cpp.o):函数中的glow::Runtime::hotmanager::exportMemoryCounters()':hotmanager.cpp:(.text+0x601):对glow::Stats()的未定义引用 hotmanager.cpp:(.text+0x618):未定义对glow::StatExporterRegistry::setCounter(llvm::StringRef,long)的引用。'hotmanager.cpp:(.text+0x61d):未定义对glow::Stats()的引用' hotmanager.cpp:(.text+0x634):未定义对glow::StatExporterRegistry::setCounter(llvm::StringRef,long)的引用。'hotmanager.cpp:(.text+0x639):未定义对glow::Stats()的引用' HostManager.cpp:(.text+0x650):对glow::statexporterRegistry::setCounter(llvm::StringRef,long)“lib/Runtime/HostManager/libHostManager.a(HostManager.cpp.o)”的未定义引用:在函数glow::Runtime::HostManager::clearHost()中: HostManager.cpp:(.text+0x3521):未定义对glow::Stats()的引用。'HostManager.cpp:(.text+0x3537):未定义对glow::StatExporterRegistry::setCounter的引用(llvm::StringRef,long)' HostManager.cpp:(.text+0x353c):未定义对glow::Stats()的引用。'HostManager.cpp:(.text+0x3552):未定义对glow::StatExporterRegistry::setCounter的引用(llvm::StringRef,long)' HostManager.cpp:(.text+0x3557):未定义对glow::Stats()的引用。'HostManager.cpp:(.text+0x356d):未定义对glow::StatExporterRegistry::setCounter的引用(llvm::StringRef,long)' lib/Base/libBase.a(Image.cpp.o):函数中的glow::getPngInfo(char const*)':Image.cpp:(.text+0x1b5):对png_set_longjmp_fn的未定义引用 lib/Base/libBase.a(Image.cpp.o):在函数glow::writePngImage(glow::Tensor*,char const*,std::pair,llvm::ArrayRef,llvm::ArrayRef)“中:Image.cpp:(.text+0x5e6):对png_set_longjmpfn的未定义引用” Image.cpp:(.text+0x641):未定义对png_集_longjmp_fn'图像的引用。cpp:(.text+0x6c8):未定义对png_集_longjmp_fn'的引用 Image.cpp:(.text+0x8a6):对png_set_longjmp_fn'lib/Base/libBase.a的未定义引用(Image.cpp.o):Image.cpp:(.text+0xa4f):下面是对png_set_longjmp_fn'的更多未定义引用 collect2:错误:ld返回了1个退出状态,installation,compiler-optimization,glow,Installation,Compiler Optimization,Glow,Glow编译器先决条件: GLOW INSTALLATION STEPS On Ubuntu (16.04) Glow编译器依赖项: Operating system : Ubuntu 16.04LTS RAM : Minimum 16GB SWAP MEMORY : Minimum 12GB to 20GB Memory Needed
GLOW INSTALLATION STEPS On Ubuntu (16.04)
Glow编译器依赖项:
Operating system : Ubuntu 16.04LTS
RAM : Minimum 16GB
SWAP MEMORY : Minimum 12GB to 20GB
Memory Needed : 70GB
Total Memory needed : Minimum 150GB(LLVM&GLOW)
辉光编译过程 步骤1:
LLVM 8.0.1
Clang 8.0.1
Anaconda 3
`
Pytorch if GPU is used need to install CUDA 10.1 and cuDNN 7.1
步骤2:
Download glow repository from git hub
$git clone https://github.com/pytorch/glow.git
$cd glow
步骤3:
#Glow depends on a few submodules: googletest, onnx, and a library for FP16 conversions.
#To get them, from the glow directory, run:
$git submodule update --init --recursive
步骤4:
#If Protobuf is not installed install it by using shell script
#version should be 2.6.1
#PATH: glow/utils/
#run shell script
$./install_protobuf.sh
步骤5:
#Create a build directory in glow
$mkdir build
#Change working directory to build
$cd build
#Now run cmake in Release mode providing Glow source directory as path
$cmake -DCMAKE_BUILD_TYPE=Release ../
#This will build files into ......( It will take 4 to 8 hours or more based on RAM and SWAP memory)
#if cmake is not installed install it by running following command
$sudo apt install cmake
步骤6:
#run make command to compile the source code
$make
$make安装
测试辉光:
#run make install to install the library
#run make install to install the library
#A few test programs that use Glow's C++ API are found under the examples/ subdirectory. The mnist, cifar10, fr2en and ptb programs train and
run digit recognition, image classification and language modeling benchmarks, respectively.
#To run these programs, build Glow in Release mode, then run the following commands to download the cifar10, mnist and ptb databases.
$python ../glow/utils/download_datasets_and_models.py --all-datasets
#Now run the examples. Note that the databases should be in the current working directory.
$./bin/mnist
$./bin/cifar10
$./bin/fr2en
$./bin/ptb
$./bin/char-rnn
#If everything goes well you should see:
mnist: pictures from the mnist digits database
cifar10: image classifications that steadily improve
fr2en: an interactive French-to-English translator
ptb: decreasing perplexity on the dataset as the network trains
char-rnn: generates random text based on some document