[Bug c++/100102] [9/10/11/12 Regression] ICE in tsubst, at cp/pt.c:15310

2021-06-04 Thread ed.gcc at pobox dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100102

--- Comment #21 from Eduard Rozenberg  ---
@ppalka Huge thanks for this fix - it's working well for me. Very happy to see
the patch applied with no problems to gcc 10.3.0, because it could take several
years until the OS and Nvidia support gcc 11 or 12. Otherwise I would have had
to move back to gcc 10.2.0 and build custom kernels for quite some time.

Tested as follows:
* Rebuilt Slackware gcc 10.3.0 packages with the patch for `pt.c`
* Built Nvidia nccl-tests - build succeeded (was failing before the patch)
* Built latest pytorch git with Nvidia support - build succeeded (was failing
before the patch)

[Bug c++/100277] ICE on cuda host code

2021-04-27 Thread ed.gcc at pobox dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100277

Eduard Rozenberg  changed:

   What|Removed |Added

 CC||ed.gcc at pobox dot com

--- Comment #2 from Eduard Rozenberg  ---
Similar issues (related to Nvidia nvcc, nccl) reported here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100102
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100240

My issue started after moving from gcc 10.2.0 to 10.3.0.

10.2.0 worked fine
10.3.0 ICEs with that same `intmax_t __n` segfault

I can't figure out what the problem is, and hoping there will be a patch for
10.3.x because I have to use the gcc my OS provides (10.3.0 currently). Also
there's very litle chance that Nvidia will support gcc 11 or 12 anytime soon
(took them years to support gcc9 and eventually 10).

[Bug tree-optimization/100102] [8/9/10/11/12 Regression] ICE in tsubst, at cp/pt.c:15310

2021-04-27 Thread ed.gcc at pobox dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100102

Eduard Rozenberg  changed:

   What|Removed |Added

 CC||ed.gcc at pobox dot com

--- Comment #7 from Eduard Rozenberg  ---
The same/similar issue also reported in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100240

In my case no problems with GCC 10.2.0, problems started with GCC 10.3.0.

[Bug c++/100240] Compiler crashes with segmentation fault on a chrono library using nvcc

2021-04-27 Thread ed.gcc at pobox dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100240

Eduard Rozenberg  changed:

   What|Removed |Added

 CC||ed.gcc at pobox dot com

--- Comment #9 from Eduard Rozenberg  ---
I run into similar errors (probably the same issue), when trying to use Nvidia
NCCL.

For ex. when trying to run `make` on the nccl tests
(https://github.com/NVIDIA/nccl-tests.git), I get:

nccl-tests/src'
Compiling  all_reduce.cu   > ../build/all_reduce.o
/usr/include/c++/10.3.0/chrono: In substitution of ‘template template using __is_harmonic =
std::__bool_constant<(std::ratio<((_Period2::num / std::chrono::duration<_Rep,
_Period>::_S_gcd(_Period2::num, _Period::num)) * (_Period::den /
std::chrono::duration<_Rep, _Period>::_S_gcd(_Period2::den, _Period::den))),
((_Period2::den / std::chrono::duration<_Rep, _Period>::_S_gcd(_Period2::den,
_Period::den)) * (_Period::num / std::chrono::duration<_Rep,
_Period>::_S_gcd(_Period2::num, _Period::num)))>::den == 1)> [with _Period2 =
_Period2; _Rep = _Rep; _Period = _Period]’:
/usr/include/c++/10.3.0/chrono:473:154:   required from here
/usr/include/c++/10.3.0/chrono:428:27: internal compiler error: Segmentation
fault
  428 |  _S_gcd(intmax_t __m, intmax_t __n) noexcept
  |   ^~
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[1]: *** [Makefile:84: ../build/all_reduce.o] Error 1


And I get build errors when trying to build pytorch since it also tries to use
Nvidia nccl.

The following might be relevant/related but can't tell for sure:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100101
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100102

Even if the issue eventually gets fixed in GCC 11/12, what will the solution be
for GCC 10.3 (10.x) users? Asking because it normally takes operating systems
and Nvidia months or years to move to or support the next major GCC version,
and in particular it's recommended to use the same GCC version as the operating
system's kernel is built with, so I wouldn't be able to decide to just use GCC
11 or 12.