Package Details: python-jaxlib 0.4.24-1

Git Clone URL: https://aur.archlinux.org/python-jaxlib.git (read-only, click to copy)
Package Base: python-jaxlib
Description: XLA library for JAX
Upstream URL: https://github.com/google/jax/
Keywords: deep-learning google jax machine-learning xla
Licenses: Apache
Groups: jax
Submitter: daskol
Maintainer: daskol
Last Packager: daskol
Votes: 5
Popularity: 0.041297
First Submitted: 2021-01-12 12:50 (UTC)
Last Updated: 2024-02-06 21:57 (UTC)

Latest Comments

1 2 3 4 5 Next › Last »

daskol commented on 2024-01-10 11:12 (UTC)

@alaskan_malamut Does this work around helpful for you? https://aur.archlinux.org/packages/python-jaxlib#comment-947684

petronny commented on 2024-01-10 05:00 (UTC)

Hi, in the PKGBUILD there is --target_cpu_feature but the option is actually --target_cpu_features.

carlosal1015 commented on 2024-01-06 22:59 (UTC) (edited on 2024-01-06 23:00 (UTC) by carlosal1015)

Maybe will be fix with this change in PKGBUILD for python-jaxlib.

alaskan_malamute commented on 2024-01-06 15:34 (UTC)

I get errors while compiling on Manjaro https://pastebin.com/eCeAuS06 I want to run it with https://huggingface.co/microsoft/speecht5_tts but I get error RuntimeError: This version of jaxlib was built using AVX instructions, which your CPU and/or operating system do not support. You may be able work around this issue by building jaxlib from source.

https://pastebin.com/QBRYkMU8

carlosal1015 commented on 2023-12-21 02:15 (UTC)

I think conflicts array should have python-jaxlib-cuda instead of own package.

gatsby commented on 2023-12-16 21:46 (UTC)

@daskol That worked!

After a day of compilation I had to extend the swap with a file, and, after another day of compilation I verified it.

Thank you sir

daskol commented on 2023-12-13 14:40 (UTC) (edited on 2023-12-13 14:42 (UTC) by daskol)

@gatsby I see. I guess the issue is that AVX is a target architecture by default (in release configuration). Try to this patch.

diff --git a/PKGBUILD b/PKGBUILD
index 1a82d32..10509f3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -24,7 +24,7 @@ build() {
         --bazel_startup_options="--output_user_root=$srcdir/bazel"\
         --bazel_options='--action_env=JAXLIB_RELEASE' \
         --noenable_cuda \
-        --target_cpu_features release
+        --target_cpu_features=native
 }

 package() {

Your machine is pretty oldie indeed. :)

FYI The issue is that protoc is shipped with jax sources and is built from sources. With targeting newer hardware protoc fails to run.

gatsby commented on 2023-12-13 14:34 (UTC)

Thanks for the advice.

I have launched the command bazel-6.1.2-linux-x86_64 with the indicated parameters and internally it gives an error in another instruction

This executable ./bin/external/com_google_protobuf/protoc indicates that the instruction does not exist: SIGILL (Illegal instruction).

However, when I launch the default protoc installed on the machine it works.

I infer that it is because the CPU-enabled instruction set in the protoc binary that downloads.

I'm afraid that there is no easy way to solve this.

daskol commented on 2023-12-13 05:52 (UTC)

@gatsby Please attach long output as a file next time.

I've just checked in clean environemnt that python-jaxlib compiles without any issues. I guess that the first thing you should to do is to run command that fails.

By the way, can you be sure that hdd/ssd is functioning properly if your compute is pretty old?

gatsby commented on 2023-12-11 09:17 (UTC)

Hello, I have an error in the compilation for which I cannot find information. The computer is old and has few resources, it may have something to do with it but there are no clues in the traces.


Bazel binary path: ./bazel-6.1.2-linux-x86_64
Bazel version: 6.1.2
Python binary path: /usr/bin/python
Python version: 3.11
NumPy version: 1.26.2
MKL-DNN enabled: yes
Target CPU: x86_64
Target CPU features: release
CUDA enabled: no
ROCm enabled: no

Building XLA and installing it in the jaxlib source tree...
./bazel-6.1.2-linux-x86_64 --output_user_root=/home/imhere/auracle/python-jaxlib/src/bazel run --verbose_failures=true //jaxlib/tools:build_wheel -- --output_path=/home/imhere/auracle/python-jaxlib/src/jax-jaxli
b-v0.4.21/dist --cpu=x86_64
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=0 --terminal_columns=80
INFO: Reading rc options for 'run' from /home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'run' from /home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/.bazelrc:
  Inherited 'build' options: --nocheck_visibility --apple_platform_type=macos --macos_minimum_os=10.14 --announce_rc --define open_source_build=true --spawn_strategy=standalone --enable_platform_specific_config
--experimental_cc_shared_library --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
--define=tsl_link_protobuf=true -c opt --config=short_logs --copt=-DMLIR_PYTHON_PACKAGE_PREFIX=jaxlib.mlir. --@xla//xla/python:enable_gpu=false
INFO: Reading rc options for 'run' from /home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/.jax_configure.bazelrc:
  Inherited 'build' options: --strategy=Genrule=standalone --repo_env PYTHON_BIN_PATH=/usr/bin/python --action_env=PYENV_ROOT --python_path=/usr/bin/python --action_env=JAXLIB_RELEASE --config=avx_posix --config
=mkl_open_source_only
INFO: Found applicable config definition build:short_logs in file /home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:avx_posix in file /home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/.bazelrc: --copt=-mavx --host_copt=-mavx
INFO: Found applicable config definition build:mkl_open_source_only in file /home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/.bazelrc: --define=tensorflow_mkldnn_contraction_kernel=1
INFO: Found applicable config definition build:linux in file /home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/.bazelrc: --config=posix --copt=-Wno-unknown-warning-option --copt=-Wno-stringop-truncation
--copt=-Wno-array-parameter
INFO: Found applicable config definition build:posix in file /home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/.bazelrc: --copt=-fvisibility=hidden --copt=-Wno-sign-compare --cxxopt=-std=c++17 --host_cxx
opt=-std=c++17
Loading:
Loading:
DEBUG: /home/imhere/auracle/python-jaxlib/src/bazel/04d5f30ac65beb0dc0d4f941d1fb7db7/external/xla/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'llvm-raw' because it already exists.
Loading:
Loading:
Loading: 0 packages loaded
Analyzing: target //jaxlib/tools:build_wheel (38 packages loaded, 1571 targets configured)
INFO: Analyzed target //jaxlib/tools:build_wheel (39 packages loaded, 7665 targets configured).
 checking cached actions
INFO: Found 1 target...
[0 / 3] [Prepa] BazelWorkspaceStatusAction stable-status.txt
[249 / 4,802] ProtoCompile external/xla/xla/xla_data.pb.h; 0s local ... (2 actions, 1 running)
[249 / 4,802] ProtoCompile external/xla/xla/xla_data.pb.h; 1s local ... (2 actions running)
ERROR: /home/imhere/auracle/python-jaxlib/src/bazel/04d5f30ac65beb0dc0d4f941d1fb7db7/external/xla/xla/BUILD:80:17: ProtoCompile external/xla/xla/xla_data.pb.h failed: (Illegal instruction): protoc failed: error
executing command (from target @xla//xla:xla_data_proto_genproto)
  (cd /home/imhere/auracle/python-jaxlib/src/bazel/04d5f30ac65beb0dc0d4f941d1fb7db7/execroot/__main__ && \
  exec env - \
    JAXLIB_RELEASE=0.4.21 \
    PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl \
  bazel-out/k8-opt-exec-50AE0418/bin/external/com_google_protobuf/protoc '--cpp_out=bazel-out/k8-opt/bin/external/xla' -Iexternal/xla -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/any_prot
o -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/source_context_proto -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/type_proto -Ibazel-out/k8-opt/bin/external/com_goo
gle_protobuf/_virtual_imports/api_proto -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/descriptor_proto -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/compiler_plugin_
proto -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/duration_proto -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/empty_proto -Ibazel-out/k8-opt/bin/external/com_goog
le_protobuf/_virtual_imports/field_mask_proto -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/struct_proto -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/timestamp_prot
o -Ibazel-out/k8-opt/bin/external/com_google_protobuf/_virtual_imports/wrappers_proto external/xla/xla/xla_data.proto)
# Configuration: 5ea8fb2d7866cbe573747865075f311e36cf01e7ad969e452133030105df9938
# Execution platform: @local_execution_config_platform//:platform
Target //jaxlib/tools:build_wheel failed to build
[251 / 4,802] checking cached actions
INFO: Elapsed time: 58.224s, Critical Path: 7.38s
INFO: 3 processes: 3 internal.
FAILED: Build did NOT complete successfully
ERROR: Build failed. Not running target
Traceback (most recent call last):
  File "/home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/build/build.py", line 602, in <module>
    main()
  File "/home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/build/build.py", line 573, in main
    shell(command)
  File "/home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/build/build.py", line 44, in shell
    output = subprocess.check_output(cmd)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['./bazel-6.1.2-linux-x86_64', '--output_user_root=/home/imhere/auracle/python-jaxlib/src/bazel', 'run', '--verbose_failures=true', '//jaxlib/tools:build_wheel', '--', '--
output_path=/home/imhere/auracle/python-jaxlib/src/jax-jaxlib-v0.4.21/dist', '--cpu=x86_64']' returned non-zero exit status 1.