Add synchronize method to all devices.

This commit is contained in:
Antonio Sánchez 2022-11-29 19:35:02 +00:00 committed by Rasmus Munk Larsen
parent b7551bff92
commit 551eebc8ca
2 changed files with 8 additions and 0 deletions

View File

@ -95,6 +95,10 @@ struct DefaultDevice {
return firstLevelCacheSize(); return firstLevelCacheSize();
#endif #endif
} }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void synchronize() const {
// Nothing. Default device operations are synchronous.
}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int majorDeviceVersion() const { EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int majorDeviceVersion() const {
#if !defined(EIGEN_GPU_COMPILE_PHASE) #if !defined(EIGEN_GPU_COMPILE_PHASE)

View File

@ -147,6 +147,10 @@ struct ThreadPoolDevice {
// The l3 cache size is shared between all the cores. // The l3 cache size is shared between all the cores.
return l3CacheSize() / num_threads_; return l3CacheSize() / num_threads_;
} }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void synchronize() const {
// Nothing. Threadpool device operations are synchronous.
}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int majorDeviceVersion() const { EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE int majorDeviceVersion() const {
// Should return an enum that encodes the ISA supported by the CPU // Should return an enum that encodes the ISA supported by the CPU