-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 GPU support for ONNXRuntime #36963
Conversation
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36963/28320
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36963/28323
|
A new Pull Request was created by @hqucms (Huilin Qu) for master. It involves the following packages:
@jpata, @cmsbuild, @clacaputo, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild , please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a42efb/22413/summary.html Comparison SummarySummary:
|
assign heterogeneous |
Neat! I'm curious:
|
if (gpu_mode == force_gpu) { | ||
throw cms::Exception("RuntimeError") << "No GPU detected, cannot run ONNXRuntime on GPU."; | ||
} else { | ||
std::cout << "[ONNXRuntime] No GPU detected, will run on CPU." << std::endl; |
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.
please don't use std::cout
, as it cannot be silenced from the job configuration
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.
Would edm::LogInfo
work?
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.
Sure.
I have never tried to use the async mode in CMSSW -- can you point me to any documentation or example?
It does not grabs the whole GPU, so in principle it can be used in multiple streams simultaneously I think (to be tested of course). |
if (input_dims[0] != batch_size) { | ||
throw cms::Exception("RuntimeError") << "The first element of `input_shapes` (" << input_dims[0] | ||
<< ") does not match the given `batch_size` (" << batch_size << ")"; | ||
} |
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.
this change is unrelated to the use of GPUs, isn't it ?
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.
No it's unrelated to GPU -- just a helpful error message for users.
What NVIDIA GPU architectures (SM 6.0, 7.0, 7.5, etc.) does ONNX support ? |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36963/29454
|
@cmsbuild , please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-a42efb/24133/summary.html GPU Comparison SummarySummary:
Comparison Summary@slava77 comparisons for the following workflows were not done due to missing matrix map:
Summary:
|
+1 Thanks @hqucms |
+reconstruction
|
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
This is a technical PR that allows the GPU support of ONNXRuntime (cms-sw/cmsdist#6776) to be easily enabled in CMSSW.
Example usage:
PR validation:
Unit tests are updated to cover all three options.