Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] onnxruntime build fails on ordino xu4 #18114

Closed
DefinitiveIch opened this issue Oct 26, 2023 · 4 comments
Closed

[Build] onnxruntime build fails on ordino xu4 #18114

DefinitiveIch opened this issue Oct 26, 2023 · 4 comments
Labels
build build issues; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot

Comments

@DefinitiveIch
Copy link

DefinitiveIch commented Oct 26, 2023

Describe the issue

When I try to build onnxruntime on the ordino xu4 I get an error running the following command:

./build.sh --config MinSizeRel --update --build

Urgency

No response

Target platform

Ubuntu 22.04.3 LTS

Build script

pip3 install --upgrade pip
pip3 install --upgrade setuptools
pip3 install --upgrade wheel
pip3 install numpy

Build the latest cmake

mkdir /code
cd /code
wget https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4.tar.gz
tar zxf cmake-3.26.4.tar.gz

cd /code/cmake-3.26.4
./configure --system-curl
make
sudo make install

Prepare onnxruntime Repo

cd /code
git clone --recursive https://github.com/Microsoft/onnxruntime.git

Start the basic build

cd /code/onnxruntime
./build.sh --config MinSizeRel --update --build

Build Shared Library

./build.sh --config MinSizeRel --build_shared_lib

Build Python Bindings and Wheel

./build.sh --config MinSizeRel --enable_pybind --build_wheel

Build Output

ls -l /code/onnxruntime/build/Linux/MinSizeRel/.so
ls -l /code/onnxruntime/build/Linux/MinSizeRel/dist/
.whl

Error / output

/mnt/onnxruntime/build/Linux/MinSizeRel/_deps/eigen-src/Eigen/src/SparseCore/CompressedStorage.h:93:80: error: overflow in conversion from long long int to int changes value from 9223372036854775807 to -1 [-Werror=overflow]
   93 |         Index realloc_size = (std::min<Index>)(NumTraits<StorageIndex>::highest(),  size + Index(reserveSizeFactor*double(size)));
      |                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /mnt/onnxruntime/include/onnxruntime/core/framework/sparse_tensor.h:9,
                 from /mnt/onnxruntime/onnxruntime/contrib_ops/cpu/math/sparse_dense_matmul.cc:6:
/mnt/onnxruntime/include/onnxruntime/core/framework/tensor_shape.h: In member function virtual onnxruntime::common::Status onnxruntime::contrib::SparseToDenseMatMul::Compute(onnxruntime::OpKernelContext*) const:
/mnt/onnxruntime/include/onnxruntime/core/framework/tensor_shape.h:86:106: note: parameter passing for argument of type gsl::span<const long long int> changed in GCC 7.1
   86 |   TensorShape(std::initializer_list<int64_t> dims) : TensorShape(gsl::make_span(dims.begin(), dims.end())) {}
      |                 

Visual Studio Version

No response

GCC / Compiler Version

11.4.0

@DefinitiveIch DefinitiveIch added the build build issues; typically submitted using template label Oct 26, 2023
@RyanUnderhill
Copy link
Member

This might explain our issue: https://gitlab.com/libeigen/eigen/-/issues/2517
"Setting Eigen::Index to 32-bit does not appear to work with using a StorageIndex type that's 64-bit."

Can you give more context on the build error? What file is including this, etc?

@DefinitiveIch
Copy link
Author

Sorry the close was a miss click.
I updated the error message.

Copy link
Contributor

This issue has been automatically marked as stale due to inactivity and will be closed in 7 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

@github-actions github-actions bot added the stale issues that have not been addressed in a while; categorized by a bot label Nov 26, 2023
Copy link
Contributor

github-actions bot commented Jan 3, 2024

This issue has been automatically closed due to inactivity. Please reactivate if further support is needed.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot
Projects
None yet
Development

No branches or pull requests

2 participants