Parallelize tensor contraction only by sharding dimension and use 'thread-local' memory for packing

This commit is contained in:
Eugene Zhulenev
2019-02-04 10:43:16 -08:00
parent 871e2e5339
commit eb21bab769
2 changed files with 212 additions and 17 deletions

View File

@@ -122,6 +122,12 @@ struct ThreadPoolDevice {
return num_threads_;
}
// Number of theads available in the underlying thread pool. This number can
// be different from the value returned by numThreads().
EIGEN_STRONG_INLINE int numThreadsInPool() const {
return pool_->NumThreads();
}
EIGEN_STRONG_INLINE size_t firstLevelCacheSize() const {
return l1CacheSize();
}