ftramer/slalom

compile error

gutouyu opened this issue · 4 comments

when I do as the readme says:

cd slalom/SGXDNN
make

I got a compile error:
In file included from sgxdnn_main.cpp:13:0: layers/eigen_maxpool.h:13:42: fatal error: unsupported/Eigen/CXX11/Tensor: don't have that file or directory

I just remember that I don't install Eigen library. so I run

sudo apt-get install libeigen3-dev

but I still get the same wrong message as described above.

Is there anything I missing? or I'm doing something wrong here? Looking forward to hear from you. Thanks.

The Include/eigen directory should contain a copy of the Eigen library, which you can clone from here: https://github.com/eigenteam/eigen-git-mirror. Only the Eigen and unsupported directories are needed.

The Include/eigen directory should contain a copy of the Eigen library, which you can clone from here: https://github.com/eigenteam/eigen-git-mirror. Only the Eigen and unsupported directories are needed.

I think you guys have done an excellent work here. I'm trying as you suggest. Thanks very much.

It works, thx. But I still have to mkdir bin and bin_sgx manually. Looking forward to improve this.

@gutouyu @ftramer I clone eigin-git-mirror and copy the Eigen and unsupported dirs to Include/eigen. BUT I got some errors when compiling slalom/App:

$ cd slalom/App
$ make
g++ -O3 -fPIC -I. -I/lib/python3.5/site-packages/tensorflow/include -I/lib/python3.5/site-packages/tensorflow/include/external/nsync/public -march=native -std=c++11 -shared relu_slalom.cc relumaxpool_slalom.cc -o ../lib/slalom_ops.so -L/lib/python3.5/site-packages/tensorflow -ltensorflow_framework
In file included from /lib/python3.5/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/FixedPoint:42:0,
                 from /lib/python3.5/site-packages/tensorflow/include/tensorflow/core/framework/numeric_types.h:24,
                 from /lib/python3.5/site-packages/tensorflow/include/tensorflow/core/framework/allocator.h:23,
                 from /lib/python3.5/site-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:23,
                 from /lib/python3.5/site-packages/tensorflow/include/tensorflow/core/framework/numeric_op.h:19,
                 from relu_slalom.cc:4:
/lib/python3.5/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h:52:397: error: type/value mismatch at argument 4 in template parameter list for 'template<class ResScalar, class LhsScalar, class RhsScalar, class StorageIndex, int ShardingType> class Eigen::internal::TensorContractionBlocking'
 ocontract_t, right_contract_t, 32, right_inner_dim_contiguous, right_inner_dim_reordered, RightAlignment>, Index, ShardingType> {
                                                                                                                               ^
/lib/python3.5/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h:52:397: note:   expected a type, got 'ShardingType'
/lib/python3.5/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h:1273:42: error: type/value mismatch at argument 6 in template parameter list for 'template<class Scalar, class Index, class DataMapper, int Pack1, int Pack2, class Packet, int StorageOrder, bool Conjugate, bool PanelMode> struct Eigen::internal::gemm_pack_lhs'
                      Conjugate, PanelMode> {
                                          ^
/lib/python3.5/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h:1273:42: note:   expected a type, got 'ColMajor'
/lib/python3.5/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h:1282:68: error: type/value mismatch at argument 6 in template parameter list for 'template<class Scalar, class Index, class DataMapper, int Pack1, int Pack2, class Packet, int StorageOrder, bool Conjugate, bool PanelMode> struct Eigen::internal::gemm_pack_lhs'
                                      ColMajor, Conjugate, PanelMode>::
                                                                    ^
/lib/python3.5/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h:1282:68: note:   expected a type, got 'ColMajor'
/lib/python3.5/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h:1284:38: error: 'void Eigen::internal::operator()(Eigen::QInt8*, const DataMapper&, Index, Index, Index, Index)' must be a nonstatic member function
            Index stride, Index offset) {
                                      ^
In file included from /lib/python3.5/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/FixedPoint:42:0,
                 from /lib/python3.5/site-packages/tensorflow/include/tensorflow/core/framework/numeric_types.h:24,
                 from /lib/python3.5/site-packages/tensorflow/include/tensorflow/core/framework/allocator.h:23,
                 from /lib/python3.5/site-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:23,
                 from /lib/python3.5/site-packages/tensorflow/include/tensorflow/core/framework/numeric_op.h:19,
                 from relumaxpool_slalom.cc:3:
/lib/python3.5/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h:52:397: error: type/value mismatch at argument 4 in template parameter list for 'template<class ResScalar, class LhsScalar, class RhsScalar, class StorageIndex, int ShardingType> class Eigen::internal::TensorContractionBlocking'
 ocontract_t, right_contract_t, 32, right_inner_dim_contiguous, right_inner_dim_reordered, RightAlignment>, Index, ShardingType> {
                                                                                                                               ^
/lib/python3.5/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h:52:397: note:   expected a type, got 'ShardingType'
/lib/python3.5/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h:1273:42: error: type/value mismatch at argument 6 in template parameter list for 'template<class Scalar, class Index, class DataMapper, int Pack1, int Pack2, class Packet, int StorageOrder, bool Conjugate, bool PanelMode> struct Eigen::internal::gemm_pack_lhs'
                      Conjugate, PanelMode> {
                                          ^
/lib/python3.5/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h:1273:42: note:   expected a type, got 'ColMajor'
/lib/python3.5/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h:1282:68: error: type/value mismatch at argument 6 in template parameter list for 'template<class Scalar, class Index, class DataMapper, int Pack1, int Pack2, class Packet, int StorageOrder, bool Conjugate, bool PanelMode> struct Eigen::internal::gemm_pack_lhs'
                                      ColMajor, Conjugate, PanelMode>::
                                                                    ^
/lib/python3.5/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h:1282:68: note:   expected a type, got 'ColMajor'
/lib/python3.5/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h:1284:38: error: 'void Eigen::internal::operator()(Eigen::QInt8*, const DataMapper&, Index, Index, Index, Index)' must be a nonstatic member function
            Index stride, Index offset) {
                                      ^
Makefile:22: recipe for target '../lib/slalom_ops.so' failed
make: *** [../lib/slalom_ops.so] Error 1

I build tf1.8 from source with tools python3.5.2, GCC 5.4, Bazel 0.10.0, cuDNN 7, CUDA 9

Is there anything I'm doing wrong here? Looking forward to hear from you. Thanks a lot.