-
Notifications
You must be signed in to change notification settings - Fork 106
Added a class to check the timings of cuda kernels, started using it in the RapidHeightMapExtractorCUDA #675
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
Conversation
…in the RapidHeightMapExtractorCUDA
…cleanup the usages
| * This class handles the kernel timings. | ||
| * With options to compute the min/max, average, and variance of the dataset | ||
| */ | ||
| private static class CudaKernelTimings |
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.
Rename to CUDAKernelTimings
| { | ||
| private final CUfunc_st kernelFunction = new CUfunc_st(); | ||
| private final List<Pointer> parameters = new ArrayList<>(); | ||
| private final String name; |
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.
Can you make this the first field above kernelFunction?
| private final CUevent_st end = new CUevent_st(); | ||
|
|
||
| private int error; | ||
| private boolean enableKernelTimings = false; |
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.
Can you move this below retainParameters so that the "flags" of the class are together?
| if (PRINT_TIMING_FOR_KERNELS) | ||
| { | ||
| updateKernel.enableKernelTimings(true); | ||
| registerKernel.enableKernelTimings(true); | ||
| croppingKernel.enableKernelTimings(true); | ||
| planOffsetKernel.enableKernelTimings(true); | ||
| emptyRegisterKernel.enableKernelTimings(true); | ||
| } | ||
|
|
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.
Just pass PRINT_TIMING_FOR_KERNELS into each method
e.g. updateKernel.enableKernelTimings(PRINT_TIMING_FOR_KERNELS);
|
|
||
| if (PRINT_TIMING_FOR_KERNELS) | ||
| { | ||
| snappingKernel.enableKernelTimings(true); |
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.
snappingKernel.enableKernelTimings(PRINT_TIMING_FOR_KERNELS);
No description provided.