Convert yuv420p to bgr24 with 2560x1440 camera, CUDA error 700 (3.8 KB)
it works well with 1920x1080 cameras,but it got cuda error with 2560x1440 cameras.

error message:

what should i do next?


Error 700 indicates cudaErrorIllegalAddress:

cudaErrorIllegalAddress = 700
The device encountered a load or store instruction on an invalid memory address. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched.


thank you for your time and attention in this matter. however, it makes me confused when it works well with 1920x1080 cameras. and I want to know ‘Why’


It is an invalid memory address error which is related to the data resolution/size.
So you might check if the buffer size is set with 2560x1440 correctly.


oh ,thank you for your sugestion, I test it in a simple way:

int width = 1920;
int height = 1080;
cv::Mat img = cv::Mat::zeros(height, width, CV_8UC3);
size_t size = height * width * sizeof(uchar) * 3;
uchar *yuv_buffer = (uchar *)malloc(size);
memset(yuv_buffer, 0, size);
uchar *d_yuv;
CUDA_CHECK(cudaMalloc((void **)&d_yuv, size));
CUDA_CHECK(cudaMemset(d_yuv, 0, size));
uchar *d_src;
CUDA_CHECK(cudaMalloc((void **)&d_src, size));
CUDA_CHECK(cudaMemset(d_src, 0, size));
CUDA_CHECK(cudaMemcpy(d_yuv, yuv_buffer, size, cudaMemcpyHostToDevice)); // CUDA error 700
gpuConvertYUV420ptoBGR24(d_yuv, d_src, width, height);
CUDA_CHECK(cudaMemcpy(, d_src, size, cudaMemcpyDeviceToHost));
char out_tag_pic[1024];
std::string time_str = get_time_str();
sprintf(out_tag_pic, "%s.jpg", time_str.c_str());
cv::imwrite(out_tag_pic, img);


if I set width=1920 and height = 1080, a green image comes out , it’s ok.
but if I set width=2560 and height = 1440, it got ‘CUDA error 700’ at the line ‘cudaMemcpy(d_yuv, yuv_buffer, size, cudaMemcpyHostToDevice)’.


Could you do a test if this issue comes from the yuv_buffer?
For example, allocate another host buffer with 2560x1440 and apply memcpy to see if any error.


“memcpy” is ok.

I find another issue ,when I try to use “cuda-memcheck ./algorihtm |more” to help me figue the bug out.
it always comes out:

CUDA error 46========= Program hit cudaErrorDevicesUnavailable (error 46) due to “all CUDA-capable devices are busy or unavailable” on CUDA API call to cudaM
========= Saved host backtrace up to driver entry point at error
========= Host Frame:/usr/lib/aarch64-linux-gnu/tegra/ [0x32081c]
========= Host Frame:/usr/local/cuda-10.2/lib64/ (cudaMalloc + 0x144) [0x3b7bc]
========= Host Frame:./algorihtm [0x2dd0]
========= Host Frame:/lib/aarch64-linux-gnu/ (__libc_start_main + 0xe0) [0x207a0]
========= Host Frame:./algorihtm [0x373c]

is that a problem? or “cuda-memcheck” can’t be used at jetson nx.

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.


Since profiler need to be executed with root authority, do you run it with sudo?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.