Skip to content
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

[SYCL] Replaces some of the CL_* enums with PI_* enums. #1149

Closed
wants to merge 1 commit into from

Conversation

rbegam
Copy link
Contributor

@rbegam rbegam commented Feb 20, 2020

Signed-off-by: rbegam rehana.begam@intel.com

Signed-off-by: rbegam <rehana.begam@intel.com>
PI_CONTEXT_INFO_DEVICES = CL_CONTEXT_DEVICES,
PI_CONTEXT_INFO_NUM_DEVICES = CL_CONTEXT_NUM_DEVICES,
PI_CONTEXT_INFO_PROPERTIES = CL_CONTEXT_PROPERTIES,
PI_CONTEXT_INFO_REFERENCE_COUNT = CL_CONTEXT_REFERENCE_COUNT,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
PI_CONTEXT_INFO_REFERENCE_COUNT = CL_CONTEXT_REFERENCE_COUNT,
PI_CONTEXT_INFO_REFERENCE_COUNT = CL_CONTEXT_REFERENCE_COUNT,

@AlexeySachkov
Copy link
Contributor

@rbegam, am I right that this change was submitted as #1239?

@rbegam
Copy link
Contributor Author

rbegam commented Mar 17, 2020

@AlexeySachkov that is right. I forgot to close this.

jsji pushed a commit that referenced this pull request Aug 11, 2023
* Don't wrap kernels that are not being called in the module

This patch is a result of a reflection about previously merged PR
KhronosGroup/SPIRV-LLVM-Translator#1149
"add an entry point wrapper around functions (llvm pass)"
and is enspired by various reported translator, clang (OpenCL) and Intel
GPU drivers issues (see
KhronosGroup/SPIRV-LLVM-Translator#2029 for
reference).

While SPIR-V spec states:
===
*OpName*
--//--. This has nosemantic impact and can safely be removed from a module.
===
yet having EntryPoint function and a function that shares the name via
OpName might be confusing by both (old) drivers and programmers, who
read the SPIR-V file.

This patch prevents generation of the wrapper function when it's not
necessary to generate it aka if a kernel function is not called by other kernel.

We can do better in other cases as well, for example I have experiments
of renaming a wrapped function adding a previx, so it could be
distinguished from the actual kernel/entry point, but for now it doesn't
pass validation for E2E OpenCL tests.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>

* prevent a copy

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>

This patch is a result of a reflection about previously merged PR #1149 "add an entry point wrapper around functions (llvm pass)" and is enspired by various reported translator, clang (OpenCL) and Intel GPU drivers issues (see

While SPIR-V spec states:
OpName
--//--. This has nosemantic impact and can safely be removed from a module.
yet having EntryPoint function and a function that shares the name via OpName might be confusing by both not-up-to-date drivers and programmers, who read the SPIR-V file.

This patch prevents generation of the wrapper function when it's not necessary to generate it aka if a kernel function is not called by other kernel.

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@46285e4
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.

3 participants