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
Cuda time measurements #37141
Cuda time measurements #37141
Conversation
…task on GPU, -q print the standerDeviation, -p part selection, -f to save the result on a file
The command line options are: -a COUNT repeat each set of tasks COUNT times, and compute the average. -f to save the result to a file. -p PARTS select which parts to run by order, for example -p 1 will run only part 1, while -p 123456 all parts. -q print the standard deviation of the measurements. -t TASKS repeat the task on the gpu TASKS times.
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37141/28677 |
A new Pull Request was created by @AliinCern (Marafi) for master. It involves the following packages:
@cmsbuild, @makortel, @fwyzard can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
enable gpu |
@cmsbuild, please test |
-1 Failed Tests: UnitTests RelVals RelVals-GPU RelVals-INPUT AddOn Unit TestsI found errors in the following unit tests: ---> test cudaTimeMeasurement had ERRORS RelVals
Expand to see more relval errors ...
RelVals-GPU
RelVals-INPUT
Expand to see more relval errors ...AddOn Tests
Expand to see more addon errors ... |
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.
The new test can only work if the machine has a GPU...
@AliinCern could you add cms::cudatest::requireDevices();
at the beginning of the main()
functions ?
#include <thrust/device_vector.h> | ||
#include <unistd.h> | ||
#include "HeterogeneousCore/CUDAUtilities/interface/cudaCheck.h" | ||
|
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.
#include "HeterogeneousCore/CUDAUtilities/interface/requireDevices.h" | |
|
||
void printResultEach(std::vector<Timing> &timing, int type, bool standerDeviationPrint); | ||
|
||
int main(int argc, char *argv[]) { |
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.
int main(int argc, char *argv[]) { | |
int main(int argc, char *argv[]) { | |
cms::cudatest::requireDevices(); | |
…vices.h"" and "cms::cudatest::requireDevices();"
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37141/28680 |
enable gpu |
@@ -15,4 +15,11 @@ | |||
<use name="cuda"/> | |||
</bin> | |||
|
|||
<bin name="cudaTimeMeasurement" file="cudaTimeMeasurement.cu"> | |||
<use name="cuda"/> |
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.
My bad, I forgot that you need to add here:
<use name="HeterogeneousCore/CUDAUtilities"/>
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37141/28696 |
enable gpu |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-169591/22876/summary.html GPU Comparison SummarySummary:
Comparison SummarySummary:
|
+heterogeneous |
@smuzaffar is there a way to request running the unit tests on the GPU machine ? |
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) |
No @fwyzard , currently there is no way to requests for unit tests to be run on GPU. As for PR tests, we are not deploying the |
+1
|
What is the purpose of the program?
A device (GPU) in a local machine can read/write host (CPU) memory in different methods by using Cuda API. In this program, we measured these methods in a local machine in order to find the best approachable to memory with respect to time. The program has four directions in time measurements:
What methods are used in the Program?
What are the command line Options to run the Program?
-p PARTS select which parts (methods) to run, for example -p 12345 will run all methods. Please note that to run Part 0, use
number 6 for example -p 6
-a COUNT repeat each set of tasks COUNT times, and compute the average.
-f to save the result to a file.
-q print the standard deviation of the measurements.
-t TASKS repeat the task on the device/gpu TASKS times.
Program Validation:
we ran the program using scram b runtests, and the result is this:
---> test cudaTimeMeasurement succeeded
TestTime:1
^^^^ End Test cudaTimeMeasurement ^^^^