Host Program Objects - 2019.2 English - UG1315

Vitis Guidance Messaging (UG1315)

Document ID
UG1315
Release Date
2019-10-30
Version
2019.2 English

Description

This rule checks if there are unreleased OpenCLâ„¢ objects in the host application program.

Explanation

The host code should manage all the OpenCL objects and should properly release them. Otherwise, it can cause resource leaks and potential issues in a long-running application. The profile and timeline trace data can also be captured incorrectly.

Resolution

Review your host code to ensure all the resources allocated are released properly.

Examples:

  • The cl_event should be released by clReleaseEvents.
  • The cl_buffer should be released by clReleaseMemObject.
  • The cl_program should be released by clReleaseProgram.