Hi,
Not sure if this is a bug, but at the very least is a feature request to try and use the GPU with the most memory when blending textures.
This I believe is the same as reported here
https://www.agisoft.com/forum/index.php?topic=14389.0 back in 1.6.1
Metashape 2.1.0
I have 2 x Nvidia 3060 GPU in my machine
One has 8GB RAM
One has 12 GB RAM
If I leave them both enabled when blending textures it tries to select the card with 8GB RAM and fails, and reverts to CPU.
With both cards enabled in preferences2024-02-16 11:43:21 Blending textures...
2024-02-16 11:43:21 Done "load_model" in 0
2024-02-16 11:43:21 Found 2 GPUs in 0 sec (CUDA: 0 sec, OpenCL: 0 sec)
2024-02-16 11:43:21 Using device: NVIDIA GeForce RTX 3060, 28 compute units, free memory: 7172/8191 MB, compute capability 8.6
2024-02-16 11:43:21 driver/runtime CUDA: 12030/10010
2024-02-16 11:43:21 max work group size 1024
2024-02-16 11:43:21 max work item sizes [1024, 1024, 64]
2024-02-16 11:43:21 Using device: NVIDIA GeForce RTX 3060, 28 compute units, free memory: 11159/12287 MB, compute capability 8.6
2024-02-16 11:43:21 driver/runtime CUDA: 12030/10010
2024-02-16 11:43:21 max work group size 1024
2024-02-16 11:43:21 max work item sizes [1024, 1024, 64]
2024-02-16 11:43:21 Found device NVIDIA GeForce RTX 3060 driver version 546.29.0.0, API version: 1.3.260, location 18::0
2024-02-16 11:43:21 Found device NVIDIA GeForce RTX 3060 driver version 546.29.0.0, API version: 1.3.260, location 134::0
2024-02-16 11:43:21 All cameras are fine
2024-02-16 11:43:21 Done "feasibility_check" in 0.029
2024-02-16 11:43:21 Activating context...
2024-02-16 11:43:21 Basis camera type is uint8:3
2024-02-16 11:43:23 calculating mesh connectivity... done in 13.082 sec
2024-02-16 11:43:37 Initialized texture renderer
2024-02-16 11:43:37 Configuring pipeline...
2024-02-16 11:43:37 Initialized memory broker
2024-02-16 11:43:37 Configuring mosaic pipeline with outliers filtering
2024-02-16 11:43:37 Prefetcher image dims 5568 4872 3 1
2024-02-16 11:43:38 Constructed pipeline
2024-02-16 11:43:38 Relaxed precision enabled
2024-02-16 11:43:38 Collecting memory requests...
2024-02-16 11:43:38 Allocating memory requests...
2024-02-16 11:43:38 Estimated required video memory: 8163 MB
2024-02-16 11:43:38 Estimated device memory: total 8050 MB, used 219 MB, available 6917 MB
2024-02-16 11:43:38 Cannot use GPU. Reason: Not enough memory on device
2024-02-16 11:43:38 Performing blending on CPU...2024-02-16 11:43:44 calculating mesh connectivity... done in 13.36 sec
2024-02-16 11:43:57 detecting outliers... *******************************************************************************************************************************************************************?**?*******?*******************************************************************************************************************************************************************************************??********************************************************************************************************************************************************************************************??****************************************************************************************************************************************************************************************************************************Finished processing in 908.514 sec (exit code 0)
2024-02-16 11:50:14 Error: Aborted by user
--- abort and untick the 8GB card in preferences and re-start texturing ----2024-02-16 11:50:20 Found 2 GPUs in 0 sec (CUDA: 0 sec, OpenCL: 0 sec)
2024-02-16 11:50:44 checking for missing images...Checking for missing images...
2024-02-16 11:50:44 done in 0.035 sec
2024-02-16 11:50:44 Finished processing in 0.035 sec (exit code 1)
2024-02-16 11:50:44 BuildTexture: mapping_mode = 0, page_count = 1, texture_size = 16384, blending_mode = MosaicBlending, texture_size = 16384, encode_winner_camera_id = off, fill_holes = on, ghosting_filter = on, texture_type = Diffuse map, transfer_texture = off, enable_gpu = on, relaxed_precision = on
2024-02-16 11:50:44 Blending textures...
2024-02-16 11:50:44 Done "load_model" in 0
2024-02-16 11:50:44 Found 2 GPUs in 0 sec (CUDA: 0 sec, OpenCL: 0 sec)
2024-02-16 11:50:44 Using device: NVIDIA GeForce RTX 3060, 28 compute units, free memory: 10113/12287 MB, compute capability 8.6
2024-02-16 11:50:44 driver/runtime CUDA: 12030/10010
2024-02-16 11:50:44 max work group size 1024
2024-02-16 11:50:44 max work item sizes [1024, 1024, 64]
2024-02-16 11:50:44 Found device NVIDIA GeForce RTX 3060 driver version 546.29.0.0, API version: 1.3.260, location 18::0
2024-02-16 11:50:44 Found device NVIDIA GeForce RTX 3060 driver version 546.29.0.0, API version: 1.3.260, location 134::0
2024-02-16 11:50:45 All cameras are fine
2024-02-16 11:50:45 Done "feasibility_check" in 0.026
2024-02-16 11:50:45 Activating context...
2024-02-16 11:50:45 Basis camera type is uint8:3
2024-02-16 11:50:46 calculating mesh connectivity... done in 13.314 sec
2024-02-16 11:51:00 Initialized texture renderer
2024-02-16 11:51:00 Configuring pipeline...
2024-02-16 11:51:00 Initialized memory broker
2024-02-16 11:51:00 Configuring mosaic pipeline with outliers filtering
2024-02-16 11:51:00 Prefetcher image dims 5568 4872 3 1
2024-02-16 11:51:01 Constructed pipeline
2024-02-16 11:51:01 Relaxed precision enabled
2024-02-16 11:51:01 Collecting memory requests...
2024-02-16 11:51:01 Allocating memory requests...
2024-02-16 11:51:01 Estimated required video memory: 8163 MB
2024-02-16 11:51:01 Estimated device memory: total 12129 MB, used 1354 MB, available 10792 MB 2024-02-16 11:51:01 Allocated 8183 MB of VRAM
2024-02-16 11:51:01 Allocated memory requests
2024-02-16 11:51:01 Configured pipeline
2024-02-16 11:51:01 Processing cameras...
2024-02-16 11:51:01 Loading mesh...