Skip to content

Clean up harness helper functions for programs and kernels #2597

@bashbaug

Description

@bashbaug

See: #2595 (review)

Our current harness functions for programs and kernels are confusing. We should clean them up to simplify development and maintenance in the future.

Some specific suggestions:

  1. The harness function create_single_kernel_helper_create_program_for_device is never used and can be removed.
  2. The harness function create_single_kernel_helper_with_build_options just calls the harness function create_single_kernel_helper. We should remove create_single_kernel_helper_with_build_options and just call create_single_kernel_helper directly, instead.
  3. There are two overloads of create_single_kernel_helper_create_program: one is a version called directly by tests and another is an internal helper function only used within the harness. We should name the functions differently to disambiguate their uses.
  4. Build options are handled subtly differently in create_single_kernel_helper and create_single_kernel_helper_create_program: in create_single_kernel_helper, the build options are modified to add the highest supported OpenCL C version supported by all device in the context (assuming no other OpenCL C version is specified explicitly), whereas in create_single_kernel_helper_create_program the build options are left unmodified. Is this intentional? If so, we should find a way to make this difference clear.

It would be fine to do this cleanup in multiple steps, since (1), (2), and (3) are fairly straightforward, whereas (4) may require more thought and discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cognizant-backlogIssue approved by WG for Cognizant to work on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions