-
Notifications
You must be signed in to change notification settings - Fork 2.2k
alias template error with Intel 2016.0.3 compilers #1121
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
Comments
This issue also affects nvcc (cuda 8). For now I made it work by adding a namespace qualifier to the type-id of the alias statement.
|
Thanks, @klaw9, I confirm that fixes the stated problem. Next problem is below, if anyone's curious.
|
This error is a regression and makes pybind11 master and 2.x unusable with CUDA. Adding the word |
Did you push it to the 2.2 branch as well? |
No, but I'll set the milestone to remind us to include it in the 2.2.2 release. |
(I only have ICC 17 available to me, where both of these compile okay). |
Okay, I'd like to have it in soon, because I've transitioned to 2.2.1 using a normal compiler, but it's now broken under CUDA, so switching the checkout to the 2.2 branch would be a temporary fix. I closed my PR since I assume it's best to cherry-pick the same commit. By the way, just for general information, you can grab NVIDIA's docker containers and build with CUDA there in normal Docker, just (obviously) can't run. (CUDA seems to be happy with the Digits line) |
Thanks for the help. I just rebuilt with pybind11 master. Confirm that the original |
Try playing around with that line to see if you can make ICC 16 happy (as I said, 17 is fine with it). Does changing |
Another possible solution is replace inline constexpr char digit_to_str(size_t digit) { return static_cast<char>('0' + digit); } just before the templated |
Regrettably, And while we like 2016 for some software, I'll accept it if you want to give up on 2016 support. |
@bennybp, who actually understands templating in C++, took a look at this with 2016 So, I suggest pybind11 officially drop 2016 support, codify it, and close this issue. I can't pinpoint the fix point any nearer than >2016.3, <=2017.4, but if you want a PR with blanket Intel 15 --> 17 requirements, I can probably do that. Otherwise, feel free to close. |
Personally I stick to all open source components for my projects as much as possible, which means I'm not at all familiar with the Intel compiler ecosystem: Is a 2017 minimum requirement here reasonable, or do ICC users tend to stick with older releases (e.g. Intel 15)? It might be feasible to reintroduce the older implementation (perhaps stuffing it out into something like |
Upping the requirement is no hardship to my project (get Linux compilers from Intel's open-source developers program) and our users get pre-compiled or use gcc/clang. For academic labs that buy Intel compilers, I expect many do keep them around for a few years until compile failures prompt an upgrade. But the overlap of code dev, modern C++, and old compilers is probably low. I'm not keen to download 4gb packages for the ~5 releases between 2016.3 and 2017.4, so I'm willing to call 2017 the cutoff. |
Update, I know someone who'll try out 2017.0.2 tomorrow, so that'll be a better approximation to an outright 2017 cutoff. |
I can confirm that it works with Intel 2017.0.2. No compile/link issues and test cases pass with our project. |
Can somebody comment on the status of this discussion? My understanding is as follows:
|
Done! See #1363. |
I'm still seeing template using cast_op_type = cast_op_type; on pybind 2.2.4 - did this go into master? |
Yes, this went into release v2.2.3. Since then, there's at least #1649 where |
So why is that upon pip installing pybind (2.2.4) I'm still seeing the lack of detail::cast_op_type? |
special header, perhaps? |
I'm confused. On master it's fixed: https://github.com/pybind/pybind11/blob/master/include/pybind11/cast.h#L881 Clearly shows the detail:: prefix. but none of the releases 2.2.3, 2.2.4 have that line included: https://github.com/pybind/pybind11/blob/v2.2/include/pybind11/cast.h#L838 |
ah, the PR assoc. with this issue was only restricting Intel versions: https://github.com/pybind/pybind11/pull/1363/files . Some other PR (presumably unreleased from master) must have made the change you're looking at. |
Perhaps it wasn't a PR at all: 32ef69a |
This isn't a big deal - since I've already refactored out the cuda specific out to a separate module. It was surprising to see the compiler failing despite it being in master. Any idea why this change wasn't cherry picked into 2.2? |
Issue description
In trying to update some projects from 2.0.0 to 2.2.1, I've found that they consistently won't compile with the
icpc (ICC) 16.0.3 2016041
line of compilers. Fine with GCC 5.2 and Intelicpc (ICC) 17.0.4 20170411
. An error is below:Reproducible example code
The error can be seen with @dean0x7d's sample cmake+pybind11 repo, https://github.com/pybind/cmake_example (admittedly pinned at 2.2.0). When forced to switch compiler families as below, it gives the error above.
I'm sorry to not further narrow the error source. I'm glad to try out any changes since this particular compiler flavor may not be widespread.
The text was updated successfully, but these errors were encountered: