Complex math on GPU v CPU
조회 수: 1 (최근 30일)
이전 댓글 표시
I am using complex step derivatives to compute gradients of an otherwise real and analytic function, but I get different answers when running the exact same code on the GPU as on the CPU. Most differences are small (<.1%), but some can be off by more than a factor of 2. All GPU computations are done using double precision on a GTX 580 running 2012a.
When I use John D'Errico's DERIVEST to compute the same thing using real finite differences (awesome program by the way) CPU and GPU produce pretty much identical answers. Is there some subtle difference in the way the GPU handles complex numbers that would cause this?
Thanks, Rodrigo
댓글 수: 0
답변 (1개)
Andy
2012년 9월 24일
hello Rodrigo,
first, thanks for trying the MathWorks GPU offering.
the GPU math library has been written to give results as close to the CPU as reasonably possible. most functions and arithmetic operators are off only a couple ulps. your comments/questions are somewhat surprising. would you mind posting some more details such as example code with inputs? also what OS are you using to run CPU MATLAB?
thanks,
Andy
.
참고 항목
카테고리
Help Center 및 File Exchange에서 GPU Computing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!