BladeDISC icon indicating copy to clipboard operation
BladeDISC copied to clipboard

meet error when build_from_source_code

Open alanguo1234 opened this issue 2 years ago • 1 comments

hi I update the source code(commit Id: f6505c46b38f132af54fb5b39), and do it as below steps:

  1. docker run --rm -it -v $PWD:/disc bladedisc/bladedisc:latest-devel-cuda11.0 bash
  2. config the env as belows:

export PATH=/root/.bazel/bin/:$PATH export TORCH_BLADE_BUILD_WITH_CUDA_SUPPORT=OFF export TORCH_BLADE_USE_PLATFORM_ALIBABA=OFF export TORCH_BLADE_CI_BUILD_TORCH_VERSION=1.12.0+cpu

  1. cd pytorch_blade && bash ./scripts/build_pytorch_blade.sh
  2. error log:

Loading: Loading: 0 packages loaded ERROR: error loading package '': Label '@torch-mlir-importer//utils/bazel:configure.bzl' is invalid because 'utils/bazel' is not a package; perhaps you meant to put the colon here: '@torch-mlir-importer//:utils/bazel/configure.bzl'? INFO: Elapsed time: 0.148s INFO: 0 processes. FAILED: Build did NOT complete successfully (0 packages loaded) ERROR: Couldn't start the build. Unable to run tests FAILED: Build did NOT complete successfully (0 packages loaded) Traceback (most recent call last): File "setup.py", line 151, in setup( File "/usr/lib/python3/dist-packages/setuptools/init.py", line 129, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "setup.py", line 107, in run self.cpp_run() File "setup.py", line 91, in cpp_run build.test() File "/disc/pytorch_blade/bazel_build.py", line 282, in test subprocess.check_call(test_cmd, shell=True, env=env, executable="/bin/bash") File "/usr/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command 'set -e; set -o pipefail; source .bazel_pyenv/bin/activate; bazel test --action_env PYTHON_BIN_PATH=/usr/bin/python3 --action_env BAZEL_LINKLIBS=-lstdc++ --action_env CC=/usr/bin/gcc --action_env CXX=/usr/bin/g++ --action_env DISC_FOREIGN_MAKE_JOBS=32 --copt=-DPYTORCH_VERSION_STRING="1.12.0+cpu" --copt=-DPYTORCH_MAJOR_VERSION=1 --copt=-DPYTORCH_MINOR_VERSION=12 --copt=-DTORCH_BLADE_CUDA_VERSION=None --action_env TORCH_BLADE_TORCH_INSTALL_PATH=/usr/local/lib/python3.8/dist-packages/torch --copt=-DPYBIND11_COMPILER_TYPE="_gcc" --copt=-DPYBIND11_STDLIB="_libstdcpp" --copt=-DPYBIND11_BUILD_ABI="_cxxabi1013" --config=torch_ltc_disc_backend --config=torch_debug --config=torch_enable_quantization --config=torch_cxx11abi_0 --config=torch_x86 //tests/mhlo/... //pytorch_blade:torch_blade_test_suite //tests/torch-disc-pdll/tests/... //tests/torchscript/...' returned non-zero exit status 1.

alanguo1234 avatar Feb 17 '23 07:02 alanguo1234

hi,did you update all submodules of bladedisc repo like following?

git submodule update --init --recursive

wyzero avatar Feb 17 '23 07:02 wyzero