|
|
@ -44,8 +44,10 @@ limitations under the License. */
|
|
|
|
#include "paddle/fluid/platform/dynload/cublas.h"
|
|
|
|
#include "paddle/fluid/platform/dynload/cublas.h"
|
|
|
|
#include "paddle/fluid/platform/dynload/cudnn.h"
|
|
|
|
#include "paddle/fluid/platform/dynload/cudnn.h"
|
|
|
|
#include "paddle/fluid/platform/dynload/curand.h"
|
|
|
|
#include "paddle/fluid/platform/dynload/curand.h"
|
|
|
|
|
|
|
|
#ifndef __APPLE__
|
|
|
|
#include "paddle/fluid/platform/dynload/nccl.h"
|
|
|
|
#include "paddle/fluid/platform/dynload/nccl.h"
|
|
|
|
#endif
|
|
|
|
#endif // __APPLE__
|
|
|
|
|
|
|
|
#endif // PADDLE_WITH_CUDA
|
|
|
|
|
|
|
|
|
|
|
|
namespace paddle {
|
|
|
|
namespace paddle {
|
|
|
|
namespace platform {
|
|
|
|
namespace platform {
|
|
|
@ -174,6 +176,7 @@ inline typename std::enable_if<sizeof...(Args) != 0, void>::type throw_on_error(
|
|
|
|
throw std::runtime_error(err + string::Sprintf(args...));
|
|
|
|
throw std::runtime_error(err + string::Sprintf(args...));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __APPLE__
|
|
|
|
template <typename... Args>
|
|
|
|
template <typename... Args>
|
|
|
|
inline typename std::enable_if<sizeof...(Args) != 0, void>::type throw_on_error(
|
|
|
|
inline typename std::enable_if<sizeof...(Args) != 0, void>::type throw_on_error(
|
|
|
|
ncclResult_t stat, const Args&... args) {
|
|
|
|
ncclResult_t stat, const Args&... args) {
|
|
|
@ -184,7 +187,7 @@ inline typename std::enable_if<sizeof...(Args) != 0, void>::type throw_on_error(
|
|
|
|
string::Sprintf(args...));
|
|
|
|
string::Sprintf(args...));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __APPLE__
|
|
|
|
#endif // PADDLE_WITH_CUDA
|
|
|
|
#endif // PADDLE_WITH_CUDA
|
|
|
|
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
template <typename T>
|
|
|
|