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

Add parsing of OpenCL C++ -cl-std flags #328

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lucasz93
Copy link

@lucasz93 lucasz93 commented May 7, 2024

Hello!

Support for OpenCL C++ was added into LLVM 14, but IGC doesn't support parsing of those flags just yet. I've opened PRs which adds support for parsing these flags to the following repositories: intel-graphics-compiler, compute-runtime and opencl-clang.

The options are passed down into LLVM which then happily compiles my C++ kernel.

PRs should be merged in the following order: opencl-clang, intel-graphics-compiler, then finally compute-runtime.

Kind regards,
-Lucas

haonanya pushed a commit to intel/opencl-clang that referenced this pull request May 8, 2024
Hello!

Support for OpenCL C++ was added into LLVM 14, but IGC doesn't support
parsing of those flags just yet. I've opened PRs which adds support for
parsing these flags to the following repositories:
[intel-graphics-compiler](intel/intel-graphics-compiler#328),
[compute-runtime](intel/compute-runtime#731) and
[opencl-clang](#510).

The options are passed down into LLVM which then happily compiles my C++
kernel.

PRs should be merged in the following order: opencl-clang,
intel-graphics-compiler, then finally compute-runtime.

Kind regards,
-Lucas

Co-authored-by: Lucas Zadrozny <[email protected]>
wenju-he pushed a commit to wenju-he/opencl-clang that referenced this pull request May 16, 2024
Hello!

Support for OpenCL C++ was added into LLVM 14, but IGC doesn't support
parsing of those flags just yet. I've opened PRs which adds support for
parsing these flags to the following repositories:
[intel-graphics-compiler](intel/intel-graphics-compiler#328),
[compute-runtime](intel/compute-runtime#731) and
[opencl-clang](intel#510).

The options are passed down into LLVM which then happily compiles my C++
kernel.

PRs should be merged in the following order: opencl-clang,
intel-graphics-compiler, then finally compute-runtime.

Kind regards,
-Lucas

Co-authored-by: Lucas Zadrozny <[email protected]>
(cherry picked from commit 545a145)
wenju-he pushed a commit to wenju-he/opencl-clang that referenced this pull request May 16, 2024
Hello!

Support for OpenCL C++ was added into LLVM 14, but IGC doesn't support
parsing of those flags just yet. I've opened PRs which adds support for
parsing these flags to the following repositories:
[intel-graphics-compiler](intel/intel-graphics-compiler#328),
[compute-runtime](intel/compute-runtime#731) and
[opencl-clang](intel#510).

The options are passed down into LLVM which then happily compiles my C++
kernel.

PRs should be merged in the following order: opencl-clang,
intel-graphics-compiler, then finally compute-runtime.

Kind regards,
-Lucas

Co-authored-by: Lucas Zadrozny <[email protected]>
(cherry picked from commit 545a145)
wenju-he pushed a commit to wenju-he/opencl-clang that referenced this pull request May 16, 2024
Hello!

Support for OpenCL C++ was added into LLVM 14, but IGC doesn't support
parsing of those flags just yet. I've opened PRs which adds support for
parsing these flags to the following repositories:
[intel-graphics-compiler](intel/intel-graphics-compiler#328),
[compute-runtime](intel/compute-runtime#731) and
[opencl-clang](intel#510).

The options are passed down into LLVM which then happily compiles my C++
kernel.

PRs should be merged in the following order: opencl-clang,
intel-graphics-compiler, then finally compute-runtime.

Kind regards,
-Lucas

Co-authored-by: Lucas Zadrozny <[email protected]>
(cherry picked from commit 545a145)
wenju-he pushed a commit to wenju-he/opencl-clang that referenced this pull request May 16, 2024
Hello!

Support for OpenCL C++ was added into LLVM 14, but IGC doesn't support
parsing of those flags just yet. I've opened PRs which adds support for
parsing these flags to the following repositories:
[intel-graphics-compiler](intel/intel-graphics-compiler#328),
[compute-runtime](intel/compute-runtime#731) and
[opencl-clang](intel#510).

The options are passed down into LLVM which then happily compiles my C++
kernel.

PRs should be merged in the following order: opencl-clang,
intel-graphics-compiler, then finally compute-runtime.

Kind regards,
-Lucas

Co-authored-by: Lucas Zadrozny <[email protected]>
(cherry picked from commit 545a145)
wenju-he pushed a commit to wenju-he/opencl-clang that referenced this pull request May 16, 2024
Hello!

Support for OpenCL C++ was added into LLVM 14, but IGC doesn't support
parsing of those flags just yet. I've opened PRs which adds support for
parsing these flags to the following repositories:
[intel-graphics-compiler](intel/intel-graphics-compiler#328),
[compute-runtime](intel/compute-runtime#731) and
[opencl-clang](intel#510).

The options are passed down into LLVM which then happily compiles my C++
kernel.

PRs should be merged in the following order: opencl-clang,
intel-graphics-compiler, then finally compute-runtime.

Kind regards,
-Lucas

Co-authored-by: Lucas Zadrozny <[email protected]>
(cherry picked from commit 545a145)
haonanya pushed a commit to intel/opencl-clang that referenced this pull request May 17, 2024
Hello!

Support for OpenCL C++ was added into LLVM 14, but IGC doesn't support
parsing of those flags just yet. I've opened PRs which adds support for
parsing these flags to the following repositories:
[intel-graphics-compiler](intel/intel-graphics-compiler#328),
[compute-runtime](intel/compute-runtime#731) and
[opencl-clang](#510).

The options are passed down into LLVM which then happily compiles my C++
kernel.

PRs should be merged in the following order: opencl-clang,
intel-graphics-compiler, then finally compute-runtime.

Kind regards,
-Lucas

Co-authored-by: Lucas Zadrozny <[email protected]>
(cherry picked from commit 545a145)

Co-authored-by: lucasz93 <[email protected]>
haonanya pushed a commit to intel/opencl-clang that referenced this pull request May 17, 2024
Hello!

Support for OpenCL C++ was added into LLVM 14, but IGC doesn't support
parsing of those flags just yet. I've opened PRs which adds support for
parsing these flags to the following repositories:
[intel-graphics-compiler](intel/intel-graphics-compiler#328),
[compute-runtime](intel/compute-runtime#731) and
[opencl-clang](#510).

The options are passed down into LLVM which then happily compiles my C++
kernel.

PRs should be merged in the following order: opencl-clang,
intel-graphics-compiler, then finally compute-runtime.

Kind regards,
-Lucas

Co-authored-by: Lucas Zadrozny <[email protected]>
(cherry picked from commit 545a145)

Co-authored-by: lucasz93 <[email protected]>
haonanya pushed a commit to intel/opencl-clang that referenced this pull request May 17, 2024
Hello!

Support for OpenCL C++ was added into LLVM 14, but IGC doesn't support
parsing of those flags just yet. I've opened PRs which adds support for
parsing these flags to the following repositories:
[intel-graphics-compiler](intel/intel-graphics-compiler#328),
[compute-runtime](intel/compute-runtime#731) and
[opencl-clang](#510).

The options are passed down into LLVM which then happily compiles my C++
kernel.

PRs should be merged in the following order: opencl-clang,
intel-graphics-compiler, then finally compute-runtime.

Kind regards,
-Lucas

Co-authored-by: Lucas Zadrozny <[email protected]>
(cherry picked from commit 545a145)

Co-authored-by: lucasz93 <[email protected]>
haonanya pushed a commit to intel/opencl-clang that referenced this pull request May 17, 2024
Hello!

Support for OpenCL C++ was added into LLVM 14, but IGC doesn't support
parsing of those flags just yet. I've opened PRs which adds support for
parsing these flags to the following repositories:
[intel-graphics-compiler](intel/intel-graphics-compiler#328),
[compute-runtime](intel/compute-runtime#731) and
[opencl-clang](#510).

The options are passed down into LLVM which then happily compiles my C++
kernel.

PRs should be merged in the following order: opencl-clang,
intel-graphics-compiler, then finally compute-runtime.

Kind regards,
-Lucas

Co-authored-by: Lucas Zadrozny <[email protected]>
(cherry picked from commit 545a145)

Co-authored-by: lucasz93 <[email protected]>
haonanya pushed a commit to intel/opencl-clang that referenced this pull request May 17, 2024
Hello!

Support for OpenCL C++ was added into LLVM 14, but IGC doesn't support
parsing of those flags just yet. I've opened PRs which adds support for
parsing these flags to the following repositories:
[intel-graphics-compiler](intel/intel-graphics-compiler#328),
[compute-runtime](intel/compute-runtime#731) and
[opencl-clang](#510).

The options are passed down into LLVM which then happily compiles my C++
kernel.

PRs should be merged in the following order: opencl-clang,
intel-graphics-compiler, then finally compute-runtime.

Kind regards,
-Lucas

Co-authored-by: Lucas Zadrozny <[email protected]>
(cherry picked from commit 545a145)

Co-authored-by: lucasz93 <[email protected]>
Copy link
Contributor

@matborzyszkowski matborzyszkowski left a comment

Choose a reason for hiding this comment

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

Hi @lucasz93
Thanks for your contributing! I left some comments. Please consider it. Thanks!

if ((end - optValue >= 7) && (optValue[5] != ' ')) {
if ((optValue[5] == '.') || isNumeric(optValue[6])) {
retVersion += optValue[6] - '0';
if (opt.find("CLC++") == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Here we should define invalidFormatMessage with appropriate msg for CLC++

Suggested change
if (opt.find("CLC++") == 0) {
if (opt.find("CLC++") == 0) {
const std::string invalidFormatMessage = "Invalid format of -cl-std option, expected -cl-std=CLC++, -cl-std=CLC++1.0, or -cl-std=CLC++2021";

}
else {
const std::string invalidFormatMessage = "Invalid format of -cl-std option, expected -cl-std=CLC++, -cl-std=CLC++1.0, or -cl-std=CLC++2021";
Copy link
Contributor

Choose a reason for hiding this comment

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

and here we need to assign invalidFormatMessage to the exceptString and return 0.

Suggested change
const std::string invalidFormatMessage = "Invalid format of -cl-std option, expected -cl-std=CLC++, -cl-std=CLC++1.0, or -cl-std=CLC++2021";
exceptString = invalidFormatMessage;
return 0;

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.

2 participants