problem while running block matching disparity of openCV in cuda on Xavier

Hi,

After installing opencv 4.0 with cuda using the script below:
https://github.com/AastaNV/JEP/blob/master/script/install_opencv4.0.0_Nano.sh
i tried to run a simple code example that uses opencv cuda block matching disparity.
(the code is listed below)
the opencv function compute is getting stuck for unknown reason.
exactly the same code works perfectly on PC and Jetson nano, please advise.

/// code

 cv::Ptr<cv::cuda::StereoBM> bm;
 cv::cuda::GpuMat d_left, d_right;

// Set common parameters
bm =  cv::cuda::createStereoBM(64,11);


 // Prepare disparity map of specified type
cv::Mat dispCuda(cvGrayLeftWithBorder.size(), CV_8U);
cv::cuda::GpuMat d_disp(cvGrayLeftWithBorder.size(), CV_8U);

d_left.upload(cvGrayLeftWithBorder);
d_right.upload(cvGrayRightWithBorder);
bm->compute(d_left, d_right, d_disp);

d_disp.download(dispCuda);

Can anyone please help?

I have the same problem, even with minimum disparity levels and block size.