AIうぉ--!(ai-wo-katsuyo-shitai !)

AIを上手く使ってみせたい!!自分なりに。

『Building jaxlib from source on Windows』、成功しました。世界初なワケないですが。。

『Additional Notes for Building jaxlib from source on Windows』成功!!

jax.readthedocs.io

Additional Notes for Building jaxlib from source on Windows

が、成功しました。

コマンドは、

python build/build.py --enable_cuda --cuda_path="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0" --cudnn_path="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0" --cuda_version="11.0" --cudnn_version="8.0.1"

成功した際の表示は、以下。

C:\_re_jax\jax-main>python build/build.py --enable_cuda --cuda_path="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0" --cudnn_path="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0" --cuda_version="11.0" --cudnn_version="8.0.1"

     _   _  __  __
    | | / \ \ \/ /
 _  | |/ _ \ \  /
| |_| / ___ \/  \
 \___/_/   \/_/\_\


Bazel binary path: C:\bazel\bazel.EXE
Python binary path: C:/Python/Python38/python.exe
Python version: 3.8
NumPy version: 1.19.5
SciPy version: 1.4.1
MKL-DNN enabled: yes
Target CPU: AMD64
Target CPU features: release
CUDA enabled: yes
CUDA toolkit path: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0
CUDNN library path: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0
CUDA version: 11.0
CUDNN version: 8.0.1
NCCL enabled: yes
TPU enabled: no
ROCm enabled: no

Building XLA and installing it in the jaxlib source tree...
C:\bazel\bazel.EXE run --verbose_failures=true --config=mkl_open_source_only --config=cuda :build_wheel -- --output_path=C:\_re_jax\jax-main\dist --cpu=AMD64
Starting local Bazel server and connecting to it...
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=80
INFO: Reading rc options for 'run' from c:\_re_jax\jax-main\.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Options provided by the client:
  Inherited 'build' options: --python_path=C:/Python/Python38/python.exe
INFO: Reading rc options for 'run' from c:\_re_jax\jax-main\.bazelrc:
  Inherited 'build' options: --apple_platform_type=macos --macos_minimum_os=10.9 --announce_rc --define open_source_build=true --spawn_strategy=standalone --enable_platform_specific_config --define=no_aws_support=true --define=no_gcp_support=true --define=no_hdfs_support=true --define=no_kafka_support=true --define=no_ignite_support=true --define=grpc_no_ares=true -c opt --config=short_logs
INFO: Reading rc options for 'run' from c:\_re_jax\jax-main\.jax_configure.bazelrc:
  Inherited 'build' options: --strategy=Genrule=standalone --repo_env PYTHON_BIN_PATH=C:/Python/Python38/python.exe --action_env=PYENV_ROOT --python_path=C:/Python/Python38/python.exe --action_env CUDA_TOOLKIT_PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0 --action_env CUDNN_INSTALL_PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0 --action_env TF_CUDA_PATHS=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0 --action_env TF_CUDA_VERSION=11.0 --action_env TF_CUDNN_VERSION=8.0.1 --distinct_host_configuration=false
INFO: Found applicable config definition build:short_logs in file c:\_re_jax\jax-main\.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:mkl_open_source_only in file c:\_re_jax\jax-main\.bazelrc: --define=tensorflow_mkldnn_contraction_kernel=1
INFO: Found applicable config definition build:cuda in file c:\_re_jax\jax-main\.bazelrc: --repo_env TF_NEED_CUDA=1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=3.5,5.2,6.0,6.1,7.0 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda --define=xla_python_enable_gpu=true
INFO: Found applicable config definition build:windows in file c:\_re_jax\jax-main\.bazelrc: --copt=/D_USE_MATH_DEFINES --host_copt=/D_USE_MATH_DEFINES --copt=-DWIN32_LEAN_AND_MEAN --host_copt=-DWIN32_LEAN_AND_MEAN --copt=-DNOGDI --host_copt=-DNOGDI --copt=/Zc:preprocessor --cxxopt=/std:c++14 --host_cxxopt=/std:c++14 --linkopt=/DEBUG --host_linkopt=/DEBUG --linkopt=/OPT:REF --host_linkopt=/OPT:REF --linkopt=/OPT:ICF --host_linkopt=/OPT:ICF --experimental_strict_action_env=true
INFO: Analyzed target //build:build_wheel (190 packages loaded, 14868 targets configured).
INFO: Found 1 target...
INFO: Deleting stale sandbox base C:/users/XYZZZ/_bazel_XYZZZ/qungmv4a/sandbox
Target //build:build_wheel up-to-date:
  bazel-bin/build/build_wheel.exe
  bazel-bin/build/build_wheel.zip
INFO: Elapsed time: 1657.798s, Critical Path: 300.64s
INFO: 2156 processes: 388 internal, 1768 local.
INFO: Build completed successfully, 2156 total actions
INFO: Build completed successfully, 2156 total actions
package init file 'jaxlib\xla_extension\__init__.py' not found (or not a regular file)
Output wheel: C:\_re_jax\jax-main\dist\jaxlib-0.1.71-cp38-none-win_amd64.whl

To install the newly-built jaxlib wheel, run:
  pip install C:\_re_jax\jax-main\dist\jaxlib-0.1.71-cp38-none-win_amd64.whl

トライされる方にできるアドバイスとしては、

  • 特別なことは何もしていません。
  • pythonは、シンプルなパスにいます。
  • 実行は、普通のコマンドプロンプト(管理者)で実行しました。
  • MSYS2がどう貢献しているのかは、不明です。
  • 1Hr以上は、処理にかかったと思います。
  • ディスク容量が、大量に必要だった。10GB以上とか??。

その他

以前、全くダメだったときとの差分は、不明です。(別件都合で)PCを0から再設定した都合上。 コメントなど頂ければ、わかることは、回答できるかも。

リンク(本人)

以前だめだったときの記事

ai-de-seikei.hatenablog.com