This patch contains the changes required to make the vast majority of integration and runner tests run on Windows.
Historically speaking, the JIT support for Windows has been lacking behind, but recent versions of ORC JIT have now caught up and works for basically all examples in repo.
Sadly due to these tests previously not working on Windows, basically all of them are making unix-like assumptions about things like filenames, paths, shell syntax etc.
This patch fixes all these issues in one big swoop and enables Windows support for the vast majority of integration tests.
More specifically, following changes had to be done:
- The various JIT runners used paths to the runtime libraries that assumed a Unix toolchain layout and filenames. I abstracted the specific path and filename of these runtime libraries away and implemented search logic in lit to find these isntead. This now also allows a much more convenient syntax: --shared-libs=%mlir_c_runner_utils instead of --shared-libs=%mlir_lib_dir/lib/libmlir_c_runner_utils%shlibext
- Some tests using python set environment variables using the ENV=VALUE cmd format. This works on Unix, but on Windows it has to prefixed using env ENV=VALUE cmd
- Some tests used C functions that are simply not available or exported on Windows (fabsf, aligned_alloc). These tests have either been adjusted or explicitly marked as UNSUPPORTED
Some tests remain disabled on Windows as before:
- In SparseTensor some tests have non-trivial logic for finding the runtime libraries which seems to be required for the use of emulators. I do not have the time to port these so I simply kept them disabled
- Some tests requiring special hardware which I simply cannot test remain disabled on Windows. These include usage of AVX512 or AMX
The tests for mlir-vulkan-runner and mlir-spirv-runner all work now as well and so do the vast majority of mlir-cpu-runner.
Could you update this (and other similar REDEFINEs in mlir/test/Integration/Dialect/SparseTensor/CPU/) as well? Thanks!