[RISCV64] can't link soft-float modules with double-float modules
@qinhj This issue occurs as the soft-float and double-float ABIs are incompatible. Due to this incompatibility between ABIs ,if you try to link soft-float modules with double-float modules, the linker will not be able to resolve the symbols between the two modules. That will cause this error. Please try to compile all the modules with the same floating point ABIs to avoid this issue. Thank you! > @qinhj This issue occurs as the soft-float and double-float ABIs are incompatible. Due to this incompatibility between ABIs ,if you try to link soft-float modules with double-float modules, the linker will not be able to resolve the symbols between the two modules. That will cause this error. Please try to compile all the modules with the same floating point ABIs to avoid this issue. Thank you!

Thanks for your reply.
I have already found the root cause before open this issue and had a quick solution.

My questions are:
1. Is there any other way to fix this issue?
I didn't find any way to pass the abi info to llvm from saved_model_cli.py and saved_model_aot_compile.py(maybe the "target_features" options?) Or did I miss sth with test target //tensorflow/python/... ?
2. How to fix: Executing genrule //tensorflow/python/tools:aot_compiled_x_matmul_y_small_gen failed
3. How to fix: errors encountered while analyzing target xxx

May be you can have a glance at [here](https://github.com/tensorflow/tensorflow/issues/62241#:~:text=After%20I%20fixed,to%2Dsup.patch) @qinhj Thank you for your response here!
Please have a look at these workarounds as follows;
1. Yes, you can pass the ABI info to llvm from saved_model_cli.py and saved_model_aot_compile.py using the `target_features` option. The target_features option allows you to specify the floating-point ABI that is used to compile the saved model.
2. Make sure that the AOT-compiled XMatMulYSmall genrule is supported on your platform. You can check this by running the following command:
```
python -m tensorflow.python.tools.aot_genrule_compiler --list_genrules
```
3. Make sure that the target xxx is defined correctly. You can check this by running the following command:
```
bazel query 'kind(rule, xxx)'
```

Thank you! > @qinhj Thank you for your response here! Please have a look at these workarounds as follows;
> 
> 1. Yes, you can pass the ABI info to llvm from saved_model_cli.py and saved_model_aot_compile.py using the `target_features` option. The target_features option allows you to specify the floating-point ABI that is used to compile the saved model.
> 2. Make sure that the AOT-compiled XMatMulYSmall genrule is supported on your platform. You can check this by running the following command:
> 
> ```
> python -m tensorflow.python.tools.aot_genrule_compiler --list_genrules
> ```
> 
> 3. Make sure that the target xxx is defined correctly. You can check this by running the following command:
> 
> ```
> bazel query 'kind(rule, xxx)'
> ```
> 
> Thank you!

@sushreebarsa Thanks a lot.

I have tried your workarounds (based on v2.13.1):

1. According to the description of "target_features", one can pass features like "+avx2", "+neon" to the llvm target feature, but it seems that it doesn't work with "-mabi=lp64d", "+mabi=lp64d" or "lp64d". So, which feature string shall I use, to pass the floating-point ABI to the llvm? Can you show me the example?
```txt
'lp64d' is not a recognized feature for this target (ignoring feature)
```
2. No module named tensorflow.python.tools.aot_genrule_compiler
3. Tried with target '//tensorflow/python/kernel_tests/math_ops:batch_matmul_op_test_cpu' and the target seems defined well:
```bash
bazel --output_user_root=$(pwd)/workspace query 'kind(rule,//tensorflow/python/kernel_tests/math_ops:batch_matmul_op_test_cpu)'
```
```txt
Starting local Bazel server and connecting to it...
... still trying to connect to local Bazel server (195) after 10 seconds ...
//tensorflow/python/kernel_tests/math_ops:batch_matmul_op_test_cpu
Loading: 1 packages loaded
```
### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

source

### TensorFlow version

tf2.13.1

### Custom code

No

### OS platform and distribution

Linux Ubuntu 23.04 (riscv64)

### Mobile device

None

### Python version

3.11.4

### Bazel version

v5.4.0 && v6.3.2

### GCC/compiler version

gcc (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0

### CUDA/cuDNN version

without cuda support

### GPU model and memory

_No response_

### Current behavior?

After I fixed some issues(see the attached patches) during building tensorflow from source(v2.13.1) , I met an unexpected error:
**Can't link soft-float modules with double-float modules**
during bazel test target //tensorflow/python/tools:aot_compiled_test(see relevant log output for more details).

It seems that the root cause of this issue is the default abi return by [RISCVISAInfo::computeDefaultABI](https://github.com/llvm/llvm-project/blob/dc275fd03254d67d29cc70a5a0569acf24d2280d/llvm/lib/Support/RISCVISAInfo.cpp#L1167) in [llvm/lib/Support/RISCVISAInfo.cpp](https://github.com/llvm/llvm-project/blob/dc275fd03254d67d29cc70a5a0569acf24d2280d/llvm/lib/Support/RISCVISAInfo.cpp) is "lp64" (i.e. soft float, 0x0), while the libraries(e.g. libm.so, libstdc++.so, etc.) in the riscv64 env has Flags "0x5":

$ readelf -h bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_plus_y.o
ELF Header:
  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              REL (Relocatable file)
  Machine:                           RISC-V
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          0 (bytes into file)
  Start of section headers:          808 (bytes into file)
  **Flags:                             0x0**                                      **<= here**
  Size of this header:               64 (bytes)
  Size of program headers:           0 (bytes)
  Number of program headers:         0
  Size of section headers:           64 (bytes)
  Number of section headers:         9
  Section header string table index: 1

$ readelf -h /usr/lib/riscv64-linux-gnu/libm.so.6 # libc.so.6, libstdc++.so.6.0.32
ELF Header:
  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           RISC-V
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          64 (bytes into file)
  Start of section headers:          447232 (bytes into file)
  **Flags:                             0x5, RVC, double-float ABI**     **<= here!**
  Size of this header:               64 (bytes)
  Size of program headers:           56 (bytes)
  Number of program headers:         7
  Size of section headers:           64 (bytes)
  Number of section headers:         28
  Section header string table index: 27

According to the [lldb/include/lldb/Utility/ArchSpec.h](https://github.com/llvm/llvm-project/blob/dc275fd03254d67d29cc70a5a0569acf24d2280d/lldb/include/lldb/Utility/ArchSpec.h):
  enum RISCVeflags {
    eRISCV_rvc              = 0x00000001, /// RVC, +c
    eRISCV_float_abi_soft   = 0x00000000, /// soft float
    eRISCV_float_abi_single = 0x00000002, /// single precision floating point, +f
    eRISCV_float_abi_double = 0x00000004, /// double precision floating point, +d
    eRISCV_float_abi_quad   = 0x00000006, /// quad precision floating point, +q
    eRISCV_float_abi_mask   = 0x00000006,
    eRISCV_rve              = 0x00000008, /// RVE, +e
    eRISCV_tso              = 0x00000010, /// RVTSO (total store ordering)
  };
It seems that `0x5` == eRISCV_float_abi_double +(??) eRISCV_rvc (i.e. RVC, double-float)
and  `0x0` == eRISCV_float_abi_soft(i.e. soft-float)

A quick solution: hard coded the ABIName(as "lp64d") in the llvm target options, which required by createTargetMachine, e.g. 
[debug_xla_cpu_compiler.patch](https://github.com/tensorflow/tensorflow/files/13176243/debug_xla_cpu_compiler.patch)

Anyway, I have 3 questions:
1. **_Is there any other way to fix this issue?_**
I didn't find any way to pass the abi info to llvm from saved_model_cli.py and saved_model_aot_compile.py(maybe the "target_features" options?) Or did I miss sth with test target //tensorflow/python/... ?
2. How to fix: Executing genrule //tensorflow/python/tools:aot_compiled_x_matmul_y_small_gen failed
3. How to fix: errors encountered while analyzing target xxx

Some necessary patches to build tensorflow with riscv64 platform:
[0001-patch-third_parth-llvm-add-new-llvm-config-defines-t.patch](https://github.com/tensorflow/tensorflow/files/13176244/0001-patch-third_parth-llvm-add-new-llvm-config-defines-t.patch)
[0002-patch-compiler-xla-add-new-select-for-cc_library-dep.patch](https://github.com/tensorflow/tensorflow/files/13176246/0002-patch-compiler-xla-add-new-select-for-cc_library-dep.patch)
[0003-patch-compiler-aot-add-new-llvm-target-triple-to-sup.patch](https://github.com/tensorflow/tensorflow/files/13176248/0003-patch-compiler-aot-add-new-llvm-target-triple-to-sup.patch)

### Standalone code to reproduce the issue

```shell
Reproduction Steps:

# 1. Prepare a riscv64 env, e.g. riscv64/ubuntu:23.04 with qemu
$ wget https://github.com/multiarch/qemu-user-static/releases/download/v7.2.0-1/qemu-riscv64-static
$ docker run -itd --name xxx --net=host --privileged --platform riscv64 -v $(pwd)/qemu-riscv64-static:/usr/bin/qemu-riscv64-static -v $HOME:/home/$USER -w /home/$USER riscv64/ubuntu:23.04 /bin/bash
$ docker exec -it xxx /bin/bash

# 2. Build bazel from source with version >= 5.0.0 (since I didn't find a prebuilt version for riscv64)
# Note: Although bazel has supported riscv64 platform since v5.0.0, this is a typo in `tools/jdk/BUILD.tools`(fixed since v6.0.0). (Here, I've built and tested bazel with both v5.4.0 and v6.3.2)
$ export PATH=${PATH_TO_MY_BAZEL}:$PATH # add my bazel path to PATH

# 3. Apply the above patches for tensorflow v2.13.1 source code

# 4. Build tensorflow from source v2.13.1
$ python3 configure.py # without cuda/rocm/... support(i.e. cpu only)
$ vi .bazelrc # add/update some necessary configuration, e.g.
build --copt=-march=rv64gcv #native
build --cxxopt=-march=rv64gcv #native
build --host_copt=-march=rv64gcv #native
build --host_cxxopt=-march=rv64gcv #native
build --copt=-mabi=lp64d
build --cxxopt=-mabi=lp64d
build --host_copt=-mabi=lp64d
build --host_cxxopt=-mabi=lp64d
$ riscv64_opt="--config=opt --config=noaws --config=nogcp --config=nohdfs --config=nonccl"
$ riscv64_opt="${riscv64_opt} --verbose_failures --define=tensorflow_mkldnn_contraction_kernel=0"
$ riscv64_opt="${riscv64_opt} --sandbox_debug --local_ram_resources=20480 --repo_env=TF_PYTHON_VERSION=3.11"
$ riscv64_tgt="//tensorflow:libtensorflow.so //tensorflow:libtensorflow_framework.so //tensorflow/tools/pip_package:build_pip_package"
$ bazel --output_user_root=$(pwd)/workspace build -s -k ${riscv64_opt} ${riscv64_tgt} &
...
INFO: Build completed successfully, xxx total actions

# 5. Test kernel(s)
$ flags="--verbose_failures --define=tensorflow_mkldnn_contraction_kernel=0 --experimental_scale_timeouts=100 --http_timeout_scaling=100 --config=opt -k -s"
$ bazel --output_user_root=$(pwd)/workspace test ${flags} //tensorflow/python/... &
# Then, one may meet this issue on riscv64 platform.
```


### Relevant log output

```shell
(py3.11.4) # flags="--verbose_failures --define=tensorflow_mkldnn_contraction_kernel=0 --experimental_scale_timeouts=100 --http_timeout_scaling=100 --config=opt -k"
(py3.11.4) # bazel --output_user_root=$(pwd)/workspace test -s ${flags} //tensorflow/python/... &
[1] 3687358

INFO: Reading 'startup' options from /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.bazelrc: --host_jvm_args=-Xmx30G, --host_jvm_args=-Xms30G, --host_jvm_args=-XX:MaxNewSize=3g, --host_jvm_args=-XX:-UseAdaptiveSizePolicy, --host_jvm_args=-XX:+UseConcMarkSweepGC, --host_jvm_args=-XX:TargetSurvivorRatio=70, --host_jvm_args=-XX:SurvivorRatio=6, --host_jvm_args=-XX:+UseCMSInitiatingOccupancyOnly, --host_jvm_args=-XX:CMSInitiatingOccupancyFraction=75
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=173
INFO: Reading rc options for 'test' from /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'test' from /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.bazelrc:
  Inherited 'build' options: --jobs=32 --noexperimental_check_output_files --nostamp --noexperimental_check_output_files --copt=-march=rv64gcv --host_copt=-march=rv64gcv --define framework_shared_object=true --define tsl_protobuf_header_only=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --enable_platform_specific_config --define=with_xla_support=true --config=short_logs --config=v2 --define=no_aws_support=true --define=no_hdfs_support=true --experimental_cc_shared_library --experimental_link_static_libraries_once=false --incompatible_enforce_config_setting_visibility
INFO: Reading rc options for 'test' from /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.tf_configure.bazelrc:
  Inherited 'build' options: --action_env PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 --action_env PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages --python_path=/home/qinhongjie/workspace/python/py3.11.4/bin/python3
INFO: Reading rc options for 'test' from /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.bazelrc:
  Inherited 'build' options: --deleted_packages=tensorflow/compiler/mlir/tfrt,tensorflow/compiler/mlir/tfrt/benchmarks,tensorflow/compiler/mlir/tfrt/jit/python_binding,tensorflow/compiler/mlir/tfrt/jit/transforms,tensorflow/compiler/mlir/tfrt/python_tests,tensorflow/compiler/mlir/tfrt/tests,tensorflow/compiler/mlir/tfrt/tests/ir,tensorflow/compiler/mlir/tfrt/tests/analysis,tensorflow/compiler/mlir/tfrt/tests/jit,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_tfrt,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_jitrt,tensorflow/compiler/mlir/tfrt/tests/tf_to_corert,tensorflow/compiler/mlir/tfrt/tests/tf_to_tfrt_data,tensorflow/compiler/mlir/tfrt/tests/saved_model,tensorflow/compiler/mlir/tfrt/transforms/lhlo_gpu_to_tfrt_gpu,tensorflow/core/runtime_fallback,tensorflow/core/runtime_fallback/conversion,tensorflow/core/runtime_fallback/kernel,tensorflow/core/runtime_fallback/opdefs,tensorflow/core/runtime_fallback/runtime,tensorflow/core/runtime_fallback/util,tensorflow/core/tfrt/eager,tensorflow/core/tfrt/eager/backends/cpu,tensorflow/core/tfrt/eager/backends/gpu,tensorflow/core/tfrt/eager/core_runtime,tensorflow/core/tfrt/eager/cpp_tests/core_runtime,tensorflow/core/tfrt/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/graph_executor,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils,tensorflow/core/tfrt/utils/debug
INFO: Reading rc options for 'test' from /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.tf_configure.bazelrc:
  'test' options: --flaky_test_attempts=3 --test_size_filters=small,medium
INFO: Found applicable config definition build:short_logs in file /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition test:v2 in file /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.tf_configure.bazelrc: --test_tag_filters=-benchmark-test,-no_oss,-oss_excluded,-gpu,-oss_serial,-v1only --build_tag_filters=-benchmark-test,-no_oss,-oss_excluded,-gpu,-v1only
INFO: Found applicable config definition build:opt in file /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.tf_configure.bazelrc: --copt=-Wno-sign-compare --host_copt=-Wno-sign-compare
INFO: Found applicable config definition build:linux in file /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.bazelrc: --define=build_with_onednn_v2=false --host_copt=-w --copt=-Wno-all --copt=-Wno-extra --copt=-Wno-deprecated --copt=-Wno-deprecated-declarations --copt=-Wno-ignored-attributes --copt=-Wno-array-bounds --copt=-Wunused-result --copt=-Werror=unused-result --copt=-Wswitch --copt=-Werror=switch --copt=-Wno-error=unused-but-set-variable --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --define=PROTOBUF_INCLUDE_PATH=$(PREFIX)/include --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --config=dynamic_kernels --experimental_guard_against_concurrent_changes
INFO: Found applicable config definition build:dynamic_kernels in file /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_KERNELS

Loading: 0 packages loaded
WARNING: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/framework/BUILD:222:11: target '//tensorflow/python/framework:for_generated_wrappers' is deprecated: Depending on this target can cause build dependency cycles. Depend on the fine-grained sub-targets instead.
WARNING: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/framework/BUILD:246:11: target '//tensorflow/python/framework:for_generated_wrappers_v2' is deprecated: Depending on this target can cause build dependency cycles. Depend on the fine-grained sub-targets instead.
WARNING: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/eager/BUILD:548:11: target '//tensorflow/python/eager:framework_for_generated_wrappers' is deprecated: Depending on this target can cause build dependency cycles. Depend on the fine-grained sub-targets instead.
WARNING: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/ops/distributions/BUILD:9:18: target '//tensorflow/python/ops/distributions:distributions' is deprecated: TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.distributions will not receive new features, and will be removed by early 2019. You should update all usage of `tf.distributions` to `tfp.distributions`.
ERROR: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/external/bazel_tools/tools/jdk/BUILD:29:19: While resolving toolchains for target @bazel_tools//tools/jdk:current_java_runtime: no matching toolchains found for types @bazel_tools//tools/jdk:runtime_toolchain_type
ERROR: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/external/bazel_tools/tools/jdk/BUILD:479:27: While resolving toolchains for target @bazel_tools//tools/jdk:remote_jdk11: no matching toolchains found for types @bazel_tools//tools/jdk:runtime_toolchain_type
WARNING: errors encountered while analyzing target '//tensorflow/python/client:events_writer_test': it will not be built
WARNING: errors encountered while analyzing target '//tensorflow/python/kernel_tests/sparse_ops:sparse_reorder_op_test': it will not be built
WARNING: errors encountered while analyzing target '//tensorflow/python:nn_fused_batchnorm_test_gpu': it will not be built
WARNING: errors encountered while analyzing target '//tensorflow/python/kernel_tests/math_ops:batch_matmul_op_test_cpu': it will not be built
WARNING: errors encountered while analyzing target '//tensorflow/python/compiler/tensorrt/test:quantization_test_gpu': it will not be built
WARNING: errors encountered while analyzing target '//tensorflow/python/debug/wrappers:dumping_wrapper_test': it will not be built
WARNING: errors encountered while analyzing target '//tensorflow/python/kernel_tests/linalg:slicing_test_cpu': it will not be built
WARNING: errors encountered while analyzing target '//tensorflow/python/kernel_tests/random:stateful_random_ops_test_cpu': it will not be built
WARNING: errors encountered while analyzing target '//tensorflow/python/autograph/operators:exceptions_test': it will not be built
...
WARNING: errors encountered while analyzing target '//tensorflow/python/tpu/tests:tpu_embedding_v2_hd_invalid_input_test': it will not be built
WARNING: errors encountered while analyzing target '//tensorflow/python/kernel_tests/array_ops:where_op_test_gpu': it will not be built
WARNING: errors encountered while analyzing target '//tensorflow/python/kernel_tests/array_ops:depthtospace_op_test_cpu': it will not be built
INFO: Analysis succeeded for only 2047 of 3638 top-level targets
INFO: Analyzed 3638 targets (658 packages loaded, 46926 targets configured).
INFO: Found 2047 targets and 0 test targets...
INFO: Deleting stale sandbox base /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/sandbox
SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_x_matmul_y_small_gen [action 'Executing genrule //tensorflow/python/tools:aot_compiled_x_matmul_y_small_gen', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform]
(cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/tensorflow/python/tools/saved_model_cli aot_compile_cpu --dir "$(dirname bazel-out/riscv64-opt/bin/tensorflow/python/tools/x_matmul_y_small/saved_model.pb)" --output_prefix bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_small --cpp_class XMatmulYSmall --variables_to_feed '\'''\'' --signature_def_key serving_default --multithreading False --target_triple riscv64-unknown-linux-gnu --tag_set serve ')
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_x_matmul_y_large_gen [action 'Executing genrule //tensorflow/python/tools:aot_compiled_x_matmul_y_large_gen', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform]
(cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/tensorflow/python/tools/saved_model_cli aot_compile_cpu --dir "$(dirname bazel-out/riscv64-opt/bin/tensorflow/python/tools/x_matmul_y_large/saved_model.pb)" --output_prefix bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large --cpp_class XMatmulYLarge --variables_to_feed '\'''\'' --signature_def_key serving_default --multithreading False --target_triple riscv64-unknown-linux-gnu --tag_set serve ')
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_x_matmul_y_large_multithreaded_gen [action 'Executing genrule //tensorflow/python/tools:aot_compiled_x_matmul_y_large_multithreaded_gen', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform]
(cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/tensorflow/python/tools/saved_model_cli aot_compile_cpu --dir "$(dirname bazel-out/riscv64-opt/bin/tensorflow/python/tools/x_matmul_y_large/saved_model.pb)" --output_prefix bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large_multithreaded --cpp_class XMatmulYLargeMultithreaded --variables_to_feed '\'''\'' --signature_def_key serving_default --multithreading True --target_triple riscv64-unknown-linux-gnu --tag_set serve ')
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_vars_and_arithmetic_gen [action 'Executing genrule //tensorflow/python/tools:aot_compiled_vars_and_arithmetic_gen', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform]
(cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/tensorflow/python/tools/saved_model_cli aot_compile_cpu --dir "$(dirname tensorflow/cc/saved_model/testdata/VarsAndArithmeticObjectGraph/saved_model.pb)" --output_prefix bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic --cpp_class VarsAndArithmetic --variables_to_feed variable_x --signature_def_key serving_default --multithreading False --target_triple riscv64-unknown-linux-gnu --tag_set serve ')
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_x_plus_y_gen [action 'Executing genrule //tensorflow/python/tools:aot_compiled_x_plus_y_gen', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform]
(cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/tensorflow/python/tools/saved_model_cli aot_compile_cpu --dir "$(dirname tensorflow/cc/saved_model/testdata/x_plus_y_v2_debuginfo/saved_model.pb)" --output_prefix bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_plus_y --cpp_class XPlusY --variables_to_feed '\'''\'' --signature_def_key serving_default --multithreading False --target_triple riscv64-unknown-linux-gnu --tag_set serve ')
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_vars_and_arithmetic_frozen_gen [action 'Executing genrule //tensorflow/python/tools:aot_compiled_vars_and_arithmetic_frozen_gen', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform]
(cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/tensorflow/python/tools/saved_model_cli aot_compile_cpu --dir "$(dirname tensorflow/cc/saved_model/testdata/VarsAndArithmeticObjectGraph/saved_model.pb)" --output_prefix bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic_frozen --cpp_class VarsAndArithmeticFrozen --variables_to_feed '\'''\'' --signature_def_key serving_default --multithreading False --target_triple riscv64-unknown-linux-gnu --tag_set serve ')
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
ERROR: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/tools/BUILD:435:24: Executing genrule //tensorflow/python/tools:aot_compiled_x_matmul_y_small_gen failed: (Aborted): bash failed: error executing command
  (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/tensorflow/python/tools/saved_model_cli aot_compile_cpu --dir "$(dirname bazel-out/riscv64-opt/bin/tensorflow/python/tools/x_matmul_y_small/saved_model.pb)" --output_prefix bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_small --cpp_class XMatmulYSmall --variables_to_feed '\'''\'' --signature_def_key serving_default --multithreading False --target_triple riscv64-unknown-linux-gnu --tag_set serve ')
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard installation.
WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard installation.
WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard installation.
WARNING:root:Limited tf.summary API due to missing TensorBoard installation.
2023-10-22 10:52:26.636364: I tensorflow/core/grappler/devices.cc:75] Number of eligible GPUs (core count >= 8, compute capability >= 0.0): 0 (Note: TensorFlow was not compiled with CUDA or ROCm support)
2023-10-22 10:52:26.638418: I tensorflow/core/grappler/clusters/single_machine.cc:357] Starting new session
INFO:tensorflow:Restoring parameters from bazel-out/riscv64-opt/bin/tensorflow/python/tools/x_matmul_y_small/variables/variables
I1022 10:52:27.044752 274888417312 saver.py:1413] Restoring parameters from bazel-out/riscv64-opt/bin/tensorflow/python/tools/x_matmul_y_small/variables/variables
2023-10-22 10:52:27.052453: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:375] MLIR V1 optimization pass is not enabled
WARNING:tensorflow:From /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/tools/saved_model_aot_compile.py:284: convert_variables_to_constants (from tensorflow.python.framework.convert_to_constants) is deprecated and will be removed in a future version.
Instructions for updating:
This API was designed for TensorFlow v1. See https://www.tensorflow.org/guide/migrate for instructions on how to migrate your code to TensorFlow v2.
W1022 10:52:27.161892 274888417312 deprecation.py:364] From /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/tools/saved_model_aot_compile.py:284: convert_variables_to_constants (from tensorflow.python.framework.convert_to_constants) is deprecated and will be removed in a future version.
Instructions for updating:
This API was designed for TensorFlow v1. See https://www.tensorflow.org/guide/migrate for instructions on how to migrate your code to TensorFlow v2.
WARNING:tensorflow:From /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/framework/convert_to_constants.py:946: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
This API was designed for TensorFlow v1. See https://www.tensorflow.org/guide/migrate for instructions on how to migrate your code to TensorFlow v2.
W1022 10:52:27.162361 274888417312 deprecation.py:364] From /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/framework/convert_to_constants.py:946: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
This API was designed for TensorFlow v1. See https://www.tensorflow.org/guide/migrate for instructions on how to migrate your code to TensorFlow v2.
INFO:tensorflow:Writing graph def to: /tmp/saved_model_cliqg04pgi5/frozen_graph.pb
I1022 10:52:27.166092 274888417312 saved_model_aot_compile.py:300] Writing graph def to: /tmp/saved_model_cliqg04pgi5/frozen_graph.pb
INFO:tensorflow:Writing config_pbtxt to: /tmp/saved_model_cliqg04pgi5/config.pbtxt
I1022 10:52:27.170504 274888417312 saved_model_aot_compile.py:305] Writing config_pbtxt to: /tmp/saved_model_cliqg04pgi5/config.pbtxt
INFO:tensorflow:Generating XLA AOT artifacts in: bazel-out/riscv64-opt/bin/tensorflow/python/tools
I1022 10:52:27.172687 274888417312 saved_model_aot_compile.py:390] Generating XLA AOT artifacts in: bazel-out/riscv64-opt/bin/tensorflow/python/tools
2023-10-22 10:52:27.383094: F tensorflow/compiler/xla/service/cpu/tiled_dot_emitter.cc:714] Check failed: max_vectorization_width() > 0 && absl::has_single_bit(static_cast<uint64_t>(max_vectorization_width()))
Fatal Python error: Aborted

Current thread 0x0000004000a06020 (most recent call first):
  File "/home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/tools/saved_model_aot_compile.py", line 398 in aot_compile_cpu_meta_graph_def
  File "/home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/tools/saved_model_cli.py", line 1109 in aot_compile_cpu
  File "/home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/tools/saved_model_cli.py", line 1307 in smcli_main
  File "/home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/absl_py/absl/app.py", line 258 in _run_main
  File "/home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/absl_py/absl/app.py", line 312 in run
  File "/home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/tools/saved_model_cli.py", line 1309 in main
  File "/home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/python/tools/saved_model_cli.runfiles/org_tensorflow/tensorflow/python/tools/saved_model_cli.py", line 1313 in <module>

Extension modules: numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, google.protobuf.pyext._message, tensorflow.python.framework.fast_tensor_util (total: 15)
SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_x_matmul_y_large [action 'Linking tensorflow/python/tools/libaot_compiled_x_matmul_y_large.so', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform]
(cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PWD=/proc/self/cwd \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_x_matmul_y_large.so-2.params)
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
ERROR: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/tools/BUILD:416:24: Linking tensorflow/python/tools/libaot_compiled_x_matmul_y_large.so failed: (Exit 1): gcc failed: error executing command
  (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PWD=/proc/self/cwd \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_x_matmul_y_large.so-2.params)
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
/usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large.o: can't link soft-float modules with double-float modules
/usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large.o
/usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large_metadata.o: can't link soft-float modules with double-float modules
/usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large_metadata.o
collect2: error: ld returned 1 exit status
SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_vars_and_arithmetic [action 'Linking tensorflow/python/tools/libaot_compiled_vars_and_arithmetic.so', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform]
(cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PWD=/proc/self/cwd \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_vars_and_arithmetic.so-2.params)
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_x_matmul_y_large_multithreaded [action 'Linking tensorflow/python/tools/libaot_compiled_x_matmul_y_large_multithreaded.so', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform]
(cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PWD=/proc/self/cwd \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_x_matmul_y_large_multithreaded.so-2.params)
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
ERROR: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/tools/BUILD:464:24: Linking tensorflow/python/tools/libaot_compiled_vars_and_arithmetic.so failed: (Exit 1): gcc failed: error executing command
  (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PWD=/proc/self/cwd \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_vars_and_arithmetic.so-2.params)
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
/usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic.o: can't link soft-float modules with double-float modules
/usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic.o
/usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic_metadata.o: can't link soft-float modules with double-float modules
/usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic_metadata.o
collect2: error: ld returned 1 exit status
ERROR: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/tools/BUILD:425:24: Linking tensorflow/python/tools/libaot_compiled_x_matmul_y_large_multithreaded.so failed: (Exit 1): gcc failed: error executing command
  (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PWD=/proc/self/cwd \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_x_matmul_y_large_multithreaded.so-2.params)
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
/usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large_multithreaded.o: can't link soft-float modules with double-float modules
/usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large_multithreaded.o
/usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large_multithreaded_metadata.o: can't link soft-float modules with double-float modules
/usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_matmul_y_large_multithreaded_metadata.o
collect2: error: ld returned 1 exit status
SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_vars_and_arithmetic_frozen [action 'Linking tensorflow/python/tools/libaot_compiled_vars_and_arithmetic_frozen.so', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform]
(cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PWD=/proc/self/cwd \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_vars_and_arithmetic_frozen.so-2.params)
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
ERROR: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/tools/BUILD:454:24: Linking tensorflow/python/tools/libaot_compiled_vars_and_arithmetic_frozen.so failed: (Exit 1): gcc failed: error executing command
  (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PWD=/proc/self/cwd \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_vars_and_arithmetic_frozen.so-2.params)
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
/usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic_frozen.o: can't link soft-float modules with double-float modules
/usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic_frozen.o
/usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic_frozen_metadata.o: can't link soft-float modules with double-float modules
/usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_vars_and_arithmetic_frozen_metadata.o
collect2: error: ld returned 1 exit status
SUBCOMMAND: # //tensorflow/python/tools:aot_compiled_x_plus_y [action 'Linking tensorflow/python/tools/libaot_compiled_x_plus_y.so', configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011, execution platform: @local_execution_config_platform//:platform]
(cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PWD=/proc/self/cwd \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_x_plus_y.so-2.params)
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
ERROR: /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/tensorflow/python/tools/BUILD:444:24: Linking tensorflow/python/tools/libaot_compiled_x_plus_y.so failed: (Exit 1): gcc failed: error executing command
  (cd /home/qinhongjie/workspace/python/tensorflow/tensorflow-2.13.1/workspace/500d26d538c5ffc885d39bfbc48895e5/execroot/org_tensorflow && \
  exec env - \
    PATH=/home/qinhongjie/workspace/python/bazel/docker_riscv64_ubuntu_2304_build/bazel-5.4.0-dist/output:/home/qinhongjie/workspace/python/py3.11.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
    PWD=/proc/self/cwd \
    PYTHON_BIN_PATH=/home/qinhongjie/workspace/python/py3.11.4/bin/python3 \
    PYTHON_LIB_PATH=/home/qinhongjie/workspace/python/py3.11.4/lib/python3.11/site-packages \
    TF2_BEHAVIOR=1 \
  /usr/bin/gcc @bazel-out/riscv64-opt/bin/tensorflow/python/tools/libaot_compiled_x_plus_y.so-2.params)
# Configuration: b9adde3946e925b4e6926db33202ec105f51d1559905b4face1463c049585011
# Execution platform: @local_execution_config_platform//:platform
/usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_plus_y.o: can't link soft-float modules with double-float modules
/usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_plus_y.o
/usr/bin/ld: bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_plus_y_metadata.o: can't link soft-float modules with double-float modules
/usr/bin/ld: failed to merge target specific data of file bazel-out/riscv64-opt/bin/tensorflow/python/tools/aot_compiled_x_plus_y_metadata.o
collect2: error: ld returned 1 exit status
INFO: Elapsed time: 6001.859s, Critical Path: 4360.34s
INFO: 12 processes: 7 internal, 5 local.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
```
