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 #510

Merged
merged 1 commit into from
May 8, 2024

Conversation

lucasz93
Copy link
Contributor

@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

@@ -231,7 +243,9 @@ std::string EffectiveOptionsFilter::processOptions(const OpenCLArgList &args,

// Specifying the option makes clang emit function body for functions
// marked with inline keyword.
effectiveArgs.push_back("-fgnu89-inline");
if (!isCpp) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@lucasz93 why is option -fgnu89-inline not needed for OpenCL C++?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ran into a compiler error with that flag, which was previously reported as an issue here. Looks like not supporting -fgnu87-inline is expected behaviour according to the reply:

This is intentional. In C++ and C++-based language, we can't reasonably support "-fgnu89-inline"; we always use the C++ inline rules.

So I disabled it in C++ mode for opencl-clang.

Copy link
Contributor

Choose a reason for hiding this comment

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

thank you, LGTM

@wenju-he wenju-he requested a review from haonanya May 7, 2024 07:53
Copy link
Contributor

@wenju-he wenju-he left a comment

Choose a reason for hiding this comment

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

LGTM

@haonanya haonanya merged commit 545a145 into intel:main May 8, 2024
2 checks passed
@lucasz93 lucasz93 deleted the openclc++ branch May 8, 2024 04:43
@pszymich
Copy link
Contributor

pszymich commented May 16, 2024

@wenju-he can we have this change backported to ocl-open-140? Thanks

@wenju-he
Copy link
Contributor

@wenju-he can we have this change backported to ocl-open-140? Thanks

sure, I'll do it and port to 150/160/170/180 branches as well.

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 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]>
@wenju-he
Copy link
Contributor

@wenju-he can we have this change backported to ocl-open-140? Thanks

sure, I'll do it and port to 150/160/170/180 branches as well.

@pszymich this change is merged into ocl-open-140: #511

haonanya pushed a commit 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 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 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 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]>
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