Forum

Author Topic: Not able to assign support_gpu parameter in Metashape.Tasks.MergeChunks()  (Read 4719 times)

ankit108

  • Newbie
  • *
  • Posts: 17
    • View Profile
When i try to use the following code snippet, i am getting the error

"AttributeError: attribute 'supports_gpu' of 'Metashape.Tasks.MergeChunks' objects is not writable"

kidnly help me in resolving this..

Code: [Select]
    task = Metashape.Tasks.MergeChunks()
    task.chunks = [chunk.key for chunk in doc.chunks]
    task.copy_point_clouds = True
    task.merge_assets = True
    task.supports_gpu = True
    task.apply(doc)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15282
    • View Profile
Hello ankit108,

This task property is not writable - it is an indication, whether the procedure uses GPU or not (mainly this property is utilized in network processing, when CPU or GPU capability is assigned to the processing nodes).

If you want to apply or disable GPU utilization for GPU-supported tasks you should modify Metashape.app.gpu_mask accordingly before the task start.
Best regards,
Alexey Pasumansky,
Agisoft LLC

ankit108

  • Newbie
  • *
  • Posts: 17
    • View Profile
Thank you for the clarification, Alexy..