Just to follow up. The tests for the ExecutionEngine as far as I can see do not run on Windows. Getting tests for the ExecutionEngine working on Windows seems like a larger undertaking, than I can currently do, and would require checking a lot of code I am not familiar with. My limited experiment seems to imply the changes I have made would help with making the MLIR execution engine work on Windows.
Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Feb 3 2021
Feb 2 2021
Jan 29 2021
So after a little fiddling, I manually ran a test:
> bin\mlir-opt.exe ..\mlir\integration_test\Dialect\Async\CPU\test-async-parallel-for-1d.mlir -async-parallel-for -async-ref-counting -convert-async-to-llvm -convert-scf-to-std -convert-std-to-llvm | bin\mlir-cpu-runner.exe -e entry -entry-point-result=void -O0 -shared-libs=bin\mlir_async_runtime.dll -shared-libs=bin\mlir_runner_utils.dll | bin\FileCheck --dump-input=always ..\mlir\integration_test\Dialect\Async\CPU\test-async-parallel-for-1d.mlir
Jan 27 2021
So -DBUILD_SHARED_LIBS=ON is not supported on Windows. I had the same failures with and without this patch for MLIR integration tests. So I have done as much as I can to know this is not going to regress anything.
@rengolin, I manually checked the DLL symbols contained __mlir_runner_init and __mlir_runner_destroy and nothing else. But I didn't know a command line that I could use to test if this what the context for loading this was expecting.
Updated to export the symbols as suggested by @ezhulenev.
Jan 26 2021
@ezhulenev I think I can see what the fix should be. Does the check-mlir cover this example? Or is there additional testing I should do?
I am not sure what the correct approach to this should be given the new code for the JIT. Do you need to dllexport the __mlir_runner_init code, so that it appears in the DLL? Do you actually want the other symbols in the dll, or just use the export_symbol in the __mlir_runner_init?
Jan 25 2021
Closing as code has changed.
The following minimised example shows the Visual Studio behaviour
C++ namespace foo { extern "C" __declspec(dllexport) int f(); extern "C" __declspec(dllexport) int g(); }
Jul 16 2020
This is more work that I anticipated. I will revisit if I get more time.
I have realised there are lots of instances of this. Changing all ~50 is mechanical, but a larger change than I was expecting.
May 5 2020
Updated error message inline with feedback.