GTX 1050 TI: Unity GPU Lightmapper can not allocate enough memory

Hi,

I have a GeForce GTX 1050 TI OC on my Ubuntu 20.04 computer.
I want to use the GPU in Unity3D to bake the Lightmaps (Progressive GPU Lightmapper). That works very well so far. Baking with the GPU is about 50 times faster than with my old CPU. However, there is unfortunately a problem with larger memory allocations:
Output from Unity3D: “OpenCL Error. Falling back to CPU lightmapper. Error callback from context: Max allocation size supported by this device is 0.99 GB. 1.63 GB requested.
I already googled this problem and also found a possible solution: Apparently it helps to install the studio driver instead of the game ready driver.

Unfortunately there is no studio version of the Linux drivers. (only for Windows)

So my question is whether you can activate this feature somewhere in the driver-settings or there is another possibility so that the full 4 GB can be used by the lightmapper?

I installed the latest version of the Linux Long Lived driver (450.80.02)

Output of nvidia-smi:

Mon Nov 16 13:49:51 2020
±----------------------------------------------------------------------------+
| NVIDIA-SMI 450.80.02 Driver Version: 450.80.02 CUDA Version: 11.0 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce GTX 105… Off | 00000000:03:00.0 On | N/A |
| 0% 43C P0 N/A / 72W | 311MiB / 4038MiB | 0% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1103 G /usr/lib/xorg/Xorg 29MiB |
| 0 N/A N/A 1714 G /usr/lib/xorg/Xorg 128MiB |
| 0 N/A N/A 1850 G /usr/bin/gnome-shell 99MiB |
| 0 N/A N/A 5380 G …AAAAAAAAA= --shared-files 38MiB |
| 0 N/A N/A 8097 G /usr/lib/firefox/firefox 1MiB |
| 0 N/A N/A 9881 G /usr/lib/firefox/firefox 1MiB |
| 0 N/A N/A 11102 G /usr/lib/firefox/firefox 1MiB |
±----------------------------------------------------------------------------+

Edit1: my kernel-version: 5.4.0-53-generic
Edit2: So based on my current research, it has to do with OpenCL’s CL_DEVICE_MAX_MEM_ALLOC_SIZE environment variable, which is limited to 25% of actual memory. Is there a way to increase that?

nvidia-bug-report.log.gz (541.4 KB)

Thank you guys!