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

@ -96,6 +96,10 @@ struct DefaultDevice {
#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 {
#if !defined(EIGEN_GPU_COMPILE_PHASE)
// Running single threaded on the host CPU

View File

@ -148,6 +148,10 @@ struct ThreadPoolDevice {
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 {
// Should return an enum that encodes the ISA supported by the CPU
return 1;