Standalone Compiler gpuArray RTX 4090 CUDA 12.0

Hi,
got a new ML machine with an NVIDIA RTX 4090. I have tried to run a quick benchmark written on my own as a compiled standalone application. What I have done:
  1. Use another machine to compile my code as an app via Compiler Toolbox (R2022b)
  2. Installed this on the new machine with the RTX 4090 including newest MCR
  3. Test GPU gets recognized by the app using gpuDeviceTable - works
  4. Try a simple feedforward network training with GPU - works
  5. Try my own implementation of some code with gpuArrays - failed (see below)
Is the latest MCR not compatabile with the new RTX 4090 in some parts of functions (as here with pinv)?

5 个评论

This looks like a bug - either with MATLAB or more likely CUDA. You should raise a support ticket.
In the meantime
  1. Make sure you have the latest graphics driver
  2. Make sure your device is not low on memory when pinv is called. Write a toy version which only calls pinv and uses small arrays.
  3. Reimplement avoiding cuSolver. Can your code use backslash instead? pinvA = A\eye(size(A,1))
Okay, tried different things.
  1. Latest driver is installed and
  2. the same application works on a machine with a RTX 2080Ti (which has less memory).
  3. Surprisingly, this worked!
I have also tried it with much smaller variables sizes and there seems to be a sweet spot. GPUArray in double was 60000x4 which causes the error (but not with the backslash). With 100x4 it still doesn't work. It works with pinv while using a really small array like 10x4, which also must be the sweet spot.
Will write a support ticket now.
Awesome. Can you give me an example matrix that errors? Also, can you only reproduce this with the MCR or does it also happen when running MATLAB?
Unfortunately I don't have an Ada card right now but I can certainly ask NVIDIA to look into it.
By the way, what I gave you was actually inv. If A is rectangular or singular you want pinvA = (A'*A)\(A'*eye(size(A,1));

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Get Started with GPU Coder 的更多信息

产品

版本

R2022b

提问:

2022-12-16

评论:

2022-12-19

Community Treasure Hunt

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

Start Hunting!

Translated by