error when using permute in a gfor loop

  • 1 replies
  • 2070 views
*

sisiy

  • *****
  • 246
    • 查看个人资料
error when using permute in a gfor loop
« 于: 二月 11, 2012, 10:49:24 pm »
问题:
I'm currently using permute in a gfor loop in the code below. It works fine when K is less 9. However I get the following error when K greater than or equal to 9.

Error using permute
src/cuda/circshift.cpp:129: CUDA runtime error: invalid configuration argument (9)
(src/matlab/calls/permute.cpp:86)

Error in test_permute (line 17)
temp1 = permute(temp,[2 3 1]);

Why is this happening and what can I do to get around it? Perhaps, it's a bug? Given that I have 6 GB of memory on my GPU, it doesn't seem like there should be a problem for matrices of this size. Thanks!

Code:
clear

K = 9;

W = grand(513,K,40);
Z = grand(K,40,1913);
zeros_mat = gzeros(513,K,1913);

gfor q = 1:2
  temp_W = W(:,:,q);
  temp_Z = Z(:,q,:);

  W_tile = bsxfun(@plus, zeros_mat,temp_W);
  Z_tile = permute(temp_Z, [2 1 3]);

  temp = bsxfun(@plus,W_tile,Z_tile);
  temp1 = permute(temp,[2 3 1]);  
gend




*

sisiy

  • *****
  • 246
    • 查看个人资料
(无标题)
« 回复 #1 于: 二月 11, 2012, 10:50:31 pm »
回复:
I was able to reproduce this at my end. The bug has been fixed. Will update the thread when it's ready for you to download from http://www.accelereyes.com/nightly/.

Thanks for reporting.