Skip to content

[SYCL][DOC] Add documentation for the filter selector #2460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 18, 2020

Conversation

jbrodman
Copy link
Contributor

Document the design and function of ONEAPI::filter_selector.

Signed-off-by: James Brodman [email protected]

@jbrodman jbrodman requested a review from a team as a code owner September 10, 2020 17:48
@jbrodman
Copy link
Contributor Author

@mkinsner


=== DSL for Specifying Filters

A string passed to the selector defines one or more filters. Filters have a certain syntax that must be followed. A filter is specified as a triple of the form:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we define what happens if that syntax is not followed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throws an error.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throws an error.

Just to expand, syntax being incorrect throws and error, but what about requesting a GPU when there isn't one or requesting gpu:1 when only gpu:0 exists?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should get a runtime error (some sorta device not found one) similar to using gpu_selector when there's no gpu.


== Filter Selector

The filter selector is a new device selector class that accepts a string of one or more filters that refine the set of devices that may be returned when the selector's `select_device` method is invoked. Devices that match the specified filter(s) are ranked by the default_selector to determine which device is ultimately selected.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how default_selector fits in here. Should it be filter_selector?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default selector is used to score devices that match the filter, in case more than one device does.

@romanovvlad romanovvlad merged commit c3f5cfb into intel:sycl Sep 18, 2020
jsji pushed a commit that referenced this pull request Apr 4, 2024
…arget (#2470)

This change addresses p.4 of #2460.
No changes for OpCopyMemory as we currently don't use it in translation.

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@a384e036501551e
iclsrc pushed a commit that referenced this pull request Apr 11, 2024
Do nothing for now, as it's not used in translator.

Addresses p.6 of #2460

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@2c3b505879dcaf1
jsji pushed a commit that referenced this pull request Apr 18, 2024
There is no mapping to LLVM instructions, so it can be used only via SPIR-V friendly translation.

This addresses p1. of #2460

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@8518a6f72fd586c
jsji pushed a commit that referenced this pull request Apr 18, 2024
There is no mapping to LLVM instructions, so it can be used only via SPIR-V friendly translation.

This addresses p1. of #2460

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@8518a6f72fd586c
jsji pushed a commit that referenced this pull request Sep 6, 2024
…ng (#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see #2460 and #2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for #2670, but I'll do that in a separate PR.

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@f7057b44e20fd06
jsji pushed a commit that referenced this pull request Sep 8, 2024
…ng (#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see #2460 and #2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for #2670, but I'll do that in a separate PR.

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@f7057b44e20fd06
Chenyang-L pushed a commit that referenced this pull request Feb 18, 2025
[Benchmarks] fix running benchmarks when umf dir is not specified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants