Add Native Windows Support - #8542
nithin-aashik-mcw wants to merge 12 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 244dd3e463
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| def is_compatible(self, verbose=False): | ||
| if sys.platform == "win32": | ||
| # No libaio on Windows; the op is built on native Win32 file I/O instead. | ||
| return super().is_compatible(verbose) |
There was a problem hiding this comment.
Port the CUDA async I/O builder to Windows
This Windows compatibility branch only exists on the CPU accelerator's builder. On a Windows installation with CUDA-enabled PyTorch, CudaAccelerator resolves AsyncIOBuilder from the separate op_builder/async_io.py, which still probes for io_submit and links -laio; consequently AsyncIOBuilder().is_compatible() is false (or its JIT build fails) in CUDA environments, where NVMe offload is most commonly used. Apply the Windows compatibility, compiler, and linker handling to that top-level builder as well.
Useful? React with 👍 / 👎.
| const auto error_code = GetLastError(); | ||
| report_file_error( | ||
| "<aio>", req->_read_op ? "ReadFile" : "WriteFile", static_cast<int>(error_code)); | ||
| assert(ok && bytes_transferred > 0); | ||
| return; |
There was a problem hiding this comment.
Propagate failed Win32 I/O requests
When a post-open ReadFile or WriteFile fails (for example, a full disk, a network filesystem error, or a concurrently truncated file), this path only logs and returns. In release builds where assert is disabled, the submit caller has no failure state and the Windows completion path reports every request as completed, so wait()/pwrite() can report success while the checkpoint or offload data is partial. Preserve and surface the request failure instead of manufacturing a completion.
Useful? React with 👍 / 👎.
Summary
Adds native Windows support to DeepSpeed: the CPU-side extension ops (
pin_memory,async_io/AIO, and the shared-memorycommbackend) now build and run under MSVC, the op_builder/build system andbuild_win.batsupport compiling these ops on Windows, and the unit test harness is runnable on Windows. Also fixes a handful of Windows-specific runtime bugs (paths, timers, MSVC OpenMP loop signedness, header include order) and a few unrelated test flakiness issues found along the way, and adds Windows CI and release wheel-build workflows.Closes #7276
Closes #7057
Relates to #7744, #7523, #7341
Test plan
windows-torch-latest.yml) passestests/unit)