Recently,I’ve met a difficulty when using CUDA on TX2.
For some demands, I have to achieve a conversion about bayer format to YUV format of images using CUDA on TX2.So I designed the program and almost achieved this function,but there remains some problems I can’t solve,which goes as following:
The kernel function of CUDA has a great fluctuation even if the content of the kernel function is NULL.For test,I designed the thread configuration as:
dim3 dimBlock(10,10),dim3 dimGrid(1,1),and the kernel function is kernel_name<<<dimGrid,dimBlock>>>(…)(the inner the the kernel function is NULL);
But there’s also showing a great fluctuation when I record the execution time of the kernel function.
So I want to know why.
Urgent,and I would appreciate it so much if someone can help me solve this problem.
Sorry that we don’t have a CUDA sample to convert bayer into YUV.
But here is a CUDA code for YUV to NV12, which can also give you some hint.
Sorry to bother you,but I’m afraid that you didn’t realize what I really mean. I want to know the reason why it’s high fluctuation rather than looking for an available CUDA program which transfer bayer format to YUV format. Do you know the reason? If does, I’ll really looking forward to your reply.
Thank you all the same for your kindness.
Sorry for the misunderstanding and the delay in response.
There are multiple possible reason, ex. scheduling, bandwidth, …, to cause an unexpected wait.
Would you mind to generate a nvprof data of your application and share it with us first.
/usr/local/cuda/bin/nvprof -o output.nvprof [your app]
So we can narrow down the source of the fluctuation function.
Thank you very much for your help,AastaLLL. When I have free time,I’ll take a try and then I share the data for finding the reason.