Skip to content

Conversation

@mingxwa
Copy link
Member

@mingxwa mingxwa commented Oct 20, 2024

This PR resolves #180

Changes

  • NVHPC won't generate the optimal memory layout for proxy when no dispatch is specified, causing static assertions to fail. Although this is a QoI issue for the compiler, we have worked around this by specifying a different base type for proxy in this case.
  • NVHPC treats inline const variable as constexpr, causing static_assert(!pro::facade<BadFacade_BadConstraints_NotConstant>) to fail. This should be a bug in NVHPC. I simply worked around the issue in this change by splitting the definition of the variable from its declaration.
  • NVHPC creates an additional copy for the value when using static_cast, causing ProxyLifetimeTests.Test_DirectConvension_Lvalue and ProxyLifetimeTests.Test_DirectConvension_Rvalue to fail. This is a bug in the existing unit test implementation since copy elision is not guaranteed for static_cast.
  • Modified tests/CMakeLists.txt to exclude freestanding test cases from unsupported compilers like NVHPC.
  • Suppressed some "unused variable" warnings from NVHPC that are intended in the unit tests.

Notes

  • Manually tested with NVHPC 24.9. Ultimately, we should create a separate pipeline for NVHPC in the future.

@mingxwa mingxwa requested review from guominrui and tian-lt October 20, 2024 11:31
@mingxwa mingxwa mentioned this pull request Oct 20, 2024
@mingxwa mingxwa merged commit 2d8bcb8 into microsoft:main Oct 22, 2024
@mingxwa mingxwa deleted the user/mingxwa/nvc++ branch October 22, 2024 05:34
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.

NVHPC Compiler support

2 participants