Add new "Getting Started with Python" doc.
Plenty of room for improvement (complete and document CMake support, publish pip package(s), share Colab notebooks that don't require building from source, etc.), but this lets us cut away from the old documentation.
Also in this PR:
* Removed old docs, now that all of their content is covered in the new docs
* Tweaked some website styling
* Fixed an encoding issue on Windows in `update_op_coverage.py`
Fixes https://github.com/google/iree/issues/1363.
Closes https://github.com/google/iree/pull/1571
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/iree/pull/1571 from ScottTodd:docs-python 8426a52a657518d500f27aaa57810c901283e7f5
PiperOrigin-RevId: 307643936
diff --git a/build_tools/cmake/build_docs.sh b/build_tools/cmake/build_docs.sh
index 77195b5..f9d08a7 100755
--- a/build_tools/cmake/build_docs.sh
+++ b/build_tools/cmake/build_docs.sh
@@ -70,3 +70,4 @@
cp docs/GetStarted/getting_started_linux_bazel.md ${BUILD_DIR}/doc/GetStarted/
cp docs/GetStarted/getting_started_linux_cmake.md ${BUILD_DIR}/doc/GetStarted/
cp docs/GetStarted/getting_started_linux_vulkan.md ${BUILD_DIR}/doc/GetStarted/
+cp docs/GetStarted/getting_started_python.md ${BUILD_DIR}/doc/GetStarted/
diff --git a/docs/GetStarted/getting_started_linux_bazel.md b/docs/GetStarted/getting_started_linux_bazel.md
index fdc888e..2e42b3a 100644
--- a/docs/GetStarted/getting_started_linux_bazel.md
+++ b/docs/GetStarted/getting_started_linux_bazel.md
@@ -117,8 +117,5 @@
[Developer Overview](../developer_overview.md)
* To target GPUs using Vulkan, see
[Getting Started on Linux with Vulkan](getting_started_linux_vulkan.md)
-
-More documentation coming soon...
-
-<!-- TODO(scotttodd): Running samples -->
-<!-- TODO(scotttodd): Python -->
+* To use IREE's Python bindings, see
+ [Getting Started with Python](getting_started_python.md)
diff --git a/docs/GetStarted/getting_started_linux_cmake.md b/docs/GetStarted/getting_started_linux_cmake.md
index 2ecef79..a6844ab 100644
--- a/docs/GetStarted/getting_started_linux_cmake.md
+++ b/docs/GetStarted/getting_started_linux_cmake.md
@@ -110,9 +110,5 @@
[Developer Overview](../developer_overview.md)
* To target GPUs using Vulkan, see
[Getting Started on Linux with Vulkan](getting_started_linux_vulkan.md)
-
-More documentation coming soon...
-
-<!-- TODO(scotttodd): Running tests -->
-<!-- TODO(scotttodd): Running samples -->
-<!-- TODO(scotttodd): Python -->
+* To use IREE's Python bindings, see
+ [Getting Started with Python](getting_started_python.md)
diff --git a/docs/GetStarted/getting_started_python.md b/docs/GetStarted/getting_started_python.md
new file mode 100644
index 0000000..332e899
--- /dev/null
+++ b/docs/GetStarted/getting_started_python.md
@@ -0,0 +1,62 @@
+# Getting Started with Python
+
+IREE has Python bindings geared towards lower level compiler interop that are
+not intended to be a public API, and integration with Python frontends such as
+TensorFlow.
+
+We do not yet provide a pip package for easy installation, so to use IREE's
+Python bindings you must build from source.
+
+## Prerequisites
+
+You should already have IREE cloned and building on your machine. See the other
+[getting started guides](.) for instructions.
+
+> Note:<br>
+> Support is best with Bazel.
+> For CMake (excluding TensorFlow), set the `IREE_BUILD_PYTHON_BINDINGS` option.
+
+## Python Setup
+
+Install a recent version of [Python 3](https://www.python.org/downloads/) and
+[pip](https://pip.pypa.io/en/stable/installing/), if needed.
+
+Install packages:
+
+```shell
+$ python3 -m pip install --upgrade pip
+$ python3 -m pip install numpy
+
+# If using the TensorFlow integration
+$ python3 -m pip install tf-nightly
+```
+
+## Running Python Tests
+
+To run tests for core Python bindings:
+
+```shell
+$ bazel test bindings/python/...
+```
+
+To run tests for the TensorFlow integration, which include end-to-end backend
+comparison tests:
+
+```shell
+# Exclude tests that are skipped in the GitHub Actions ("ga") CI
+$ bazel test \
+ --build_tag_filters="noga" \
+ --test_tag_filters="noga" \
+ --define=iree_tensorflow=true \
+ integrations/tensorflow/...
+```
+
+## Using Colab
+
+See
+[start_colab_kernel.py](https://github.com/google/iree/blob/master/colab/start_colab_kernel.py)
+and
+[Using Colab](https://github.com/google/iree/blob/master/docs/using_colab.md)
+for setup instructions, then take a look through the
+[Colab directory](https://github.com/google/iree/tree/master/colab) for some
+sample notebooks.
diff --git a/docs/GetStarted/getting_started_windows_bazel.md b/docs/GetStarted/getting_started_windows_bazel.md
index 8c80888..aab8556 100644
--- a/docs/GetStarted/getting_started_windows_bazel.md
+++ b/docs/GetStarted/getting_started_windows_bazel.md
@@ -116,6 +116,5 @@
[Developer Overview](../developer_overview.md)
* To target GPUs using Vulkan, see
[Getting Started on Windows with Vulkan](getting_started_windows_vulkan.md)
-
-<!-- TODO(scotttodd): Running samples -->
-<!-- TODO(scotttodd): Python -->
+* To use IREE's Python bindings, see
+ [Getting Started with Python](getting_started_python.md)
diff --git a/docs/GetStarted/getting_started_windows_cmake.md b/docs/GetStarted/getting_started_windows_cmake.md
index ab73d54..2e0a689 100644
--- a/docs/GetStarted/getting_started_windows_cmake.md
+++ b/docs/GetStarted/getting_started_windows_cmake.md
@@ -108,9 +108,5 @@
[Developer Overview](../developer_overview.md)
* To target GPUs using Vulkan, see
[Getting Started on Windows with Vulkan](getting_started_windows_vulkan.md)
-
-More documentation coming soon...
-
-<!-- TODO(scotttodd): Running tests -->
-<!-- TODO(scotttodd): Running samples -->
-<!-- TODO(scotttodd): Python -->
+* To use IREE's Python bindings, see
+ [Getting Started with Python](getting_started_python.md)
diff --git a/docs/getting_started_on_linux.md b/docs/getting_started_on_linux.md
deleted file mode 100644
index ee5c9c9..0000000
--- a/docs/getting_started_on_linux.md
+++ /dev/null
@@ -1,190 +0,0 @@
-# Getting Started on Linux
-
-**This guide is due for an update. For Linux CMake instructions, see
-[Getting Started on Linux with CMake](GetStarted/getting_started_linux_cmake.md).
-For Linux Bazel instructions, see
-[Getting Started on Linux with Bazel](GetStarted/getting_started_linux_bazel.md).**
-
-There are many Linux variants. This document provides project-specific
-requirements for setting up your environment and should be relatively
-translatable. It was written for a relatively recent, Debian-derived
-distribution. If you have issues on other systems, we accept issues or additions
-to the documentation.
-
-## Pre-requisites
-
-### Install Bazel
-
-*Optional if you will only be using the CMake build for runtime deps.*
-
-Check the .bazelversion file for the version you should install. You can also
-use [Bazelisk](https://github.com/bazelbuild/bazelisk) to manage Bazel versions.
-
-Follow the
-[install instructions](https://docs.bazel.build/versions/master/install-ubuntu.html)
-and verify with: `bazel --version`.
-
-### Install clang
-
-```
-sudo apt install clang
-```
-
-Verify version with `clang++ --version`. We have verified with the following
-versions:
-
-* 6.0.1
-
-There have been issues with the following versions:
-
-* [9.0.0-2](https://github.com/google/iree/issues/1216)
-
-### Install python, pip and dependencies
-
-Install python (note that if, on your distribution, python3 is the only option,
-you may be able to drop the "3").
-
-```
-sudo apt install python3 python3-pip
-```
-
-Verify python version with `python3 -V`. We have tested with >= 3.6. Some
-optional integrations (such as TensorFlow/Python may have more stringent
-requirements).
-
-Install packages:
-
-```
-sudo pip3 install numpy
-```
-
-If using Colab, you may also want to install TensorFlow:
-
-```shell
-sudo pip3 install tf-nightly
-```
-
-Or generate XLA using JAX:
-
-```shell
-sudo pip3 install jax jaxlib
-sudo pip3 install --upgrade jax jaxlib
-```
-
-### Install the Vulkan SDK
-
-Some parts of the project link against the Vulkan SDK and require it be
-installed on your system. If you are planning on building these, or see linker
-errors about undefined references to `vk` symbols, download and install the
-Vulkan SDK from https://vulkan.lunarg.com/, and check that the `VULKAN_SDK`
-environment variable is set when you are building. You may find it useful to add
-`source [PATH TO VULKAN SDK]/setup-env.sh` to your `~/.bashrc` file to simplify
-environment variable setup.
-
-## Optional: Configure Git
-
-### Git SSH
-
-* Generate SSH Key: `ssh-keygen -t rsa -b 4096 -C "EMAIL@email.com"`
-* Add `~/.ssh.id_rsa.pub` key to GitHub
-* Try a test connection `ssh git@github.com`
-
-### Other git config options
-
-```shell
-git config --global user.name "MY NAME"
-git config --global user.email "MY EMAIL"
-```
-
-## Clone
-
-This assumes that we are cloning into `$HOME/ireepub`. Update accordingly for
-your use.
-
-Note that if you will be cloning frequently, it can be sped up significantly by
-creating a reference repo and setting
-`IREE_CLONE_ARGS="--reference=/path/to/reference/repo"`. See
-`scripts/git/populate_reference_repo.sh` for further details.
-
-```shell
-IREE_CLONE_ARGS=""
-mkdir -p $HOME/ireepub
-cd $HOME/ireepub
-git clone $IREE_CLONE_ARGS https://github.com/google/iree.git iree
-cd iree
-git submodule init
-git submodule update $IREE_CLONE_ARGS --recursive
-```
-
-## Building with Bazel
-
-We support both Bazel and CMake, however, the Bazel build covers more parts of
-the system (tests, integrations, bindings, etc) whereas (currently) CMake is
-maintained for the runtime components (which will be consumed by other
-projects). This section covers building with Bazel.
-
-### Environment variables
-
-The following environment variables must be set.
-
-```shell
-export CXX=clang++
-export CC=clang
-export PYTHON_BIN="$(which python3)"
-```
-
-### Optional: Setup user config aliases
-
-You can create a `user.bazelrc` in the repository root with extra bazel configs
-that may be useful. We usually have something like this (make sure to make
-replacements as needed):
-
-```
-build --disk_cache=/REPLACE/WITH/CACHE/DIR
-
-# Use --config=debug to compile iree and llvm without optimizations
-# and with assertions enabled.
-build:debug --config=asserts --compilation_mode=opt '--per_file_copt=iree|llvm@-O0' --strip=never
-
-# Use --config=asserts to enable assertions in iree and llvm.
-build:asserts --compilation_mode=opt '--per_file_copt=iree|llvm@-UNDEBUG'
-
-# Bazel sandboxes the environment... because reasons, so punch through
-# the path to swiftshader if needed (i.e. if your machine does not have
-# a supported GPU/driver).
-test --test_env=VK_ICD_FILENAMES=/path/to/your/vk_swiftshader_icd.json
-```
-
-### Build
-
-```shell
-# Run all core tests
-bazel test -k iree/...
-
-# Or build with optimizations disabled (just for IREE, not for deps) and
-# debug symbols retained. This assumes you have an alias like above setup):
-bazel test --config=debug bindings/python/...
-```
-
-In general, build artifacts will be under the `bazel-bin` directory at the top
-level.
-
-## Building with CMake
-
-### Environment variables
-
-The following environment variables must be set.
-
-```shell
-export CXX=clang++
-```
-
-### Build
-
-```shell
-mkdir build && cd build
-
-cmake -DIREE_BUILD_COMPILER=ON -DIREE_BUILD_TESTS=ON -DIREE_BUILD_SAMPLES=OFF -DIREE_BUILD_DEBUGGER=OFF ..
-
-cmake --build .
-```
diff --git a/docs/getting_started_on_windows.md b/docs/getting_started_on_windows.md
deleted file mode 100644
index d2b648b..0000000
--- a/docs/getting_started_on_windows.md
+++ /dev/null
@@ -1,273 +0,0 @@
-# Getting Started on Windows
-
-**This guide is due for an update. For Windows CMake instructions, see
-[Getting Started on Windows with CMake](GetStarted/getting_started_windows_cmake.md).
-For Windows Bazel instructions, see
-[Getting Started on Windows with Bazel](GetStarted/getting_started_windows_bazel.md).**
-
-There are multiple ways to develop on Windows, and compared to other
-environments, batteries are often not included. This document outlines the setup
-that is known to work for the IREE developers. Other setups almost certainly
-work as well.
-
-## Pre-requisites
-
-### Enable Developer Mode
-
-We use symlinks in the build, and this requires developer mode to be enabled:
-
-* Open Settings
-* Search for "Developer Settings"
-* Select the radio button "Developer mode" and accept all prompts
-
-### Install Build Tools For Visual Studio
-
-At the time of writing, this can be found by going to
-[this page](https://visualstudio.microsoft.com/downloads/) and finding the
-Download link for "Build Tools for Visual Studio 2019".
-
-Minimally select to install "C++ Build Tools".
-
-### Install the Scoop Package Manager
-
-The [Scoop page is here](https://scoop.sh/). Follow the instructions at the
-bottom.
-
-IMPORTANT: When launching PowerShell, make sure to not select any option that
-ends in "(x86)" as this will install the 32bit version, and all of the software
-that Scoop installs will be 32bit. While 32bit builds of the project may be
-possible, we only (presently) support 64bit. Also, not all packages are
-available in 32bit.
-
-## Install Scoop Packages
-
-### Home Directory
-
-Optional: Set the msys2 home directory to your Windows home directory. By
-default, the msys2 HOME will be nested inside the installation directory, which
-is managed by scoop and somewhat ephemeral.
-
-* Open the Windows environment dialog (This PC -> Properties -> Advanced
- Settings -> Environment Variables...)
-* Add a new User variable: `HOME` = `C:\Users\%USERNAME%` (replacing with the
- actual location of your Windows home directory).
-* Ok out of all dialogs
-* Restart PowerShell
-* Verify that it took effect (`Get-ChildItem Env:HOME`)
-
-While here, also consider adding `GIT_SSH=C:/Users/%USERNAME%/scoop/shims/ssh`
-which will help git find the right SSH and keys (you probably want this as a
-global to Windows vs just in your shell, which is why it is recommended here).
-
-### Scoop Package Setup
-
-In PowerShell, run the following:
-
-```shell
-scoop install git nano vim
-scoop bucket add extras
-scoop bucket add versions
-scoop install msys2
-scoop install curl cmake openssh python36 llvm bazel
-# Optional
-scoop install vscode
-```
-
-TODO: Upgrade to head python.
-
-Check the .bazelversion file for the version of Bazel you should install. You
-can also use [Bazelisk](https://github.com/bazelbuild/bazelisk) to manage Bazel
-versions.
-
-TODO: Specific steps to install a compatible version of Bazel directly
-
-## Setup MSYS2
-
-Then run msys2 for the first time for subsequent setup by doing one of:
-
-* Launch MSYS2 from the start menu
-* From a regular PowerShell terminal (not ISE, which hangs), run `msys2`
-* Note that full interop between native and msys2 programs requires a "native"
- Windows shell. "PowerShell" qualifies. "PowerShell ISE" and the way that the
- "MSYS2" system shortcut launch do not. You can tell if things are working by
- launching MSYS2 and running `python` (which, for us is a native windows
- application).
-* Reportedly, cmder is a good possibility.
-
-You can also customize you shell, etc. From now on, when we refer to the shell,
-we mean "launch msys2".
-
-```shell
-# In MSYS2 shell
-pacman -S patch
-# Customize the path to your home directory if required.
-echo 'export PATH=/c/Users/$USERNAME/scoop/shims:$PATH' >> ~/.bash_profile
-```
-
-You are also going to want a few other environment variables. You are welcome to
-configure these however you choose. Adding them to `~/.bash_profile` would look
-like this:
-
-```shell
-# Tells Bazel to use clang-cl instead of VS cl.
-export USE_CLANG_CL=1
-# Tells Bazel where the LLVM installation is.
-export BAZEL_LLVM=C:/Users/$USERNAME/scoop/apps/llvm/current
-# This should be automatic, but worth checking.
-export BAZEL_SH=C:/Users/$USERNAME/scoop/apps/msys2/current/usr/bin/bash.exe
-```
-
-## Install the Vulkan SDK
-
-Some parts of the project link against the Vulkan SDK and require it be
-installed on your system. If you are planning on building these, or see linker
-errors about undefined references to `vk` symbols, download and install the
-Vulkan SDK from https://vulkan.lunarg.com/, and check that the VULKAN_SDK
-environment variable is set when you are building.
-
-## Optional: Configure Git
-
-### Git SSH
-
-* Make sure that the environment variable is set:
- `GIT_SSH=C:/Users/%USERNAME%/scoop/shims/ssh`
-* Generate SSH Key: `ssh-keygen -t rsa -b 4096 -C "EMAIL@email.com"`
-* Add `~/.ssh.id_rsa.pub` key to GitHub
-* Try a test connection `ssh git@github.com`
-
-### Other git config options
-
-```shell
-# Disable stupid^H^H^H^H^H^H Windows line ending translation
-git config --global core.autocrlf true
-# Configure name and email before commiting anything
-git config --global user.name "MY NAME"
-git config --global user.email "MY EMAIL"
-```
-
-## Clone and Build
-
-This assumes that we are cloning into `C:\src\ireepub`. Update accordingly for
-your use.
-
-### Clone
-
-Note that if you will be cloning frequently, it can be sped up significantly by
-creating a reference repo and setting
-`IREE_CLONE_ARGS="--reference=/path/to/reference/repo"`. See
-`scripts/git/populate_reference_repo.sh` for further details.
-
-```shell
-IREE_CLONE_ARGS=""
-mkdir -p /c/src/ireepub
-cd /c/src/ireepub
-git clone $IREE_CLONE_ARGS https://github.com/google/iree.git iree
-cd iree
-git submodule init
-git submodule update $IREE_CLONE_ARGS --recursive
-```
-
-### Build
-
-```shell
-# Run all core tests
-bazel test -k --config=windows iree/...
-```
-
-In general, build artifacts will be under the `bazel-bin` directory at the top
-level.
-
-## Recommended user.bazelrc
-
-You can put a user.bazelrc at the root of the repository and it will be ignored
-by git. The recommended contents for Windows are:
-
-```
-build --config=windows
-build --disk_cache=c:/bazelcache
-build:debug --compilation_mode=dbg --copt=/O2 --per_file_copt=iree@/Od --strip=never
-```
-
-## Troubleshooting
-
-### Bazel and Visual Studio Versions
-
-In general, the software has only been build with Visual Studio 2019 Build Tools
-and Clang-CL 9.x. Previous versions are known to have incompatibilities in their
-standard libraries. If you have multiple versions of Visual Studio (and/or Build
-Tools) installed, Bazel may auto-detect the wrong one. You can see this by
-adding a `-s` argument to you build command and looking for a "SET INCLUDE="
-line in the log output (to see where it is pointing).
-
-You can hard-code the version that Bazel selects by setting:
-`BAZEL_VS=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools`.
-
-If updating, you will need to `bazel clean` and `bazel shutdown` for changes to
-take effect.
-
-See
-[this page](https://docs.bazel.build/versions/master/windows.html#build-c-with-msvc)
-for more options.
-
-If setting up a new machine, it is best to just make sure there is one version.
-
-### Caching
-
-Bazel can use a local disk cache, which can speed up compiles that iterate
-between different sets of flags (ie. optimized and prod). Add this to your
-user.bazelrc:
-
-```
-build --disk_cache=c:/bazelcache
-```
-
-### Debugging
-
-By default, the project builds in opt mode, which is optimized/stripped. For
-Windows builds that do not wish to switch entirely to a debug build (i.e. it is
-often advantageous to only disable optimizations for some part of the code you
-are working on, you can use a build config like this by adding it to your
-user.bazelrc and building with --config=debug):
-
-```
-build:debug --compilation_mode=dbg --copt=/O2 --per_file_copt=iree@/Od --strip=never
-```
-
-Note that there is a Windows specific sharp edge: The `-O0` flag does nothing on
-CL-like compilers. You must use the Microsoft syntax of /Od. Given that, we just
-use it consistently.
-
-## Annex
-
-### Configuring Python
-
-The python bindings are still rudimentary but do require a functioning Python
-install with deps. If you installed Python from scoop or another place that
-doesn't bundle common deps, you'll need to take a couple of extra steps:
-
-#### Install PIP:
-
-Try running `pip`. If it doesn't exist (and if it isn't in your python Scripts/
-directory and somehow excluded from your path), install it by:
-
-```shell
-which python
-# Verify that this is where you think it is. Also verify that pip
-# prints install paths where you think.
-curl https://bootstrap.pypa.io/get-pip.py > ~/Downloads/get-pip.py
-python ~/Downloads/get-pip.py
-# Note that pip may print a directory name that needs to be added
-# to the path. Do so.
-```
-
-#### Install Python Deps
-
-```shell
-pip install numpy
-```
-
-If using Colab, you may also want to install TensorFlow:
-
-```shell
-pip install tf-nightly
-```
diff --git a/scripts/prepare_doc_publication.py b/scripts/prepare_doc_publication.py
index fc10aa5..548c0cf 100755
--- a/scripts/prepare_doc_publication.py
+++ b/scripts/prepare_doc_publication.py
@@ -54,6 +54,7 @@
'getting_started_windows_bazel.md': 'Windows with Bazel',
'getting_started_windows_cmake.md': 'Windows with CMake',
'getting_started_windows_vulkan.md': 'Windows with Vulkan',
+ 'getting_started_python.md': 'Python',
'op_coverage.md': 'XLA HLO Operation Coverage',
'roadmap.md': 'Short-term Focus Areas',
'roadmap_design.md': 'Long-term Design Roadmap',
@@ -73,6 +74,7 @@
'getting_started_windows_bazel.md': 'GetStarted/WindowsBazel',
'getting_started_windows_cmake.md': 'GetStarted/WindowsCMake',
'getting_started_windows_vulkan.md': 'GetStarted/WindowsVulkan',
+ 'getting_started_python.md': 'GetStarted/Python',
'developer_overview.md': 'DeveloperOverview',
'op_coverage.md': 'HLOOpCoverage',
'roadmap.md': 'FocusAreas',
@@ -91,6 +93,17 @@
'roadmap_design.md': 4,
'roadmap.md': 5,
'op_coverage.md': 6,
+
+ # Within 'Getting Started' use explicit ordering.
+ # Alphabetical would put 'bazel' before 'cmake' and 'python' between 'linux'
+ # and 'windows'.
+ 'getting_started_linux_cmake.md': 1,
+ 'getting_started_linux_bazel.md': 2,
+ 'getting_started_linux_vulkan.md': 3,
+ 'getting_started_windows_cmake.md': 4,
+ 'getting_started_windows_bazel.md': 5,
+ 'getting_started_windows_vulkan.md': 6,
+ 'getting_started_python.md': 7,
}
# A dictionary containing source directory to section tile mappings.
@@ -169,10 +182,11 @@
# Compose the new content.
content = '\n'.join(lines)
- # Substitute a specific pattern for "Tips" used in "Getting Started" docs to
- # make it prettier.
+ # Substitute specific pattern for callouts to make them prettier.
content = content.replace('> Tip:<br>\n> ',
'> Tip\n> {: .label .label-green }\n> ')
+ content = content.replace('> Note:<br>\n> ',
+ '> Note\n> {: .label .label-blue }\n> ')
# Update in place.
with open(full_path, 'w') as f:
diff --git a/scripts/update_op_coverage.py b/scripts/update_op_coverage.py
index 8e3f78b..27a894c 100755
--- a/scripts/update_op_coverage.py
+++ b/scripts/update_op_coverage.py
@@ -37,10 +37,11 @@
- vulkan (direct path)
- vulkan (structured ops path)
-(**Note**: IREE currently has two compilation paths for Vulkan, shown as above.
-The direct path lowers XLA HLOs to SPIR-V in one step; the structured ops path
-goes multiple steps in a progressive way. The plan is to deprecate the direct
-path soon.)
+> Note:<br>
+> IREE currently has two compilation paths for Vulkan,
+> shown as above. The direct path lowers XLA HLOs to SPIR-V in one step; the
+> structured ops path goes multiple steps in a progressive way. The plan is to
+> deprecate the direct path soon.)
The table shows the supported XLA HLO ops on each backend.
@@ -124,6 +125,6 @@
args = parse_arguments()
content = generate_table(args.build_dir)
table_path = os.path.join(args.build_dir, 'doc', 'op_coverage.md')
- with open(table_path, 'w') as f:
+ with open(table_path, 'w', encoding='utf-8') as f:
f.write(OP_COVERAGE_DESCRIPTION)
f.write(content)