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

A few fixes for compiling with nvc++ #14139

Closed
wants to merge 4 commits into from

Conversation

bernhardmgruber
Copy link
Contributor

This Pull request:

Changes or fixes:

Fixes several issues when compiling ROOT with nvc++, but not all of them. The build still fails ultimately, because clang-tblgen crashes. See also #9036.

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

The previous code causes a linker failure due to a duplicated definition of `PointerLikeTypeTraits<decltype(PointerUnion<PTs...>::Val)>::NumLowBitsAvailable`.
@phsft-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@bellenot
Copy link
Member

@phsft-bot build

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default
How to customize builds

@@ -261,8 +261,9 @@ struct PointerLikeTypeTraits<PointerUnion<PTs...>> {

// The number of bits available are the min of the pointer types minus the
// bits needed for the discriminator.
static constexpr int NumLowBitsAvailable = PointerLikeTypeTraits<decltype(
PointerUnion<PTs...>::Val)>::NumLowBitsAvailable;
using nvhpcWorkAround = decltype(PointerUnion<PTs...>::Val);
Copy link
Member

Choose a reason for hiding this comment

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

Is this patch a backport of the llvm upstream?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, LLVM upstream (17.0.6) does not have this change and nvc++ fails equally there. What is the procedure to apply such a workaround to ROOT's LLVM?

(while NVIDIA may be working on a fix to nvc++)

Copy link
Member

Choose a reason for hiding this comment

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

I think it should be enough if we open a PR against LLVM mainline and backport it here. It'd be better to wait until it gets merged upstream but generally there is no need to.

cc: @hahnjo

Copy link
Member

Choose a reason for hiding this comment

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

Either way, I'm not a fan of introducing a workaround to our copy of LLVM for a very specific compiler. I believe upstream has a very clear documentation on which compilers it supports, and NVIDIA's isn't one of them. It's not our job to fix this downstream.

Copy link

Test Results

         7 files           7 suites   1d 7h 17m 2s ⏱️
  2 483 tests   2 482 ✔️ 0 💤 1
16 435 runs  16 434 ✔️ 0 💤 1

For more details on these failures, see this check.

Results for commit e4c3a59.

@bernhardmgruber bernhardmgruber marked this pull request as draft November 29, 2023 19:33
@bernhardmgruber
Copy link
Contributor Author

Alright, this gets more tricky than anticipated. I had to workaround a few more codegen/optimizer bugs in nvc++. I changed the PR to draft for now.

@hahnjo
Copy link
Member

hahnjo commented Jan 17, 2024

I propose to close this: As I expressed above, I believe it's not our job to fix upstream LLVM to compile with nvc++.

@bernhardmgruber
Copy link
Contributor Author

Fine for me, I will open a separate PR with the reasonable changes.

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.

6 participants