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
Adding Intel oneAPI support #9522
Adding Intel oneAPI support #9522
Conversation
fbcf384
to
75c32dd
Compare
what about compatibility with GCC/VS (compiler.base)? it was an important feature before to allow mix of existing GCC binaries with Intel. |
conans/client/migrations_settings.py
Outdated
@@ -2413,6 +2414,12 @@ | |||
<<: *visual_studio | |||
apple-clang: | |||
<<: *apple_clang | |||
intel-cc: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in general, I'd love to see an explanation/motivation on these scheme and naming
e.g., why classic
flavor is not just a new version of the existing intel
compiler?
why sub-setting fits better than several new compilers?
also, what about intel-clang
as new compilers seems to be clang based? do they share many things in common?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go step by step and discuss the different points:
- The naming, for sure, we can think of another one that can fit better. This name is easy to read/write so, why not?
- Why different
modes
rather than different compilers? According to this Intel reference:
The following are the guiding principles for ICX:
* ICX and ICC Classic use different compiler drivers. The ICC Classic drivers are icc, icpc, and icl. The ICX drivers are icx and icpx. Use icx to compile and link C programs, and icpx for C++ programs.
Unlike the icc driver, icx does not use the file extension to determine whether to compile as C or C+. Users must invoke icpx to compile C+ files. In addition to providing a core C++ Compiler, ICX is the base compiler for the Intel® oneAPI Data Parallel C++ Compiler and its new driver, dpcpp.
* For Data Parallel C++ applications: The underlying compiler is ICX and the driver is dpcpp.
* For Standard C++ applications: Intel recommends using the ICC Classic production compiler and the icc/icpc/icl driver.
All the compilers are more or less related between them and they are different for sure, but we can keep it simpler by changing only the mode instead of declaring 3 different ones with the same flags, installation paths, etc.
- They are indeed LLVM-based and, they admit the Clang flags but, in my opinion, all the code related to compilers based on another one is a bit convoluted so I think it's better to avoid it.
I hope it's clearer now. By the way, @SSE4 @memsharded please, share your thoughts here and let me know what you think about this new approach, it would be great 😁
75c32dd
to
f209cda
Compare
1333325
to
37f5470
Compare
"17": v17, "gnu17": vgnu17, | ||
"20": v20, "gnu20": vgnu20, | ||
"23": v23, "gnu23": vgnu23}.get(cppstd, None) | ||
return "-std=%s" % flag if flag else None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now and as far as I know, there are no limitations to use any of these flags for the new Intel oneAPI C++/DPC++/Classis compilers
I think there are some points still missing:
|
Yes, this is another step that I have to add for sure.
Do we need it? I mean, we're creating this new one to simplify the complexity added by the |
More clarifications about this PR. I'm adding this |
b9f3abd
to
0d99051
Compare
@SSE4 @memsharded
By the way, would it be possible to define a mechanism to write a default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking very good.
I think I would add at least 1 full functional test, with the pytest.mark.tool_icc
or equivalent, so it doesn't run in CI yet, but at least we have a full test that compiles something with icc.
0c3c39c
to
36bf840
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great, almost there!
Co-authored-by: Luis Martinez de Bartolome Izquierdo <lasote@gmail.com>
Changelog: Feature: New "compiler"
intel-cc
with different modes (icx, dpcpp, classic) for Intel oneAPI.Changelog: Feature: Add Intel oneAPI support for
CMakeToolChain
,MSBuildToolchain
andVCVars
.Docs: conan-io/docs#2233
Closes: #9304 #9026
intel-cc
with different modes (icx, dpcpp, classic):* icx == Intel oneAPI C++ Compiler (icx/icpx)
* dpcpp == Intel oneAPI DPC++ Compiler (dpcpp)
* classic == Intel C++ Compiler Classic (icc/icpc for Linux/macOS and icl for Windows)
conan.tools
flow:* Using:
CMakeToolChain
,MSBuildToolchain
orVCVars
develop
branch, documenting this one.Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.