Why using .mex created by MATLAB Coder and GPU Coder doesn't give exactly same results?

1 回表示 (過去 30 日間)
JAI PRAKASH
JAI PRAKASH 2018 年 8 月 24 日
コメント済み: JAI PRAKASH 2018 年 8 月 25 日
Hi
I created an image processing function and transformed it into .mex to speed-up my process. As I have an Nvidia GPU cuda 6.1 compute capability, I thought to create .mex with GPU Coder also.
But why output of both .mex file is not exactly same? I passed same input image and other parameters, but I find ouput image of GPU coded mex little more blurry. See below comarison carefully..
Can somebody explain why? I used below command to create GPU coded mex
cfg = coder.gpuConfig('mex');
cfg.GpuConfig.CompilerFlags = '--fmad=false';
cfg.GpuConfig.ComputeCapability = '6.1';
codegen -args {inputImage, otherParameters} -config cfg imProcessFunction
For detailed analysis, I subtracted above images and then I got below image
difference = CPUimage-GPUimage;
  11 件のコメント
JAI PRAKASH
JAI PRAKASH 2018 年 8 月 25 日
Thanks @Walter Robreson
Above links were helpful..

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with GPU Coder についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by