Skip to content

Commit

Permalink
Merge pull request #548 from Xilinx/bump_to_33337fc6
Browse files Browse the repository at this point in the history
[AutoBump] Merge with fixes of 33337fc (Jan 17) (155)
  • Loading branch information
mgehre-amd authored Feb 14, 2025
2 parents 6ae7af5 + 979a59b commit b088da1
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 19 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ jobs:
env:
CACHE_DIR: ${{ github.workspace }}/.container-cache
steps:
- name: Configure local git mirrors
run: |
# Our stock runners have access to certain local git caches. If these
# files are available, it will prime the cache and configure git to
# use them. Practically, this eliminates network/latency for cloning
# llvm.
if [[ -x /gitmirror/scripts/trigger_update_mirrors.sh ]]; then
/gitmirror/scripts/trigger_update_mirrors.sh
/gitmirror/scripts/git_config.sh
fi
- name: "Checking out repository"
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
Expand All @@ -55,11 +45,25 @@ jobs:
restore-keys: |
build-test-cpp-asserts-manylinux-${{ matrix.torch-version }}-v2-
- name: "Setting up Python"
run: |
sudo apt update
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt install python3.11 python3-pip -y
sudo apt-get install python3.11-dev python3.11-venv build-essential -y
- name: Install python deps (torch-${{ matrix.torch-version }})
run: |
export cache_dir="${{ env.CACHE_DIR }}"
bash build_tools/ci/install_python_deps.sh ${{ matrix.torch-version }}
- name: ccache
uses: hendrikmuhs/ccache-action@53911442209d5c18de8a31615e0923161e435875 # v1.2.16
with:
key: ${{ github.job }}-${{ matrix.torch-version }}
save: ${{ needs.setup.outputs.write-caches == 1 }}

- name: Build project
run: |
export cache_dir="${{ env.CACHE_DIR }}"
Expand Down
4 changes: 2 additions & 2 deletions build_tools/ci/build_posix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ echo "Caching to ${cache_dir}"
mkdir -p "${cache_dir}/ccache"
mkdir -p "${cache_dir}/pip"

python="$(which python)"
python="$(which python3)"
echo "Using python: $python"

export CMAKE_TOOLCHAIN_FILE="$this_dir/linux_default_toolchain.cmake"
Expand All @@ -40,7 +40,7 @@ echo "::group::CMake configure"
cmake -S "$repo_root/externals/llvm-project/llvm" -B "$build_dir" \
-GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DPython3_EXECUTABLE="$(which python)" \
-DPython3_EXECUTABLE="$(which python3)" \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DTORCH_MLIR_ENABLE_WERROR_FLAG=ON \
-DCMAKE_INSTALL_PREFIX="$install_dir" \
Expand Down
4 changes: 2 additions & 2 deletions build_tools/ci/install_python_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repo_root="$(cd $this_dir/../.. && pwd)"
torch_version="${1:-unknown}"

echo "::group::installing llvm python deps"
python -m pip install --no-cache-dir -r $repo_root/externals/llvm-project/mlir/python/requirements.txt
python3 -m pip install --no-cache-dir -r $repo_root/externals/llvm-project/mlir/python/requirements.txt
echo "::endgroup::"

case $torch_version in
Expand All @@ -30,5 +30,5 @@ case $torch_version in
esac

echo "::group::installing test requirements"
python -m pip install --no-cache-dir -r $repo_root/test-requirements.txt
python3 -m pip install --no-cache-dir -r $repo_root/test-requirements.txt
echo "::endgroup::"
6 changes: 3 additions & 3 deletions build_tools/ci/test_posix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ python -m e2e_testing.main --config=fx_importer_tosa -v
echo "::endgroup::"

echo "::group::Run ONNX e2e integration tests"
python -m e2e_testing.main --config=onnx -v
python3 -m e2e_testing.main --config=onnx -v
echo "::endgroup::"

case $torch_version in
Expand All @@ -27,13 +27,13 @@ case $torch_version in

# TODO: Need to verify in the stable version
echo "::group::Run FxImporter e2e integration tests"
python -m e2e_testing.main --config=fx_importer -v
python3 -m e2e_testing.main --config=fx_importer -v
echo "::endgroup::"

# AMD: Disabled stablehlo.
# TODO: Need to verify in the stable version
# echo "::group::Run FxImporter2Stablehlo e2e integration tests"
# python -m e2e_testing.main --config=fx_importer_stablehlo -v
# python3 -m e2e_testing.main --config=fx_importer_stablehlo -v
# echo "::endgroup::"
;;
stable)
Expand Down
2 changes: 1 addition & 1 deletion build_tools/update_abstract_interp_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fi
# To enable this python package, manually build torch_mlir with:
# -DTORCH_MLIR_ENABLE_JIT_IR_IMPORTER=ON
# TODO: move this package out of JIT_IR_IMPORTER.
PYTHONPATH="${pypath}" python \
PYTHONPATH="${pypath}" python3 \
-m torch_mlir.jit_ir_importer.build_tools.abstract_interp_lib_gen \
--pytorch_op_extensions=${ext_module:-""} \
--torch_transforms_cpp_dir="${torch_transforms_cpp_dir}"
2 changes: 1 addition & 1 deletion build_tools/update_torch_ods.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ set +u
# To enable this python package, manually build torch_mlir with:
# -DTORCH_MLIR_ENABLE_PYTORCH_EXTENSIONS=ON
# TODO: move this package out of JIT_IR_IMPORTER.
PYTHONPATH="${PYTHONPATH}:${pypath}" python \
PYTHONPATH="${PYTHONPATH}:${pypath}" python3 \
-m torch_mlir.jit_ir_importer.build_tools.torch_ods_gen \
--torch_ir_include_dir="${torch_ir_include_dir}" \
--pytorch_op_extensions="${ext_module}" \
Expand Down

0 comments on commit b088da1

Please sign in to comment.