NVCC crash (core dump) with c++17

I have a wired issue in that if include <torch/torch.h> in a .cu file and compile it with NVCC and --std=C++17, NVCC will crash. No problem with C++14. This is using nvcc 11.2 and libtorch 1.9.

Is this a known issue? If so, what is the solution beyond dropping to C++14?