Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows support #677

Merged
merged 35 commits into from
Aug 19, 2024
Merged

Windows support #677

merged 35 commits into from
Aug 19, 2024

Conversation

makslevental
Copy link
Collaborator

@makslevental makslevental commented Aug 14, 2024

This PR enables building and running on Windows. In its current form only the lit/ctests are being performed since we still don't have a runner with windows in CI. Will add that in a follow-up.

Note, this PR refactors all the CMake in runtime/src/iree-amd-aie/aie_runtime/CMakeLists.txt not for fun but because having those targets built that deep in the directory structure causes problems on Windows (where path lengths are basically limited to 255 characters1).

This PR also refactors the dependency on XRT. Again not for fun but because it causes problems on Windows. Specifically we no longer build all of XRT which was adding ~10 minutes to total build time and can't be ccached.

How does XRT cause problems?

Documenting here so for posterity: we need various headers from XRT, but XRT's classes expose too much and therefore we actually have to link their libs at compile time (libxrt_coreutil.so) because we're building an executable/static archive ourselves (and therefore all names have to resolved at compile time). The problem is that at runtime you cannot use the libxrt_coreutil.so you built2. So we need to do symbol resolution against libxrt_coreutil at compile time but then not install it. Hence $<BUILD_LOCAL_INTERFACE:xrt_coreutil>3.

EDIT: we now also build boost instead of depending on a system/env install. (why: caused problems on window).

Footnotes

  1. Yes, I'm completely serious;

  2. Because XRT's architecture looks for those libs (and the driver) in special places (like /opt/xilinx/xrt).

  3. See BUILD_LOCAL_INTERFACE.

@makslevental makslevental force-pushed the makslevental/windows-support branch 10 times, most recently from 082bf79 to fa294e4 Compare August 15, 2024 02:35
@makslevental makslevental force-pushed the makslevental/windows-support branch 14 times, most recently from 133512a to e90a645 Compare August 15, 2024 05:05
@makslevental makslevental force-pushed the makslevental/windows-support branch from fa481b5 to 58423ff Compare August 19, 2024 20:42
@makslevental makslevental enabled auto-merge (squash) August 19, 2024 20:49
@makslevental makslevental merged commit 20e778f into main Aug 19, 2024
2 checks passed
@makslevental makslevental deleted the makslevental/windows-support branch August 19, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants