yongwww opened a new pull request, #677: URL: https://github.com/apache/tvm-ffi/pull/677
Fixes https://github.com/apache/tvm-ffi/issues/641 ### root cause The test JIT-compiles a C++ snippet with torch's `cpp_extension.load_inline`, which by default builds into the shared `~/.cache/torch_extensions` cache, serialized by torch's `FileBaton`: - `try_acquire()` creates an ordinary lock **file** (`os.open` `O_CREAT|O_EXCL`). - `wait()` spins on `os.path.exists(lock)` with **no timeout** and no staleness check. - `release()` (which deletes the file) only runs on the normal path. If a build is killed mid-compile — e.g. a CI time limit sends SIGTERM — the lock file is left behind. On CI where that cache sits on a persistent shared filesystem, every subsequent run then waits on the orphaned lock **forever**. ### Fix Pass `build_directory=tmp_path` to `load_inline` so each run builds in a fresh, unique directory. The baton lock is always fresh, so a killed prior run can no longer poison later runs, and the test no longer uses (or can be poisoned by) any shared cache — independent of the filesystem. -- 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]
