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

Remove CUDAService numberOfStreamsPerDevice as unsupported #282

Conversation

makortel
Copy link

Currently the SwitchProducer(CUDA) (see #100) decides between CPU and GPU algorithm at the beginning of the job. This approach does not allow supporting the numberOfStreamsPerDevice parameter of CUDAService. Therefore this PR suggests to remove that functionality from CUDAService.

If the feature is wanted back, the SwitchProducer would have to be enhanced to do the device type decisions event-by-event (see #281).

@@ -52,7 +52,7 @@ class CUDAService {
bool enabled() const { return enabled_; }
// To be used in stream context when an edm::Stream is available
bool enabled(edm::StreamID streamId) const { return enabled(static_cast<unsigned int>(streamId)); }
bool enabled(unsigned int streamId) const { return enabled_ && (numberOfStreamsTotal_ == 0 || streamId < numberOfStreamsTotal_); } // to make testing easier
bool enabled(unsigned int streamId) const { return enabled_; } // to make testing easier
Copy link

Choose a reason for hiding this comment

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

can we remove bool enabled(edm::StreamID streamId) and bool enabled(unsigned int streamId) ?

Copy link
Author

Choose a reason for hiding this comment

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

Sure, they don't really make sense anymore.

fwyzard added 2 commits March 14, 2019 20:50
Do not pass the stream id to cudaService->enabled(), since it is now used any more.
Remove the redundant `enabled()` overloads that accept the stream id, but do not use it.
@fwyzard fwyzard changed the title Remove CUDAService numberOfStreamsPerDevice as soon-to-be-unsupported Remove CUDAService numberOfStreamsPerDevice as unsupported Mar 14, 2019
@fwyzard fwyzard merged commit 2294356 into cms-patatrack:CMSSW_10_5_X_Patatrack Mar 14, 2019
@fwyzard fwyzard added this to the CMSSW_10_5_X_Patatrack milestone Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants