情報詳細Q:GPUのメモリを強制的に開放する方法はありますか。A:GPUのキャッシュサイズを一時的に0(byte)と設定することで、メモリを完全に解放することが可能です。set_compute_device_param()により、下記のような記述で設定していただけます。■記述例deactivate_compute_device (DeviceHandle)...get_compute_device_param (DeviceHandle, 'buffer_cache_capacity', BufferCacheCapacity)get_compute_device_param (DeviceHandle, 'image_cache_capacity', ImageCacheCapacity)get_compute_device_param (DeviceHandle, 'pinned_mem_cache_capacity', PinnedMemCacheCapacity)set_compute_device_param (DeviceHandle, 'buffer_cache_capacity', 0)set_compute_device_param (DeviceHandle, 'image_cache_capacity', 0)set_compute_device_param (DeviceHandle, 'pinned_mem_cache_capacity', 0)set_compute_device_param (DeviceHandle, 'buffer_cache_capacity', BufferCacheCapacity)set_compute_device_param (DeviceHandle, 'image_cache_capacity', ImageCacheCapacity)set_compute_device_param (DeviceHandle, 'pinned_mem_cache_capacity', PinnedMemCacheCapacity)キャッシュサイズを0としたままで運用するとパフォーマンスが低下しますので、解放後には再度適切な値に戻す必要があることにご注意ください。添付ファイルタイトルHALCON / GPUのメモリを強制的に解放する方法URL 名000007319公開状況公開済み検証状況公開済み