-
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
Use only CUDA devices supported by the SCRAM toolfile #286
Use only CUDA devices supported by the SCRAM toolfile #286
Conversation
Fixes #280 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the approach itself is ok, thanks.
<< ret << ") " << cudaGetErrorString( ret ) | ||
<< ". Running only tests not requiring devices."); | ||
if (deviceCount == 0) { | ||
WARN("No supported CUDA devices available. Running only tests not requiring devices."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be changed to use exitSansCUDADevices()
? Or, should that be changed to use supportedCudaDevices()
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
Yes, if we do not build for any of the available devices, we should skip those tests as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using the exitSansCUDADevices()
here? Or do you prefer to return to that later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not very familiar with how the test harness works, but if I understand the intent, you wanted to run part of the tests even if there are no available devices:
SECTION("Enabled only if there are CUDA capable GPUs") {
auto cs = makeCUDAService(ps, ar);
if(deviceCount <= 0) {
REQUIRE(cs.enabled() == false);
WARN("CUDAService is disabled as there are no CUDA GPU devices");
}
else {
REQUIRE(cs.enabled() == true);
INFO("CUDAService is enabled");
}
}
If we call exitSansCUDADevices()
the test would never reach that part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, so I was not able read my own code.
HeterogeneousCore/CUDAServices/interface/supportedCudaDevices.h
Outdated
Show resolved
Hide resolved
Enable CUDA support only if there is at least once CUDA device compatible with the CUDA architectures enabled in SCRAM's cuda.xml toolfile.
Restrict the CUDAService and its clients to use only the devices supported by the CUDA architectures enabled in SCRAM's cuda.xml toolfile.
f42f3f3
to
68089fb
Compare
…ADevices Check for available supported devices also in exitSansCUDADevices.
e9e6c7c
to
fff1f68
Compare
OK, I've cleaned up a bit the interface. @makortel does this address all your comments ? |
+1 |
This reverts commit 1b21d1c.
Enable CUDA support only if there is at least once CUDA device compatible with the CUDA architectures enabled in SCRAM's cuda.xml toolfile, and restrict
CUDAService
and its clients to the same list.