amd / openmm-hip

15 stars 7 forks source link

HIP for Windows OS #6

Open muziqaz opened 1 year ago

muziqaz commented 1 year ago

Hi,

any chance for similar thing on Windows?

Thanks Regards

philipturner commented 3 months ago

I tried to compile the OpenMM HIP plugin on Windows:

1) Set up the repo with CMake-GUI 2) make doesn't exist on Windows, so instead compiled through Visual Studio GUI 3) Copied the entire include directory from OpenMM into the OpenMM-HIP source tree, bypassing a header search path error 4) Removed the #error Windows not supported 5) Linked hipRTC at runtime to bypass a linker error: https://gist.github.com/philipturner/87c3584f91995081da88a430e651a1d7#file-hipcompilerkernels-cpp-L124-L473 6) Got the entire Visual Studio project to compile without errors, and produce a .dll 7) Executed the test files, which all exited with error code 0x000000135 8) Loaded the HIP plugin from mm.Platform.loadPluginsFromDirectory, but it always produced the exception:

openmm.OpenMMException: Error loading library C:/Users/phili/miniforge3/Library/lib/plugins/OpenMMHIP.dll: 126

I have an AMD 7900 XTX and am using it for simulations. HIP should be faster than OpenCL. I'm unable to use Linux because the computer kept breaking down with Ubuntu, so I gave up and went with Windows 10.

@ex-rzr any suggestions? Should I try messing with WSL? Or just fork and compile the OpenMM OpenCL backend, with cl_khr_subgroups in the kernel for finding interacting blocks.

ex-rzr commented 3 months ago

@bdenhollander added Windows support in this branch: https://github.com/bdenhollander/openmm-hip/commits/windows-compatibility/

There are instructions with all required workarounds: https://github.com/bdenhollander/openmm-hip/blob/windows-compatibility/README-Windows.md