Skip to content

Commit

Permalink
Remove PyYAML dependency from Python bindings. (iree-org#18262)
Browse files Browse the repository at this point in the history
Keeping the list of dependencies small will make it easier to depend on
us. Installing `iree-compiler` and `iree-runtime` brings these packages
along:
```
Installing collected packages: mpmath, sympy, PyYAML, numpy, iree-runtime, iree-compiler
Successfully installed PyYAML-6.0.2 iree-compiler-20240816.987 iree-runtime-20240816.987 mpmath-1.3.0 numpy-2.0.1 sympy-1.13.2
```

Unless LLVM/MLIR somehow needs PyYAML (e.g. for linalg opdsl generators
/ tests), I think we can drop it now. `git log -S pyyaml` points to only
these commits:
iree-org@dd787a7,
iree-org@3149b6d.

* PyYAML is still used by
[`build_tools/github_actions/configure_ci.py`](https://github.com/iree-org/iree/blob/main/build_tools/github_actions/configure_ci.py)
and
[`build_tools/github_actions/configure_ci_test.py`](https://github.com/iree-org/iree/blob/main/build_tools/github_actions/configure_ci_test.py).
I just turned off that test in CI. We could install PyYAML (via a
`test_dependencies.txt`) to keep running it, but I think we should focus
on just what the core project truly needs.
* `build_tools/testing/gen_test_matrix.py` hasn't been used in a while
and that sort of test generator should now live in an external
repository like https://github.com/iree-org/iree-test-suites
  • Loading branch information
ScottTodd authored Aug 21, 2024
1 parent 192c342 commit 7c8fedc
Show file tree
Hide file tree
Showing 12 changed files with 1 addition and 540 deletions.
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1000,12 +1000,6 @@ endif()
set(IREE_PUBLIC_INCLUDE_DIRS "${IREE_COMMON_INCLUDE_DIRS}"
CACHE INTERNAL "IREE: Include Directories" FORCE)

#-------------------------------------------------------------------------------
# IREE build tools
#-------------------------------------------------------------------------------

add_subdirectory(build_tools/github_actions)

#-------------------------------------------------------------------------------
# Optional features
#-------------------------------------------------------------------------------
Expand Down
35 changes: 0 additions & 35 deletions build_tools/cmake/iree_python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -178,38 +178,3 @@ function(iree_py_test)
${_RULE_TIMEOUT}
)
endfunction()

# iree_build_tools_py_test()
#
# CMake function to test with build_tools python modules.
#
# Parameters:
# NAME: name of test
# SRC: Test source file
# ARGS: Command line arguments to the Python source file.
# LABELS: Additional labels to apply to the test. The package path is added
# automatically.
# PACKAGE_DIRS: Additional python module paths.
function(iree_build_tools_py_test)
cmake_parse_arguments(
_RULE
""
"NAME;SRC"
"ARGS;LABELS;PACKAGE_DIRS"
${ARGN}
)

iree_local_py_test(
NAME
"${_RULE_NAME}"
SRC
"${_RULE_SRC}"
ARGS
${_RULE_ARGS}
LABELS
${_RULE_LABELS}
PACKAGE_DIRS
${_RULE_PACKAGE_DIRS}
"${IREE_ROOT_DIR}/build_tools/python"
)
endfunction()
12 changes: 0 additions & 12 deletions build_tools/github_actions/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion build_tools/github_actions/ci_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
# Ensure a recent cmake
cmake>=3.18.4
ninja
PyYAML>=5.4.1
2 changes: 1 addition & 1 deletion build_tools/python_deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Python 3.10.4
# Option A: Build like a normal dev setup (i.e. if allergic to Python
# packaging and to triage issues that do not implicate that).
[root@c8f6d0041d79 ]# cd /work/iree
[root@c8f6d0041d79 iree]# pip install wheel cmake ninja pybind11 PyYAML numpy
[root@c8f6d0041d79 iree]# pip install wheel cmake ninja pybind11 numpy
[root@c8f6d0041d79 iree]# cmake -GNinja -B ../iree-build/ -S . -DCMAKE_BUILD_TYPE=Release -DIREE_BUILD_PYTHON_BINDINGS=ON
[root@c8f6d0041d79 iree]# cd ../iree-build/
[root@c8f6d0041d79 iree-build]# ninja
Expand Down
Loading

0 comments on commit 7c8fedc

Please sign in to comment.