You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Summary
Build and run C++ tests in the unit test CI job on Windows. Fix a few
lingering issues on Windows that surfaced.
Changes:
* Add CMake build + CTest execution the Windows unit test job.
* Gate Core ML export recipe tests (and coremltools imports) to
non-Windows platforms.
* Add some explicit cases for size_t 0 literals to make MSVC overload
resolution happy.
* Remove 2> /dev/null from some CMake PTE export custom commands. I'm
not entirely sure why this is there in the first place (keep the log a
little cleaner?), but it doesn't work on Windows. Easiest to just remove
it.
* Update the temp file utility code (in
extension/testing_util/temp_file.h) to use standard library file IO (as
opposed to posix).
* **(Critical)**: Replace long with int64_t in a few portable kernels
that deal with indices. It should be int64_t, as this is the correct
type for long tensors. On Windows, for example, long is actually 32-bit
for historical reasons, and it causes memory corruption / crashes when
trying to read/write ScalarType::Long tensors with long* pointers.
* Update a bunch of custom commands to use platform-specific syntax or
replace with a cross-platform approach.
* Use non-strict export for test models. We can support strict export on
Windows, but it take a bit of env setup. This is covered in CI in
places, but non-strict is the default so it makes it a bit easier to
build tests this way.
I've also excluded method_test and tensor_parser_test for now, due to
the env issues with some of the PTE test models. The tests pass locally
- but I need to debug the build-time PTE creation for these tests. I'm
disabling to get the remaining 98% of the tests up first, and will fix
these shortly. Tracking in
#13883.
### Test plan
CI - the tests are covered by the unittest jobs (debug, release, and
editable).
0 commit comments