Swig
|
1. Simplified Wrapper and Interface Generator (SWIG) ,基本思想就是向脚本语言接口公开 C/C++ 代码。SWIG 允许您向广泛的脚本语言公开 C/C++ 代码,包括 Ruby、Perl、Tcl 和 Python。
参考:
| |||
Bazel
|
1. bazel假定每个目录为[package]单元,目录里面包含了源文件和一个描述文件BUILD,描述文件中指定了如何将源文件转换成构建的输出。
> bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
4. 调试模式:
> bazel build -c dbg
参考:
1.
安装bazel
> yum install java-1.8.0-openjdk
> yum install java-1.8.0-openjdk-devel
> https://github.com/google/bazel/ 下载最新版本bazel_xxx.sh安装
2.
使用bazel构建系统
3.
bazel 命令手册
|
| ||
EIGEN |
1. Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
http://eigen.tuxfamily.org/
2. 常用的矩阵计算工具有blas,
cublas(caffe)、atlas、
openblas(mxnet)、
eigen,还有lapack、mkl(intel)、Armadillo(matlab)
![]()
3. Eigen库包含 Eigen模块和unsupported模块,其中Eigen模块为official module,unsupported模块为开源贡献者开发的,没有official support。
| |||
protobuf
|
1. Protocol Buffers 是一种轻便高效的结构化数据存储格式,可以用于结构化数据串行化,或者说序列化。它很适合做数据存储或 RPC 数据交换格式。可用于通讯协议、数据存储等领域的语言无关、平台无关、可扩展的序列化结构数据格式。
2. 使用
> 编写.proto文件,编译后生成 .pb.h / .pb.cc文件
>
Writer: SerializeToOstream(),
Reader: ParseFromIstream()
> required:一个格式良好的消息一定要含有1个这种字段;
> optional:消息格式中该字段可以有0个或1个值(不超过1个)。
> repeated:在一个格式良好的消息中,这种字段可以重复任意多次(包括0次)。相当于java中的List。
3.
![]()
4. grpc需要理解4个方面(service,stub,channel,observer)
|
| ||
Stream
Executor
| > google stream executor team: work on parallel programming models for CPUs, GPUs and other platforms. |
| ||
TF C++ | 1. TF源码安装: following the instructions here 2. example: tensorflow/cc/tutorials/example_trainer.cc 3. 自定义的op Kernel: tutorial for adding a new op in C++. 4. TF c++ 调试: debugging Tensorflow's C++ code behind the SWIG interface > The simplest interface between Python and C++ is the pure-C API in
|
|
tensorflow使用了自动化构建工具
bazel、脚本语言调用c或cpp的包裹工具
swig、使用
EIGEN作为矩阵处理工具、Nvidia-cuBLAS GPU加速计算库、结构化数据存储格式protobuf
转载于:https://www.cnblogs.com/yao62995/p/5773142.html