Nvcc fatal : Unsupported NVHPC compiler found. nvc++ is the only NVHPC compiler that is supported

i am trying to run pip install neural-renderer-pytorch on nvidia dgx (hpcsdk_23)

I get this error nvcc fatal : Unsupported NVHPC compiler found. nvc++ is the only NVHPC compiler that is supported.

i also get this warning !! WARNING !!

  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  Your compiler (/dgxb_home/muef2042/softwares/hpcsdk23/Linux_x86_64/23.5/compilers/bin/nvc++) is not compatible with the compiler Pytorch was
  built with for this platform, which is g++ on linux. Please
  use g++ to to compile your extension. Alternatively, you may
  compile PyTorch from source using /dgxb_home/muef2042/softwares/hpcsdk23/Linux_x86_64/23.5/compilers/bin/nvc++, and then you can also use
  /dgxb_home/muef2042/softwares/hpcsdk23/Linux_x86_64/23.5/compilers/bin/nvc++ to compile your extension.

  See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
  with compiling PyTorch from source.
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

By support, nvcc means that it was tested using particular versions of nvc++. Hence if you’re using an older nvcc with a newer nvc++, this support would not have been added.

You can work around this by adding the flag “–allow-unsupported-compiler” to disable this check.

i also get this warning !! WARNING !!

I’m not familiar with building this package so may be of limited help. Though it appears the package has only been tested with g++ and hence the warning. It may be ok to use nvc++, but you’d need to ask the developers.

Are you able to use g++? If you’re getting this via a nvcc compilation, then nvcc uses g++ by default for the host compiler so I assume you added “-ccbin=nvc++”? If so, do the warnings go away if you remove this flag?