Fix C++17 version detection in helper_macros.hpp
It seems that __cplusplus can be inconsistent with _MSVC_LANG when discerning C++17 version in some cases (for header-only includes of CUTLASS). See https://github.com/NVIDIA/cutlass/issues/1474. Added switch to check _MSVC_LANG in addition to __cplusplus.
@mhoemmen, can you take a look?
Please set the flag /Zc:__cplusplus as shown in https://github.com/NVIDIA/cutlass/blob/7d49e6c7e2f8896c47f586706e67e1fb215529dc/CMakeLists.txt#L439-453 to get MSVC to set the compile options appropriately.
I was able to include CUTLASS headers successfully with @d-k-b suggestion. I closed my issue #1474 related to this.
Is there still some value to this PR for those who want to include CUTLASS headers-only?
Maybe this is better solved upstream (in something like PyTorch's torch/utils/cpp_extensions.py per my solution in #1474, or just leaving it to the user to configure builds more carefully?)
@jackkosaian Hi! Thanks for the heads-up! I can take a look.
Thanks for your review @mhoemmen. I committed your suggestion for the CUTLASS_CPLUSPLUS macro, I think that seems more elegant and is in line with the style of other CUTLASS macros.
@nickjeliopoulos Excellent, thanks so much!
This PR has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this PR if it is no longer required. Otherwise, please respond with a comment indicating any updates. This PR will be labeled inactive-90d if there is no activity in the next 60 days.
Let me check on the status of this with @hwu36 .
@hwu36 I think we can merge this.