mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 20:56:00 +08:00
Merge with upstream
This commit is contained in:
commit
ea8fa5e86f
@ -1092,5 +1092,15 @@ bool all(T t, Ts ... ts){ return t && all(ts...); }
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Wrapping #pragma unroll in a macro since it is required for SYCL
|
||||||
|
#if defined(__SYCL_DEVICE_ONLY__)
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#define EIGEN_UNROLL_LOOP __pragma(unroll)
|
||||||
|
#else
|
||||||
|
#define EIGEN_UNROLL_LOOP _Pragma("unroll")
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define EIGEN_UNROLL_LOOP
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // EIGEN_MACROS_H
|
#endif // EIGEN_MACROS_H
|
||||||
|
@ -193,7 +193,7 @@ namespace Eigen
|
|||||||
|
|
||||||
#define EIGEN_DEFAULT_IO_FORMAT IOFormat(4, 0, " ", "\n", "", "", "", "")
|
#define EIGEN_DEFAULT_IO_FORMAT IOFormat(4, 0, " ", "\n", "", "", "", "")
|
||||||
|
|
||||||
#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) && !defined(__HIP_DEVICE_COMPILE__)
|
#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) && !defined(__HIP_DEVICE_COMPILE__) && !defined(__SYCL_DEVICE_ONLY__)
|
||||||
#define EIGEN_EXCEPTIONS
|
#define EIGEN_EXCEPTIONS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -272,7 +272,7 @@ namespace Eigen
|
|||||||
}
|
}
|
||||||
#endif //EIGEN_EXCEPTIONS
|
#endif //EIGEN_EXCEPTIONS
|
||||||
|
|
||||||
#elif !defined(__CUDACC__) && !defined(__HIPCC__)// EIGEN_DEBUG_ASSERTS
|
#elif !defined(__CUDACC__) && !defined(__HIPCC__) && !defined(__SYCL_DEVICE_ONLY__) // EIGEN_DEBUG_ASSERTS
|
||||||
// see bug 89. The copy_bool here is working around a bug in gcc <= 4.3
|
// see bug 89. The copy_bool here is working around a bug in gcc <= 4.3
|
||||||
#define eigen_assert(a) \
|
#define eigen_assert(a) \
|
||||||
if( (!Eigen::internal::copy_bool(a)) && (!no_more_assert) )\
|
if( (!Eigen::internal::copy_bool(a)) && (!no_more_assert) )\
|
||||||
@ -329,7 +329,7 @@ namespace Eigen
|
|||||||
std::cout << "Can't VERIFY_RAISES_STATIC_ASSERT( " #a " ) with exceptions disabled\n";
|
std::cout << "Can't VERIFY_RAISES_STATIC_ASSERT( " #a " ) with exceptions disabled\n";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(__CUDACC__) && !defined(__HIPCC__)
|
#if !defined(__CUDACC__) && !defined(__HIPCC__) && !defined(__SYCL_DEVICE_ONLY__)
|
||||||
#define EIGEN_USE_CUSTOM_ASSERT
|
#define EIGEN_USE_CUSTOM_ASSERT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ EIGEN_STRONG_INLINE void MergeResourceRequirements(
|
|||||||
// policy if block shapes/sizes conflict).
|
// policy if block shapes/sizes conflict).
|
||||||
*block_shape = resources[0].block_shape;
|
*block_shape = resources[0].block_shape;
|
||||||
*block_total_size = resources[0].block_total_size;
|
*block_total_size = resources[0].block_total_size;
|
||||||
for (int i = 1; i < resources.size(); ++i) {
|
for (std::vector<TensorOpResourceRequirements>::size_type i = 1; i < resources.size(); ++i) {
|
||||||
if (resources[i].block_shape == TensorBlockShapeType::kSkewedInnerDims &&
|
if (resources[i].block_shape == TensorBlockShapeType::kSkewedInnerDims &&
|
||||||
*block_shape != TensorBlockShapeType::kSkewedInnerDims) {
|
*block_shape != TensorBlockShapeType::kSkewedInnerDims) {
|
||||||
*block_shape = TensorBlockShapeType::kSkewedInnerDims;
|
*block_shape = TensorBlockShapeType::kSkewedInnerDims;
|
||||||
|
@ -786,7 +786,7 @@ struct TensorEvaluator<const TensorConvolutionOp<Indices, InputArgType, KernelAr
|
|||||||
};
|
};
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC TensorEvaluator(const XprType& op, const GpuDevice& device)
|
EIGEN_DEVICE_FUNC TensorEvaluator(const XprType& op, const GpuDevice& device)
|
||||||
: m_inputImpl(op.inputExpression(), device), m_kernelArg(op.kernelExpression()), m_kernelImpl(op.kernelExpression(), device), m_indices(op.indices()), m_buf(NULL), m_kernel(NULL), m_local_kernel(false), m_device(device)
|
: m_inputImpl(op.inputExpression(), device), m_kernelImpl(op.kernelExpression(), device), m_kernelArg(op.kernelExpression()), m_indices(op.indices()), m_buf(NULL), m_kernel(NULL), m_local_kernel(false), m_device(device)
|
||||||
{
|
{
|
||||||
EIGEN_STATIC_ASSERT((static_cast<int>(TensorEvaluator<InputArgType, GpuDevice>::Layout) == static_cast<int>(TensorEvaluator<KernelArgType, GpuDevice>::Layout)), YOU_MADE_A_PROGRAMMING_MISTAKE);
|
EIGEN_STATIC_ASSERT((static_cast<int>(TensorEvaluator<InputArgType, GpuDevice>::Layout) == static_cast<int>(TensorEvaluator<KernelArgType, GpuDevice>::Layout)), YOU_MADE_A_PROGRAMMING_MISTAKE);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user