"Maximum variable size allowed on the device is exceeded" error when using internal.s​tats.gpu.p​dist2?

12 次查看(过去 30 天)
Hello, I hope you are well. I'm encountering an issue with the pdist2 function on my GPUs. I have both an A6000 with 40 GB of memory and an A100 with 80 GB of memory,
load('Dataset_1.mat')
X=single(Dataset(:,[2 4]));
X_CPU = X(1:60000,:);
X_GPU = gpuArray(X_CPU); % Convert data to gpuArray
% Compute pairwise distances more efficiently
D = pdist2(X_GPU, X_GPU, 'squaredeuclidean');
but I'm getting the same error on both devices. the error as shown below
Error using internal.stats.gpu.pdist2 Maximum variable size allowed on the device is exceeded.
Error in gpuArray/pdist2 (line 262) [doTranspose,D] = internal.stats.gpu.pdist2(X.',Y.',dist,additionalArg,smallestLargestFlag,d.AvailableMemory);
How can I solve this error?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with GPU Coder 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by