Skip to content

Conversation

@johnnynunez
Copy link
Contributor

This pull request includes several updates to the GitHub workflows and scripts to improve compatibility and functionality. The most important changes include updating action versions, adding support for Linux ARM builds, and modifying the build scripts for better platform compatibility.

Workflow Updates:

  • Updated actions/checkout to version 4 in multiple workflow files to ensure the latest features and fixes are used. (.github/workflows/build.yaml, .github/workflows/ghstack_land.yml, .github/workflows/initiator.yaml, .github/workflows/issue_comment.yml, .github/workflows/perf.yml, .github/workflows/pull_request.yml, .github/workflows/release.yml) [1] [2] [3] [4] [5] [6] [7]
  • Updated actions/setup-python to version 5 in multiple workflow files to maintain compatibility with the latest Python versions. (.github/workflows/build.yaml, .github/workflows/ghstack_land.yml, .github/workflows/pull_request.yml, .github/workflows/release.yml) [1] [2] [3] [4]

New Build Support:

  • Added a new job build_linux_arm64 to support building for Linux ARM architecture. This includes setting up the environment and matrix configurations for different build options. (.github/workflows/build.yaml)

Python Version Updates:

  • Updated the Python version matrix in initiator.yaml and release.yml to include newer versions (3.12 and 3.13) while removing older versions. (.github/workflows/initiator.yaml, .github/workflows/release.yml) [1] [2]

Script Enhancements:

  • Modified dep.py to handle .tar.xz files, improving the script's ability to manage different archive formats. (.github/workflows/scripts/ti_build/dep.py)
  • Updated entry.py and llvm.py to use is_manylinux_2_28 instead of is_manylinux2014, and added support for ARM architecture in the build process. (.github/workflows/scripts/ti_build/entry.py, .github/workflows/scripts/ti_build/llvm.py) [1] [2]

@johnnynunez
Copy link
Contributor Author

@feisuzhu this is separate python changes from #8646

@johnnynunez johnnynunez changed the title ARM Builds [Build] ARM Taichi Mar 5, 2025
@johnnynunez
Copy link
Contributor Author

johnnynunez commented Mar 5, 2025

@feisuzhu could you review and merge?

@bobcao3 bobcao3 changed the title [Build] ARM Taichi [ci] ARM Taichi Mar 6, 2025
@johnnynunez
Copy link
Contributor Author

@bobcao3 @hughperkins can you merge it?

@johnnynunez johnnynunez mentioned this pull request May 4, 2025
@johnnynunez
Copy link
Contributor Author

@feisuzhu review it :)

@bobcao3
Copy link
Collaborator

bobcao3 commented May 5, 2025

Hi, as you can see, the CI is failing. With so many changes in so many places it's hard to approve (and fix everything) in this PR, unless it's somehow magically fully correct which is super hard.

A few sticking points:

  • manylinux_2_28 & miniforge upgrade shouldn't be mixed with the other changes. We probably also need up upgrade the build host OS in the meantime.
  • Python version upgrade, is it required to for python 3.10 to be the minimum? PyTorch is still supporting 3.9 minimum it seems

@johnnynunez
Copy link
Contributor Author

Hi, as you can see, the CI is failing. With so many changes in so many places it's hard to approve (and fix everything) in this PR, unless it's somehow magically fully correct which is super hard.

A few sticking points:

  • manylinux_2_28 & miniforge upgrade shouldn't be mixed with the other changes. We probably also need up upgrade the build host OS in the meantime.
  • Python version upgrade, is it required to for python 3.10 to be the minimum? PyTorch is still supporting 3.9 minimum it seems

I will revert that changes, if you would like to help to merge this... @bobcao3 @hughperkins

@johnnynunez johnnynunez closed this May 7, 2025
@hughperkins
Copy link
Contributor

Hey! Whilst we wait for the merges to work through the system, do you want to create an integration branch for building/running on linux 24.04, arm, etc, that we can use? Maybe something like johnnynumez:develop ? Would be very useful to me 🙌

@johnnynunez
Copy link
Contributor Author

Hey! Whilst we wait for the merges to work through the system, do you want to create an integration branch for building/running on linux 24.04, arm, etc, that we can use? Maybe something like johnnynumez:develop ? Would be very useful to me 🙌

I’m using it on gh200 and jetson

@hughperkins
Copy link
Contributor

which branch?

@hughperkins
Copy link
Contributor

(Like, basically, I'm trying to install in a ubuntu 22.04 vm on Mac OS X, on Mac Silicon ARM64, and hitting a lot of the same issues that you've already solved :) If I can simply run from a branch you create, that contains all your fixes, that would be great :) 🙌 )

@hughperkins
Copy link
Contributor

(i.e. stuff like

:: RUN bash /home/hugh/.cache/ti-build-cache/deps/https___github.com_conda-forge_miniforge_releases_download_23.1.0-1_Mambaforge-23.1.0-1-Linux-x86_64.sh -bfp /home/hugh/.cache/ti-build-cache/mambaforge
PREFIX=/home/hugh/.cache/ti-build-cache/mambaforge
Unpacking payload ...
/home/hugh/.cache/ti-build-cache/deps/https___github.com_conda-forge_miniforge_releases_download_23.1.0-1_Mambaforge-23.1.0-1-Linux-x86_64.sh: line 311: /home/hugh/.cache/ti-build-cache/mambaforge/conda.exe: cannot execute binary file: Exec format error
``` )

@johnnynunez
Copy link
Contributor Author

johnnynunez commented May 9, 2025

(Like, basically, I'm trying to install in a ubuntu 22.04 vm on Mac OS X, on Mac Silicon ARM64, and hitting a lot of the same issues that you've already solved :) If I can simply run from a branch you create, that contains all your fixes, that would be great :) 🙌 )

it is is in my main fork, for ARM, you need to merge all branches that I splitted.

Also you have to do the same with macos ARM

Why?
My PR is focused on linux arm (aarch64)

@hughperkins
Copy link
Contributor

So, I think we need two things:

  • lots of tiny branches, for PR purposes (you've created these 🙌 )
  • a single integration branch, that we can use to run from, in the meantime (you used to have this, but it looks like you have deleted it 😅 e.g. https://github.com/johnnynunez/taichi/tree/arm gives me '404' error)

For creating a single integration branch, I'm happy to create that, but maybe interesting for you to create, and maintain, such a branch?

@hughperkins
Copy link
Contributor

Oh, maybe I should use your master branch?

Screenshot 2025-05-09 at 4 30 03 AM

@hughperkins
Copy link
Contributor

Your master branch worked great for me 🙌

@johnnynunez
Copy link
Contributor Author

Oh, maybe I should use your master branch?

Screenshot 2025-05-09 at 4 30 03 AM

yess

@hughperkins
Copy link
Contributor

Note: I get the following on your master:

Getting LLVM_DIR=/home/hugh/.cache/ti-build-cache/llvm15-manylinux2014 from the environment variable
CMake Error at /home/hugh/.cache/ti-build-cache/vulkan-1.4.313.0/x86_64/share/llvm/cmake/LLVMExports.cmake:302 (message):
  The imported target "LLVMDxilHash" references the file

     "/home/hugh/.cache/ti-build-cache/vulkan-1.4.313.0/x86_64/lib/libLLVMDxilHash.a"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/home/hugh/.cache/ti-build-cache/vulkan-1.4.313.0/x86_64/share/llvm/cmake/LLVMExports.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /home/hugh/.cache/ti-build-cache/vulkan-1.4.313.0/x86_64/share/llvm/cmake/LLVMConfig.cmake:93 (include)
  cmake/TaichiCore.cmake:155 (find_package)
  CMakeLists.txt:133 (include)

And checking my system:

  • /home/hugh/.cache/ti-build-cache/llvm15-manylinux2014 does not exist for me.
  • llvm15 does

For now, what I've done is revert merging from your master, and instead merged from the following two specific branches, to give me arm support:

(My integration branch for my arm linux build is https://github.com/hughperkins/taichi/commits/hp/linux-develop/ , by the way)

@hughperkins
Copy link
Contributor

Hi Johnny, did you encounter the following issue? How did you fix it?

[101/264] cd /home/hugh/git/taichi/taichi/runtime/llvm/runtime_module && /usr/bin/...eptions -emit-llvm -std=c++17 -D ARCH_cuda -I /home/hugh/git/taichi -stdlib=libc++
FAILED: taichi/runtime/llvm/runtime_module/CMakeFiles/generate_llvm_runtime_cuda /home/hugh/git/taichi/_skbuild/linux-aarch64-3.10/cmake-build/taichi/runtime/llvm/runt
ime_module/CMakeFiles/generate_llvm_runtime_cuda
cd /home/hugh/git/taichi/taichi/runtime/llvm/runtime_module && /usr/bin/clang-15 -c runtime.cpp -o runtime_cuda.bc -fno-exceptions -emit-llvm -std=c++17 -D ARCH_cuda -
I /home/hugh/git/taichi -stdlib=libc++
runtime.cpp:1147:23: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
               : "=r"(ret)
                      ^
runtime.cpp:1146:37: note: use constraint modifier "w"
  asm volatile("match.all.sync.b32  %0, %1, %2;"
                                    ^~
                                    %w0
runtime.cpp:1148:22: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
               : "r"(value), "r"(mask));
                     ^
runtime.cpp:1146:41: note: use constraint modifier "w"
  asm volatile("match.all.sync.b32  %0, %1, %2;"
                                        ^~
                                        %w1
runtime.cpp:1148:34: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
               : "r"(value), "r"(mask));
                                 ^
runtime.cpp:1146:45: note: use constraint modifier "w"
  asm volatile("match.all.sync.b32  %0, %1, %2;"
                                            ^~
                                            %w2
runtime.cpp:1160:18: error: invalid input constraint 'l' in asm
               : "l"(value), "r"(mask));
                 ^

@hughperkins
Copy link
Contributor

(Oh, maybe because I'm on a system without cuda toolkit perhaps?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants