-
Notifications
You must be signed in to change notification settings - Fork 5
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
Cleanup for the framework PR #426
Cleanup for the framework PR #426
Conversation
Do we have examples of this (running a subset of the tests without GPUs) ? |
cmssw/CUDADataFormats/Common/test/test_CUDAProduct.cc Lines 25 to 33 in 832e57f
and
|
Ok, neither of them is really testing essential functionality (on a non-GPU machine). On the other hand, demonstrating that a test CUDA producer can be constructed and ran through lumi and run transitions without a GPU has some value (since that is what actually happens today with SwitchProducer). Alternatively we could have separate unit test executables for GPU and non-GPU cases. |
@makortel I don't mind adding the extra possibility - however I'm confused about the tests themselves... In In But more importantly, what do you mean by
? |
With
Right, but that only applies to event transitions (i.e. |
Oh. Yes, yes, it is. |
PR description:
While preparing a PR for CMSSW
master
I noticed that the unit tests (within the "framework" part) were not fully working on a non-GPU machine. As a subsequent cleanup this PR proposesgpu
Modifier intestCUDASwitch_cfg.py
, and fix an input configuration parameter relevant when running without GPUtestCUDA_cfg.py
as not really usefulexitSansCUDADevices.cc
torequireCUDADevices.cc
for consistencyThen I realized that at least with catch2 unit test framework just exiting the program in
requireCUDADevices()
is too harsh, especially when a subset of the tests (in a file) would be useful to run without GPUs. Therefore I addedhasCUDADevices()
that returns abool
, which allows me toreturn
instead ofexit()
from catch2 tests.PR validation:
Code compiles, unit tests run on both non-GPU and GPU machines.