-
Notifications
You must be signed in to change notification settings - Fork 439
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
[Question] why the latest snapshot build is in January? #3068
Comments
We don't do release builds in this repo anymore. Was a spy chain security thing. A community member has been running then in a sibling repo with more security: https://github.com/llvm/torch-mlir-release We need to update docs and haven't. Many of the users are leveraging torch-mlir as a library not from a community binary. |
I can't really comment on the rest without details of the errors/issues. In general for most of that stuff, we just want what torch brings with it. |
Source: llvm#3068 (comment) Verified commands locally on Ubuntu 22.04 with pyenv virtualenv created for python 3.11.
Thanks @stellaraccident, I can now reuse pre-built wheels.
In meanwhile, I was building torch-mlir from source. my torch-mlir install script:[[ -f ~/commons.sh ]] && source ~/commons.sh
declare -f enable_pyenv &>/dev/null && enable_pyenv
pyenv activate torch_mlir
TOP_DIR=$(pwd)/build
mkdir -p build && cd build
if [[ ! -d torch-mlir ]]; then
git clone --single-branch https://github.com/llvm/torch-mlir
fi
cd torch-mlir
git submodule update --init --progress --depth=1
python -m pip install --upgrade pip
# Install latest PyTorch nightlies and build requirements.
python -m pip install -r requirements.txt
python -m pip install -r torchvision-requirements.txt
# torchvision seem to be compile against numpy 1.X
# python -m pip install numpy==1.26 <<< SEE HERE
mkdir -p build
if [[ ! -f build/build.ninja ]]; then
cmake -GNinja -Bbuild \
-DCMAKE_BUILD_TYPE=Debug \
-DPython3_FIND_VIRTUALENV=ONLY \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_EXTERNAL_PROJECTS="torch-mlir" \
-DLLVM_EXTERNAL_TORCH_MLIR_SOURCE_DIR="$PWD" \
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
-DLLVM_TARGETS_TO_BUILD=host \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \
externals/llvm-project/llvm
fi
export PYTHONPATH=`pwd`/build/tools/torch-mlir/python_packages/torch_mlir:\
`pwd`/test/python/fx_importer:$PYTHONPATH
export PATH=`pwd`/build/bin:$PATH
cd $TOP_DIR/.. When I run: python test/python/fx_importer/sparse_test.py I get error:
Things are okay when I explicitly install numpy 1.x as suggested. But it would be great to have it pinned in build-requirements.txt. detailed error:test_sparse_sum --------------- /torch-mlir/test/python/fx_importer/sparse_test.py:215: UserWarning: Sparse CSR tensor support is in beta state. If you miss a functionality in the sparse tensor support, please submit a feature request to https://github.com/pytorch/pytorch/issues. (Triggered internally at ../aten/src/ATen/SparseCsrTensorImpl.cpp:53.) sparse_input = dense_input.to_sparse_csr()A module that was compiled using NumPy 1.x cannot be run in If you are a user of the module, the easiest solution will be to Traceback (most recent call last): File "/torch-mlir/test/python/fx_importer/sparse_test.py", line 192, in Traceback (most recent call last): |
Source: #3068 (comment) Verified commands locally on Ubuntu 22.04 with pyenv virtualenv created for python 3.11.
After installing latest snapshot build from releases, I was trying to run https://github.com/llvm/torch-mlir/blob/main/test/python/fx_importer/sparse_test.py but it was giving me error.
I was wondering why there are no newer snapshot builds in releases?
cc: @stellaraccident because they seem to have release the last build.
Also does it make sense to pin numpy at 1.26 in https://github.com/llvm/torch-mlir/blob/main/build-requirements.txt? (I got error while running above example with in tree build with suggested cmake options that two numpy versions are used in two different projects.
The text was updated successfully, but these errors were encountered: