Windows PyTorch extension compilation issues

Hi, I am trying to compile a torch extension on Windows GitHub - openmm/NNPOps: High-performance operations for neural network potentials
but I am getting errors: error C2872: 'std': ambiguous symbol

    getNeighborPairsCUDA.cu
    tmpxft_00000a04_00000000-7_getNeighborPairsCUDA.compute_90.cudafe1.cpp
    C:/Users/runneradmin/AppData/Local/Temp/pip-build-env-4ak9qebn/overlay/Lib/site-packages/torch/include\torch/csrc/dynamo/compiled_autograd.h(1347): error C2872: 'std': ambiguous symbol
    C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/include\valarray(21): note: could be 'std'
    C:/Users/runneradmin/AppData/Local/Temp/pip-build-env-4ak9qebn/overlay/Lib/site-packages/torch/include\torch/csrc/dynamo/compiled_autograd.h(1347): note: or       'std'

and NNPOps/src/pytorch/pme/pmeCUDA.cu at master · openmm/NNPOps · GitHub

     pmeCUDA.cu
    tmpxft_00000db0_00000000-7_pmeCUDA.compute_90.cudafe1.cpp
    C:/Users/runneradmin/AppData/Local/Temp/pip-build-env-m_wzmh56/overlay/Lib/site-packages/torch/include\torch/csrc/dynamo/compiled_autograd.h(1347): error C2872: 'std': ambiguous symbol
    C:/Users/runneradmin/AppData/Local/Temp/pip-build-env-m_wzmh56/overlay/Lib/site-packages/torch/include\c10/cuda/CUDAStream.h(261): note: could be 'std'
    C:/Users/runneradmin/AppData/Local/Temp/pip-build-env-m_wzmh56/overlay/Lib/site-packages/torch/include\torch/csrc/dynamo/compiled_autograd.h(1347): note: or       'std'

It seems to me like the std definition of c10 here pytorch/c10/cuda/CUDAStream.h at main · pytorch/pytorch · GitHub is causing collisions with:

  1. the std definition in the Microsoft headers and
  2. the std definition in the torch dynamo headers

This doesn’t seem to cause any issues on Linux surprisingly. Is there any way to fix these issues with the Windows builds?