cyx-6 opened a new pull request, #687:
URL: https://github.com/apache/tvm-ffi/pull/687

   The Windows branch of the torch C-DLPack addon build links a hard-coded list 
of import libraries (`c10.lib`, `torch.lib`, `torch_cpu.lib`, 
`torch_python.lib`). That breaks whenever upstream reorganizes what torch ships.
   
   With torch 2.13.0 the Windows wheel job fails while Linux and macOS pass on 
the same commit with the same torch version:
   
   ```
   FAILED 
tests/python/test_optional_torch_c_dlpack.py::test_build_torch_c_dlpack_extension
   FAILED tests/python/test_optional_torch_c_dlpack.py::test_parallel_build
   ```
   
   This started with torch 2.13.0 (released 2026-07-08); the same commit passed 
earlier with torch 2.12.1, and `main` has been red on Windows since.
   
   ### Changes
   
   - Resolve the Windows import libraries against the files actually present in 
`torch.utils.cpp_extension.library_paths()` rather than hard-coding them. Core 
libraries remain required and raise a clear error listing what was found when 
one is missing; optional ones are linked only when available.
   - The build script already reports compiler and linker errors through its 
own stderr, but the tests discarded the child output and asserted on the exit 
code alone, so failures surfaced as a bare `exit status 1`. Capture that output 
and attach it to the assertion.
   
   ### Testing
   
   `tests/python/test_optional_torch_c_dlpack.py` passes locally on Linux with 
torch 2.13.0. The Windows linker error was never visible in CI logs, so the 
diagnostic change is included here as well: if the library resolution does not 
fully address the failure, the job will now print the underlying error.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to