This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen

Bug 1753

Summary: Tensor concatenate 50x slower than Matrix concat ?
Product: Eigen Reporter: william.tambellini
Component: TensorAssignee: Nobody <eigen.nobody>
Status: NEW ---    
Severity: Performance Problem CC: benoit.steiner.goog, chtz, gael.guennebaud, rmlarsen, william.tambellini
Priority: High    
Version: 3.5 (future version)   
Hardware: x86 - 64-bit   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
bench_matrix_vs_tensor.cpp none

Description william.tambellini 2019-10-07 23:01:29 UTC
Created attachment 954 [details]
bench_matrix_vs_tensor.cpp

Tensor concatenate 50x slower than Matrix horizontal concat ?


Building using /home/wtambellini/Downloads/eigen/eigen-eigen-653b666cf842 

g++ -std=c++14 -DEIGEN_NO_DEBUG -DNDEBUG -fopenmp -O3 -I../.. -I$EIGENDIR bench_matrix_vs_tensor.cpp -o bench_matrix_vs_tensor

Running...
Bench Eigen Matrix vs Tensor
Usage: program numberOfEigenThreads (default to 1) maxDeltaThreshold (default to 0.0001)
GCC: 6.1.0
Eigen version: 3.3.90
Simd: AVX SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2
TopLevel cache size: 4096 KB
L1 cache size: 32 KB
L2 cache size: 256 KB
L3 cache size: 4096 KB
Eigen::nbThreads: 1
EIGEN_NO_DEBUG
EIGEN_VECTORIZE
EIGEN_USE_THREADS
EIGEN_HAS_OPENMP: 201511
omp_get_num_threads: 1

Append 1 col: type=f repeat=100
               L          Matrix          Tensor
               1           29760         1793591
               2           21202         2966067
               4           33389         4606528
               8           77923         8995368
              16          156812        15950450
              32          324265        31695752
              64          783033        61748806
             128         2057385       122513574
             256         4061513       238534858

Could anyone just confirm ?
Kind regards
WT
Comment 1 william.tambellini 2019-10-08 23:21:00 UTC
Note : the perf of vertical concatenation (concat rows) with Tensor does nt seem to be better, up to 20x slower than Matrix.
Comment 2 Rasmus Munk Larsen 2019-10-18 16:48:09 UTC
Thanks for the report. Will take a look.
Comment 3 william.tambellini 2019-11-05 21:27:06 UTC
Thanks
Comment 4 Nobody 2019-12-04 18:49:01 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1753.