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

Add a test for ROCm libraries and build rules #40637

Merged
merged 3 commits into from
Feb 1, 2023

Conversation

fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Jan 29, 2023

PR description:

This PR adds new packages to test the implementation and usage of ROCm libraries for device code in CMSSW plugins and executables.

The package HeterogeneousTest/ROCmDevice implements a library that defines and exports ROCm device-only functions, and a plugin and test that use them.

The package HeterogeneousTest/ROCmKernel implements a library that imports device functions from HeterogeneousTest/ROCmDevice to define and export ROCm kernels, and a plugin and test that use them.

The package HeterogeneousTest/ROCmWrapper implements a library that imports kernels from HeterogeneousCTest/ROCmKernel to define and export host-only wrappers around them, usable by non-ROCm libraries, plugins and applications, and implements a plugin and test that use them.

The package HeterogeneousTest/ROCmOpaque implements a library that use the wrappers from HeterogeneousTest/ROCmWrapper to define and export host-only functions around the whole ROCm section, usable by libraries, plugins and applications that are not ROCm-aware, and implements a plugin and test that use them.

The PR builds on top of and includes:

PR validation:

The new unit tests compile and pass.

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40637/33932

ERROR: Build errors found during clang-tidy run.

HeterogeneousCore/ROCmTestHidden/src/DeviceAdditionHidden.cc:7:10: error: 'HeterogeneousCore/ROCmUtilities/interface/hipCheck.h' file not found [clang-diagnostic-error]
#include "HeterogeneousCore/ROCmUtilities/interface/hipCheck.h"
         ^
Suppressed 98 warnings (97 in non-user code, 1 with check filters).
--
HeterogeneousCore/ROCmTestKernel/plugins/ROCmTestKernelAdditionModule.cc:17:10: error: 'HeterogeneousCore/ROCmUtilities/interface/hipCheck.h' file not found [clang-diagnostic-error]
#include "HeterogeneousCore/ROCmUtilities/interface/hipCheck.h"
         ^
HeterogeneousCore/ROCmTestDevice/plugins/ROCmTestDeviceAdditionModule.cc:17:10: error: 'HeterogeneousCore/ROCmUtilities/interface/hipCheck.h' file not found [clang-diagnostic-error]
#include "HeterogeneousCore/ROCmUtilities/interface/hipCheck.h"
         ^
Suppressed 909 warnings (908 in non-user code, 1 with check filters).
--
HeterogeneousCore/ROCmTestWrapper/plugins/ROCmTestWrapperAdditionModule.cc:18:10: error: 'HeterogeneousCore/ROCmUtilities/interface/hipCheck.h' file not found [clang-diagnostic-error]
#include "HeterogeneousCore/ROCmUtilities/interface/hipCheck.h"
         ^
Suppressed 909 warnings (908 in non-user code, 1 with check filters).
--
gmake: *** [config/SCRAM/GMake/Makefile.coderules:129: code-checks] Error 2
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40637/33941

ERROR: Build errors found during clang-tidy run.

HeterogeneousTest/ROCmOpaque/src/DeviceAdditionOpaque.cc:7:10: error: 'HeterogeneousCore/ROCmUtilities/interface/hipCheck.h' file not found [clang-diagnostic-error]
#include "HeterogeneousCore/ROCmUtilities/interface/hipCheck.h"
         ^
Suppressed 98 warnings (97 in non-user code, 1 with check filters).
--
HeterogeneousTest/ROCmWrapper/plugins/ROCmTestWrapperAdditionModule.cc:20:10: error: 'HeterogeneousCore/ROCmUtilities/interface/hipCheck.h' file not found [clang-diagnostic-error]
#include "HeterogeneousCore/ROCmUtilities/interface/hipCheck.h"
         ^
Suppressed 909 warnings (908 in non-user code, 1 with check filters).
--
HeterogeneousTest/ROCmKernel/plugins/ROCmTestKernelAdditionModule.cc:19:10: error: 'HeterogeneousCore/ROCmUtilities/interface/hipCheck.h' file not found [clang-diagnostic-error]
#include "HeterogeneousCore/ROCmUtilities/interface/hipCheck.h"
         ^
Suppressed 909 warnings (908 in non-user code, 1 with check filters).
--
HeterogeneousTest/ROCmDevice/plugins/ROCmTestDeviceAdditionModule.cc:19:10: error: 'HeterogeneousCore/ROCmUtilities/interface/hipCheck.h' file not found [clang-diagnostic-error]
#include "HeterogeneousCore/ROCmUtilities/interface/hipCheck.h"
         ^
Suppressed 909 warnings (908 in non-user code, 1 with check filters).
--
gmake: *** [config/SCRAM/GMake/Makefile.coderules:129: code-checks] Error 2
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40637/33954

ERROR: Build errors found during clang-tidy run.

Suppressed 98 warnings (97 in non-user code, 1 with check filters).
--
HeterogeneousTest/ROCmOpaque/plugins/ROCmTestOpaqueAdditionModule.cc:14:10: error: 'HeterogeneousCore/ROCmServices/interface/ROCmService.h' file not found [clang-diagnostic-error]
#include "HeterogeneousCore/ROCmServices/interface/ROCmService.h"
         ^
Suppressed 874 warnings (873 in non-user code, 1 with check filters).
--
HeterogeneousTest/ROCmKernel/plugins/ROCmTestKernelAdditionModule.cc:16:10: error: 'HeterogeneousCore/ROCmServices/interface/ROCmService.h' file not found [clang-diagnostic-error]
#include "HeterogeneousCore/ROCmServices/interface/ROCmService.h"
         ^
Suppressed 909 warnings (908 in non-user code, 1 with check filters).
--
HeterogeneousTest/ROCmDevice/plugins/ROCmTestDeviceAdditionModule.cc:16:10: error: 'HeterogeneousCore/ROCmServices/interface/ROCmService.h' file not found [clang-diagnostic-error]
#include "HeterogeneousCore/ROCmServices/interface/ROCmService.h"
         ^
Suppressed 909 warnings (908 in non-user code, 1 with check filters).
--
HeterogeneousTest/ROCmWrapper/plugins/ROCmTestWrapperAdditionModule.cc:16:10: error: 'HeterogeneousCore/ROCmServices/interface/ROCmService.h' file not found [clang-diagnostic-error]
#include "HeterogeneousCore/ROCmServices/interface/ROCmService.h"
         ^
Suppressed 909 warnings (908 in non-user code, 1 with check filters).
--
gmake: *** [config/SCRAM/GMake/Makefile.coderules:129: code-checks] Error 2
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 2

)

process.path = cms.Path(
process.rocmTestDeviceAdditionModule +
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@makortel note that this one works with ROCm, while it does not work with CUDA.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@fwyzard
Copy link
Contributor Author

fwyzard commented Feb 1, 2023

please test

@fwyzard
Copy link
Contributor Author

fwyzard commented Feb 1, 2023

+heterogeneous

@fwyzard
Copy link
Contributor Author

fwyzard commented Feb 1, 2023

unhold

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 1, 2023

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40637/33992

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 1, 2023

Pull request #40637 was updated. can you please check and sign again.

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 1, 2023

-1

Failed Tests: RelVals-INPUT
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-7e4082/30327/summary.html
COMMIT: 879f836
CMSSW: CMSSW_13_0_X_2023-01-31-2300/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/40637/30327/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals-INPUT

The relvals timed out after 4 hours.

Comparison Summary

Summary:

  • You potentially added 4 lines to the logs
  • Reco comparison results: 6 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3555495
  • DQMHistoTests: Total failures: 3
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3555470
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 211 log files, 162 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@perrotta
Copy link
Contributor

perrotta commented Feb 1, 2023

+1

@perrotta
Copy link
Contributor

perrotta commented Feb 1, 2023

merge

@cmsbuild cmsbuild merged commit e10bed9 into cms-sw:master Feb 1, 2023
@fwyzard fwyzard deleted the ROCmTestDeviceLib branch February 2, 2023 12:45
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.

4 participants