Skip to content

Add aspect selector #508

Closed
Closed

Description

@oleksandr-pavlyk

There is sycl::aspect_selector, which allows to select devices based on a collection of requested aspects, as well as on the list of rejected aspects. See https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#table.device.selectors

Perhaps this calls for a similar dpctl.select_device_with_aspects.

Activity

  1. oleksandr-pavlyk commented on Aug 25, 2021

    @oleksandr-pavlyk
    ContributorAuthor

    Aspect selector in C++ requires specifying required present and required absent aspects to be given at the compile time.

    In Python this will be done dynamically. Aspects need to be encoded with strings.

    The list of device aspects in SYCL is given in section 4.6.4.3.

    namespace sycl {
    
    enum class aspect {
      cpu,
      gpu,
      accelerator,
      custom,
      emulated,
      host_debuggable,
      fp16,
      fp64,
      atomic64,
      image,
      online_compiler,
      online_linker,
      queue_profiling,
      usm_device_allocations,
      usm_host_allocations,
      usm_atomic_host_allocations,
      usm_shared_allocations,
      usm_atomic_shared_allocations,
      usm_system_allocations
    };
    
    } // namespace sycl

    Perhaps these could be given as strings. The function can be based on example/python/device_selection.py.

  2. oleksandr-pavlyk commented on Aug 25, 2021

    @oleksandr-pavlyk
    ContributorAuthor

    Also see #309

  3. oleksandr-pavlyk commented on Sep 7, 2021

    @oleksandr-pavlyk
    ContributorAuthor

    This was implemented.

  4. oleksandr-pavlyk commented on Sep 8, 2021

    @oleksandr-pavlyk
    ContributorAuthor

    Implemented with #558

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions