Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark the TriangularSolverMatrix "kernel" functions as EIGEN_DEVICE_FUNC #8782

Conversation

fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Oct 24, 2023

This should fix cms-sw/cmssw#42460 .

For reference, the changes are cms-externals/eigen-git-mirror@e021252 :

diff --git a/Eigen/src/Core/products/TriangularSolverMatrix.h b/Eigen/src/Core/products/TriangularSolverMatrix.h
index 9f5ead2d6..7354d8df2 100644
--- a/Eigen/src/Core/products/TriangularSolverMatrix.h
+++ b/Eigen/src/Core/products/TriangularSolverMatrix.h
@@ -21,6 +21,7 @@ template <typename Scalar, typename Index, int Mode, bool Conjugate, int TriStor
 struct trsmKernelL {
   // Generic Implementation of triangular solve for triangular matrix on left and multiple rhs.
   // Handles non-packed matrices.
+  EIGEN_DEVICE_FUNC
   static void kernel(
     Index size, Index otherSize,
     const Scalar* _tri, Index triStride,
@@ -31,6 +32,7 @@ template <typename Scalar, typename Index, int Mode, bool Conjugate, int TriStor
 struct trsmKernelR {
   // Generic Implementation of triangular solve for triangular matrix on right and multiple lhs.
   // Handles non-packed matrices.
+  EIGEN_DEVICE_FUNC
   static void kernel(
     Index size, Index otherSize,
     const Scalar* _tri, Index triStride,
@@ -38,6 +40,7 @@ struct trsmKernelR {
 };
 
 template <typename Scalar, typename Index, int Mode, bool Conjugate, int TriStorageOrder,int OtherInnerStride>
+EIGEN_DEVICE_FUNC
 EIGEN_STRONG_INLINE void trsmKernelL<Scalar, Index, Mode, Conjugate, TriStorageOrder, OtherInnerStride>::kernel(
     Index size, Index otherSize,
     const Scalar* _tri, Index triStride,
@@ -89,6 +92,7 @@ EIGEN_STRONG_INLINE void trsmKernelL<Scalar, Index, Mode, Conjugate, TriStorageO
 
 
 template <typename Scalar, typename Index, int Mode, bool Conjugate, int TriStorageOrder, int OtherInnerStride>
+EIGEN_DEVICE_FUNC
 EIGEN_STRONG_INLINE void trsmKernelR<Scalar, Index, Mode, Conjugate, TriStorageOrder, OtherInnerStride>::kernel(
     Index size, Index otherSize,
     const Scalar* _tri, Index triStride,

@fwyzard
Copy link
Contributor Author

fwyzard commented Oct 24, 2023

enable gpu

@fwyzard
Copy link
Contributor Author

fwyzard commented Oct 24, 2023

please test

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @fwyzard (Andrea Bocci) for branch IB/CMSSW_13_3_X/master.

@smuzaffar, @iarspider, @aandvalenzuela can you please review it and eventually sign? Thanks.
@sextonkennedy, @antoniovilela, @rappoccio you are the release manager for this.
cms-bot commands are listed here

@fwyzard
Copy link
Contributor Author

fwyzard commented Oct 24, 2023

Note that the compiler would warn about the underlying error, but Eigen silences those warnings.
Maybe we should remove that silencing ?

The culprit seems to be https://github.com/cms-externals/eigen-git-mirror/blob/e021252e5767868dac39ab75a73616ec871460ec/Eigen/src/Core/util/DisableStupidWarnings.h#L117 :

  EIGEN_NV_DIAG_SUPPRESS(20011)

@cmsbuild
Copy link
Contributor

-1

Failed Tests: UnitTests GpuUnitTests
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-895c67/35367/summary.html
COMMIT: 50889cb
CMSSW: CMSSW_13_3_X_2023-10-23-2300/el8_amd64_gcc12
Additional Tests: GPU
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmsdist/8782/35367/install.sh to create a dev area with all the needed externals and cmssw changes.

Unit Tests

I found 1 errors in the following unit tests:

---> test TestGeneratorInterfacePythia8ConcurrentGeneratorFilter had ERRORS

GPU Unit Tests

I found 1 errors in the following unit tests:

---> test testTFVisibleDevicesCUDA had ERRORS

Comparison Summary

Summary:

  • You potentially removed 7 lines from the logs
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 3357400
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3357375
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 49 files compared)
  • Checked 214 log files, 167 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

GPU Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 3
  • DQMHistoTests: Total histograms compared: 39740
  • DQMHistoTests: Total failures: 21
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 39719
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 2 files compared)
  • Checked 8 log files, 10 edm output root files, 3 DQM output files
  • TriggerResults: no differences found

@fwyzard
Copy link
Contributor Author

fwyzard commented Oct 24, 2023

@fwyzard
Copy link
Contributor Author

fwyzard commented Oct 25, 2023

@smuzaffar can this be merged ?

@smuzaffar
Copy link
Contributor

+externals

unit tests failures are not related to this PR

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next IB/CMSSW_13_3_X/master IBs (but tests are reportedly failing). This pull request will now be reviewed by the release team before it's merged. @rappoccio, @sextonkennedy, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[GPU] Unit test testEigenGPUNoFit_t failing when testing inverse 5x5
3 participants