diff --git a/compiler/bindings/python/iree/build/executor.py b/compiler/bindings/python/iree/build/executor.py index 8554e207976a..6e5afe8939ec 100644 --- a/compiler/bindings/python/iree/build/executor.py +++ b/compiler/bindings/python/iree/build/executor.py @@ -519,6 +519,12 @@ def _service_graph(self): completed_deps.add(completed_dep) except TimeoutError: pass + except concurrent.futures.TimeoutError: + # In Python 3.10, future access throws concurrent.futures.TimeoutError. + # In 3.11, that was made a subclass of TimeoutError, which is advertised + # as thrown (and the original is marked as deprecated). + # TODO: Remove this clause once 3.10 support is dropped. + pass # Purge done from in-flight list. self.in_flight_deps.difference_update(completed_deps) diff --git a/compiler/bindings/python/test/build_api/CMakeLists.txt b/compiler/bindings/python/test/build_api/CMakeLists.txt index 9721bb06887b..fceac40c531c 100644 --- a/compiler/bindings/python/test/build_api/CMakeLists.txt +++ b/compiler/bindings/python/test/build_api/CMakeLists.txt @@ -14,10 +14,9 @@ if(IREE_INPUT_TORCH) ) endif() -# FIXME: This test fails on python3.10. -# iree_py_test( -# NAME -# concurrency_test -# SRCS -# "concurrency_test.py" -#) +iree_py_test( + NAME + concurrency_test + SRCS + "concurrency_test.py" +)