Forum

Author Topic: building textures does not use GPU on macOS  (Read 3658 times)

maurello

  • Newbie
  • *
  • Posts: 32
    • View Profile
building textures does not use GPU on macOS
« on: June 05, 2022, 09:47:08 AM »
Despite being detected, my GPUs are not used when building textures. I have one internal GPU and one eGPU connected via Thunderbolt 3 on macOS 12.4 (with Intel CPU).
Below you can see my workflow log. It detects the GPUs, it even says that it is using the two of them I selected in the preferences. However, when running the job, Agisoft only uses CPU.

This specific workflow step uses Vulkan technology to benefit from GPU. From Vulkan website macOS is not among the native supported platforms. However, MoltenVK is. On MoltenVK website there is a library to map Vulkan to Apple Metal. Here is the link: https://moltengl.com/moltenvk/. I could not find any instructions on Agisoft website to enable Vulkan technology on macOS through this library.

Could this solve the problem or is there some other setting/solution available?

Blending textures...
Found 3 GPUs in 5.4e-05 sec (OpenCL: 4.6e-05 sec)
Using device: AMD Radeon Pro 5500M Compute Engine, 24 compute units, 8176 MB global memory, OpenCL 1.2
  driver version: 1.2 (Apr 28 2022 03:33:53), platform version: OpenCL 1.2 (Apr 19 2022 18:44:25)
  max work group size 256
  max work item sizes [256, 256, 256]
  max mem alloc size 2044 MB
Using device: AMD Radeon Vega Frontier Edition Compute Engine, 64 compute units, 16368 MB global memory, OpenCL 1.2
  driver version: 1.2 (Apr 28 2022 03:34:05), platform version: OpenCL 1.2 (Apr 19 2022 18:44:25)
  max work group size 256
  max work item sizes [256, 256, 256]
  max mem alloc size 4092 MB
Found device AMD Radeon Vega Frontier Edition driver version 10044, API version: 1.0.148, location 4294967295::4294967295
Found device AMD Radeon Pro 5500M driver version 10044, API version: 1.0.148, location 4294967295::4294967295
Found device Intel(R) UHD Graphics 630 driver version 10044, API version: 1.0.148, location 4294967295::4294967295
Only NVIDIA and AMD devices are currently supported
Done "load_model" in 1e-06
calculating mesh connectivity... done in 14.0031 sec
estimating quality... **********************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** done in 54222.3 sec
blending textures...  *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
« Last Edit: June 07, 2022, 07:32:43 PM by maurello »

maurello

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: building textures does not use GPU on macOS
« Reply #1 on: June 07, 2022, 07:37:59 PM »
Tried again without luck. It seems impossible to get GPU to process textures generation in macOS, which basically makes the whole process insanely long using only CPU  :(
Anyone else with same experience and/or tips?
Alexey, any idea?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15090
    • View Profile
Re: building textures does not use GPU on macOS
« Reply #2 on: June 08, 2022, 03:07:03 PM »
Hello maurello,

We are working on GPU-supported texture blending on macOS. Depending on configuration and combination of GPU model and OS version it may behave differently (may not work in some cases).

In the current state from our observation, GPU-based texture blending on macOS (when works) is considerably slower than blending on CPU. So there's another point for improvement for us, apart from proper full support of GPU-based texturing (at least on modern hardware and recent macOS versions).
Best regards,
Alexey Pasumansky,
Agisoft LLC

maurello

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: building textures does not use GPU on macOS
« Reply #3 on: June 09, 2022, 12:15:12 AM »
Hello maurello,

We are working on GPU-supported texture blending on macOS. Depending on configuration and combination of GPU model and OS version it may behave differently (may not work in some cases).

In the current state from our observation, GPU-based texture blending on macOS (when works) is considerably slower than blending on CPU. So there's another point for improvement for us, apart from proper full support of GPU-based texturing (at least on modern hardware and recent macOS versions).

Thanks for your reply Alexey. Would installing MoltenVK help? It seems it can make Vulkan work through Apple Metal.
in my case GPUs are not used at all by Metashape, it all goes to CPU.

maurello

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: building textures does not use GPU on macOS
« Reply #4 on: June 26, 2022, 10:46:38 PM »
I tried to install MoltenVK, without luck. Metashape still does not use GPU for texture blending in macOS.