Skip to content

Instantly share code, notes, and snippets.

# install jax
~$ pip install -U "jax[cpu]"
# Build the .so file
~$ git clone https://github.com/openxla/xla
# Optional, checkout the branch that adds vlog
~/xla$ git checkout remotes/origin/test_626168031
# build cpu plugin
~/xla$ bazel build xla/pjrt/c:pjrt_c_api_cpu_plugin.so
# Check the method exposed. It should contain `T GetPjrtApi@@VERS_1.0` on the top
~/xla$ nm -gD bazel-bin/xla/pjrt/c/pjrt_c_api_cpu_plugin.so | grep GetPjrt