viiccwen commented on code in PR #968:
URL: https://github.com/apache/mahout/pull/968#discussion_r2751443403
##########
qdp/qdp-kernels/src/amplitude.cu:
##########
@@ -617,6 +617,37 @@ int launch_l2_norm_f32(
return (int)cudaGetLastError();
}
+/// Returns the current device's max grid dimension (X), fallback to
CUDA_MAX_GRID_DIM_1D if error.
+static size_t get_max_grid_dim_1d(void) {
+ static size_t cached_device = 0;
+ if (cached_device != 0) {
Review Comment:
cached_device is a static variable. It only shows `cached_device = 0` first
time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]