Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
2cae070
[feature] Add support for extracting .tar.xz archives in dep.py (#8)
johnnynunez May 8, 2025
c3e8aa2
[llvm] Enhance LLVM installation logic for specific Linux architectur…
johnnynunez May 8, 2025
323026b
[fix] Update setup function to use Miniforge and correct download URL…
johnnynunez May 8, 2025
fb220b7
[build] Replace libtinfo-dev with libncurses-dev in package dependenc…
johnnynunez May 8, 2025
bc504cb
[fix] Update sccache download URLs to version 0.10.0 for various plat…
johnnynunez May 8, 2025
fde8884
[fix] Update platform detection for manylinux support on ARM architec…
johnnynunez May 8, 2025
998d76c
Vulkan (#2)
johnnynunez May 8, 2025
2efbff4
[update] Update hash values for various dependencies (#1)
johnnynunez May 8, 2025
c54bbd1
Vulkan (#9)
johnnynunez May 11, 2025
f4abba1
Merge branch 'taichi-dev:master' into master
johnnynunez Jun 9, 2025
c79a45d
fix
johnnynunez Jun 11, 2025
309f586
fix
johnnynunez Jun 11, 2025
9301aba
Update compiler.py
johnnynunez Jun 11, 2025
abf20a1
Update llvm.py
johnnynunez Jun 11, 2025
8a476be
Update llvm.py
johnnynunez Jun 11, 2025
a1cb73b
Update llvm.py
johnnynunez Jun 11, 2025
88eb2f0
Update check_clang_tidy.sh
johnnynunez Jun 11, 2025
1b3a244
Update llvm.py
johnnynunez Jun 11, 2025
091a8b7
Add IR dumping and loading functionality in LLVM codegen
johnnynunez Jun 11, 2025
c8efe96
Add constructor for ASTBuilder to initialize state
johnnynunez Jun 11, 2025
cf76d97
Refactor ASTBuilder constructor declaration for improved clarity
johnnynunez Jun 11, 2025
bf18da4
Remove unnecessary print statement from IRNode handling
johnnynunez Jun 11, 2025
ae44a22
Refactor CMakeLists.txt and improve IR dumping functionality in vario…
johnnynunez Jun 11, 2025
764f6bb
LLVM-20
johnnynunez Jun 11, 2025
c24757a
Update LLVM API calls in codegen_cuda.cpp for compatibility with rece…
johnnynunez Jun 11, 2025
11f240e
Add CHANGELOG.md to document recent updates and improvements
johnnynunez Jun 11, 2025
638564e
Update Vulkan setup to check for x86_64 architecture on Linux
johnnynunez Jun 11, 2025
68249bd
Fix include directive for IR analysis header in codegen_cuda.cpp
johnnynunez Jun 11, 2025
38625e8
Refactor JIT compilation in CUDA: update function pointers, enhance P…
johnnynunez Jun 11, 2025
a8805e2
Fix header include for PassBuilder in jit_cuda.cpp
johnnynunez Jun 11, 2025
1398853
Update header includes and fix LLVM API calls in CPU code generation
johnnynunez Jun 11, 2025
ebdc72b
Fix header include for program in codegen_cpu.cpp
johnnynunez Jun 11, 2025
abfb0e6
Fix header includes and update configuration access in JIT compilatio…
johnnynunez Jun 11, 2025
639e72e
Update CUDA header includes and fix call signatures in JIT compilation
johnnynunez Jun 11, 2025
e5fb056
Fix header includes and update LLVM API calls in CPU code generation
johnnynunez Jun 11, 2025
fa5d786
Update header includes and fix configuration access in JIT compilatio…
johnnynunez Jun 11, 2025
770116f
Update CMake configuration for Clang 20 and fix various header includes
johnnynunez Jun 11, 2025
f555a02
Fix formatting of user-defined literals in core.h
johnnynunez Jun 11, 2025
ff1a73e
Fix formatting issues in linalg.h and llvm_context.cpp, and update cl…
johnnynunez Jun 11, 2025
2fb13c4
Optimize assignment operator in VectorND by using memcpy
johnnynunez Jun 11, 2025
6e420d3
Update CHANGELOG.md to include recent formatting fixes and signature …
johnnynunez Jun 11, 2025
ce4f892
Refactor assignment operator in VectorND to use element-wise copy ins…
johnnynunez Jun 11, 2025
1022ff8
Update CHANGELOG.md with recent changes and clarify pointer type comp…
johnnynunez Jun 11, 2025
fb24569
Clarify pointer type compatibility in llvm_codegen_utils.cpp based on…
johnnynunez Jun 11, 2025
4534013
Enhance LLVM code generation by enforcing libc++ for Clang and updati…
johnnynunez Jun 11, 2025
41bc91b
Refactor CPU code generation by updating LLVM includes and optimizing…
johnnynunez Jun 11, 2025
c540e31
Refactor LLVM code generation to use PassBuilder and improve optimiza…
johnnynunez Jun 11, 2025
f55381a
Enable opaque pointers in LLVM and enforce libc++ for Clang in CMake …
johnnynunez Jun 11, 2025
f7ada20
Refactor CUDA code generation to use opaque pointers and update intri…
johnnynunez Jun 11, 2025
9d14023
Refactor LLVM code generation to use opaque pointers and clean up poi…
johnnynunez Jun 11, 2025
5449f72
Add error function (erf) and complement error function (erfc) to ops.py
johnnynunez Jun 11, 2025
52b972f
fix
johnnynunez Jun 11, 2025
3a0690c
compatible with blackwell
johnnynunez Jun 11, 2025
eec70ab
Refactor CMakeLists.txt for improved readability and organization; ad…
johnnynunez Jun 11, 2025
8ca16de
Update CUDA intrinsic load handling for LLVM 20 compatibility; adjust…
johnnynunez Jun 11, 2025
403d73c
Update intrinsic load handling in TaskCodeGenCUDA for LLVM compatibil…
johnnynunez Jun 11, 2025
5caa5db
Refactor intrinsic load handling in codegen_cuda.cpp for LLVM compati…
johnnynunez Jun 11, 2025
8dd3ff3
Update intrinsic load handling in codegen_cuda.cpp for improved data …
johnnynunez Jun 11, 2025
62fec58
Update intrinsic load handling in codegen_cuda.cpp to use CreateLoad …
johnnynunez Jun 11, 2025
074cf13
Refactor intrinsic load handling in codegen_cuda.cpp to replace nvvm.…
johnnynunez Jun 11, 2025
60112ac
Fix unused variable warning for Vulkan command buffer in gui.cpp
johnnynunez Jun 11, 2025
add2df3
Remove commented-out code related to opaque pointers in codegen_cuda.cpp
johnnynunez Jun 11, 2025
649c58d
Update entry.py
johnnynunez Jun 11, 2025
fc11f2e
Merge branch 'taichi-dev:master' into master
johnnynunez Jun 26, 2025
aafbcff
Merge branch 'taichi-dev:master' into master
johnnynunez Jun 27, 2025
48fe16c
Update Miniforge download URLs to version 25.3.0-3 for all platforms
johnnynunez Jul 1, 2025
6a6d508
Clean up code formatting and remove unnecessary comments across multi…
johnnynunez Jul 2, 2025
b21d29f
Update ospkg.py
johnnynunez Jul 2, 2025
24f6084
Update ospkg.py
johnnynunez Jul 2, 2025
963e0a6
Update ospkg.py
johnnynunez Jul 14, 2025
ae1275e
Update PythonNumpyPybind11.cmake
johnnynunez Jul 14, 2025
93c190f
Update ospkg.py
johnnynunez Jul 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 44 additions & 12 deletions .github/workflows/scripts/check_clang_tidy.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,46 @@
#!/bin/bash

# TODO: move inside docker
wget https://github.com/taichi-dev/taichi_assets/releases/download/llvm15/taichi-llvm-15-linux.zip
unzip taichi-llvm-15-linux.zip && rm taichi-llvm-15-linux.zip
export LLVM_DIR="$PWD/taichi-llvm-15"

pushd taichi
python3 -m pip install -r requirements_dev.txt

CI_SETUP_CMAKE_ARGS=$1
export CI_SETUP_CMAKE_ARGS
python3 ./scripts/run_clang_tidy.py $PWD/taichi -clang-tidy-binary clang-tidy-10 -header-filter=$PWD/taichi -j2
popd
# we need to generate a special file "compile_commands.json"
# to do this, we need to run cmake with the following options:
# -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
# I'm fairly sure that we don't need to run the actual build,
# but it's not obvious to me how to do this. So, I'm just going
# to run a full build for now, and we can FIXME this later.

set -ex

sudo apt-get update
sudo apt-get install -y clang-tidy-20
git submodule update --init --recursive

sudo apt install -y \
freeglut3-dev \
libglfw3-dev \
libglm-dev \
libglu1-mesa-dev \
libwayland-dev \
libx11-xcb-dev \
libxcb-dri3-dev \
libxcb-ewmh-dev \
libxcb-keysyms1-dev \
libxcb-randr0-dev \
libxcursor-dev \
libxi-dev \
libxinerama-dev \
libxrandr-dev \
pybind11-dev \
libc++-15-dev \
libc++abi-15-dev \
clang-15 \
libclang-common-15-dev \
libclang-cpp15 \
libclang1-15 \
cmake \
ninja-build \
python3-dev \
python3-pip

pip install scikit-build
export TAICHI_CMAKE_ARGS="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
./build.py wheel
python ./scripts/run_clang_tidy.py $PWD/taichi -clang-tidy-binary clang-tidy-14 -header-filter=$PWD/taichi -j2
2 changes: 1 addition & 1 deletion .github/workflows/scripts/ti_build/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def setup_clang(as_compiler=True) -> None:
"""
u = platform.uname()
if u.system == "Linux":
for v in ("", "-14", "-13", "-12", "-11", "-10"):
for v in ("", "-20", "-19", "-18", "-17", "-16", "-15", "-14", "-13", "-12", "-11", "-10"):
clang = shutil.which(f"clang{v}")
if clang is not None:
clangpp = shutil.which(f"clang++{v}")
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/scripts/ti_build/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,19 @@ def build_wheel(python: Command, pip: Command) -> None:
elif wheel_tag:
proj_tags.extend(["egg_info", f"--tag-build={wheel_tag}"])

if platform.system() == "Linux":
u = platform.uname()
if (u.system, u.machine) == ("Linux", "x86_64"):
if is_manylinux2014():
extra.extend(["-p", "manylinux2014_x86_64"])
else:
extra.extend(["-p", "manylinux_2_27_x86_64"])
elif (u.system, u.machine) in (("Linux", "arm64"), ("Linux", "aarch64")):
if is_manylinux2014():
extra.extend(["-p", "manylinux2014_aarch64"])
else:
extra.extend(["-p", "manylinux_2_27_aarch64"])
else:
extra.extend(["-p", "manylinux2014_x86_64"])

python("setup.py", "clean")
python("misc/make_changelog.py", "--ver", "origin/master", "--repo_dir", "./", "--save")
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/scripts/ti_build/llvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def setup_llvm() -> None:
Download and install LLVM.
"""
u = platform.uname()
if u.system == "Linux":
if (u.system, u.machine) == ("Linux", "x86_64"):
if cmake_args.get_effective("TI_WITH_AMDGPU"):
out = get_cache_home() / "llvm15-amdgpu-005"
url = "https://github.com/GaleSeLee/assets/releases/download/v0.0.5/taichi-llvm-15.0.0-linux.zip"
Expand All @@ -31,6 +31,11 @@ def setup_llvm() -> None:
out = get_cache_home() / "llvm15"
url = "https://github.com/taichi-dev/taichi_assets/releases/download/llvm15/taichi-llvm-15-linux.zip"
download_dep(url, out, strip=1)

elif (u.system, u.machine) in (("Linux", "arm64"), ("Linux", "aarch64")):
out = get_cache_home() / "llvm15-manylinux2014"
# FIXME: ARM LLVM!
pass
elif (u.system, u.machine) == ("Darwin", "arm64"):
out = get_cache_home() / "llvm15-m1-nozstd"
url = "https://github.com/taichi-dev/taichi_assets/releases/download/llvm15/taichi-llvm-15-m1-nozstd.zip"
Expand All @@ -48,4 +53,8 @@ def setup_llvm() -> None:

# We should use LLVM toolchains shipped with OS.
# path_prepend('PATH', out / 'bin')
os.environ["LLVM_DIR"] = str(out)
if (u.system, u.machine) not in (("Linux", "arm64"), ("Linux", "aarch64")):
os.environ["LLVM_DIR"] = str(out)
# os.environ["LLVM_DIR"] = "/usr/lib/llvm-20/cmake"
# os.environ["CUDA_HOME"] = "/usr/local/cuda"
# os.environ["CPATH"] = "/usr/local/cuda/include"
2 changes: 1 addition & 1 deletion .github/workflows/scripts/ti_build/ospkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"liblz4-dev",
"libpng-dev",
"libssl-dev",
"libtinfo-dev",
"libncurses-dev",
"libwayland-dev",
"libx11-xcb-dev",
"libxcb-dri3-dev",
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/scripts/ti_build/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,23 @@


# -- code --
def setup_mambaforge(prefix):
def setup_miniforge(prefix):
u = platform.uname()
if u.system == "Linux":
url = "https://github.com/conda-forge/miniforge/releases/download/23.1.0-1/Mambaforge-23.1.0-1-Linux-x86_64.sh"
if (u.system, u.machine) == ("Linux", "x86_64"):
url = "https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Linux-x86_64.sh"
download_dep(url, prefix, args=["-bfp", str(prefix)])
elif (u.system, u.machine) in (("Linux", "arm64"), ("Linux", "aarch64")):
url = "https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Linux-aarch64.sh"
download_dep(url, prefix, args=["-bfp", str(prefix)])
elif (u.system, u.machine) == ("Darwin", "arm64"):
url = "https://github.com/conda-forge/miniforge/releases/download/23.1.0-1/Mambaforge-23.1.0-1-MacOSX-arm64.sh"
url = "https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-MacOSX-arm64.sh"
download_dep(url, prefix, args=["-bfp", str(prefix)])
elif (u.system, u.machine) == ("Darwin", "x86_64"):
url = "https://github.com/conda-forge/miniforge/releases/download/23.1.0-1/Mambaforge-23.1.0-1-MacOSX-x86_64.sh"
url = "https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-MacOSX-x86_64.sh"
download_dep(url, prefix, args=["-bfp", str(prefix)])
elif u.system == "Windows":
url = (
"https://github.com/conda-forge/miniforge/releases/download/23.1.0-1/Mambaforge-23.1.0-1-Windows-x86_64.exe"
"https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Windows-x86_64.exe"
)
download_dep(
url,
Expand Down Expand Up @@ -82,8 +85,8 @@ def setup_python(version: str) -> Tuple[Command, Command]:

windows = platform.system() == "Windows"

prefix = get_cache_home() / "mambaforge"
setup_mambaforge(prefix)
prefix = get_cache_home() / "miniforge"
setup_miniforge(prefix)

if windows:
conda_path = prefix / "Scripts" / "conda.exe"
Expand All @@ -92,9 +95,9 @@ def setup_python(version: str) -> Tuple[Command, Command]:

if not conda_path.exists():
shutil.rmtree(prefix, ignore_errors=True)
setup_mambaforge(prefix)
setup_miniforge(prefix)
if not conda_path.exists():
raise RuntimeError(f"Failed to setup mambaforge at {prefix}")
raise RuntimeError(f"Failed to setup miniforge at {prefix}")

conda = sh.bake(str(conda_path))

Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/scripts/ti_build/sccache.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,16 @@ def setup_sccache() -> Command:
raise RuntimeError(f"Unsupported platform: {u.system} {u.machine}")

if not exe.exists():
if u.system == "Linux":
url = "https://github.com/mozilla/sccache/releases/download/v0.4.1/sccache-v0.4.1-x86_64-unknown-linux-musl.tar.gz"
if (u.system, u.machine) == ("Linux", "x86_64"):
url = "https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz"
elif (u.system, u.machine) in (("Linux", "arm64"), ("Linux", "aarch64")):
url = "https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-aarch64-unknown-linux-musl.tar.gz"
elif (u.system, u.machine) == ("Darwin", "arm64"):
url = (
"https://github.com/mozilla/sccache/releases/download/v0.4.1/sccache-v0.4.1-aarch64-apple-darwin.tar.gz"
)
url = "https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-aarch64-apple-darwin.tar.gz"
elif (u.system, u.machine) == ("Darwin", "x86_64"):
url = (
"https://github.com/mozilla/sccache/releases/download/v0.4.1/sccache-v0.4.1-x86_64-apple-darwin.tar.gz"
)
url = "https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-apple-darwin.tar.gz"
elif u.system == "Windows":
url = "https://github.com/mozilla/sccache/releases/download/v0.4.1/sccache-v0.4.1-x86_64-pc-windows-msvc.tar.gz"
url = "https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-pc-windows-msvc.tar.gz"
else:
raise RuntimeError(f"Unsupported platform: {u.system} {u.machine}")

Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/scripts/ti_build/vulkan.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,32 @@


# -- code --
@banner("Setup Vulkan 1.3.236.0")
@banner("Setup Vulkan 1.4.313.0")
def setup_vulkan():
u = platform.uname()
if u.system == "Linux":
url = "https://sdk.lunarg.com/sdk/download/1.3.236.0/linux/vulkansdk-linux-x86_64-1.3.236.0.tar.gz"
prefix = get_cache_home() / "vulkan-1.3.236.0"
if (u.system, u.machine) == ("Linux", "x86_64"):
url = "https://sdk.lunarg.com/sdk/download/1.4.313.0/linux/vulkansdk-linux-x86_64-1.4.313.0.tar.xz"
prefix = get_cache_home() / "vulkan-1.4.313.0"
download_dep(url, prefix, strip=1)
sdk = prefix / "x86_64"
os.environ["VULKAN_SDK"] = str(sdk)
path_prepend("PATH", sdk / "bin")
path_prepend("LD_LIBRARY_PATH", sdk / "lib")
os.environ["VK_LAYER_PATH"] = str(sdk / "etc" / "vulkan" / "explicit_layer.d")
elif (u.system, u.machine) in (("Linux", "arm64"), ("Linux", "aarch64")):
url = "https://github.com/johnnynunez/vulkan-sdk-arm/releases/download/1.4.313.0/vulkansdk-linux-arm64-ubuntu-24.04-arm-1.4.313.0.zip"
prefix = get_cache_home() / "vulkan-1.4.313.0"
download_dep(url, prefix, strip=1)
sdk = prefix / "arm64"
os.environ["VULKAN_SDK"] = str(sdk)
path_prepend("PATH", sdk / "bin")
path_prepend("LD_LIBRARY_PATH", sdk / "lib")
os.environ["VK_LAYER_PATH"] = str(sdk / "etc" / "vulkan" / "explicit_layer.d")
# elif (u.system, u.machine) == ("Darwin", "arm64"):
# elif (u.system, u.machine) == ("Darwin", "x86_64"):
elif (u.system, u.machine) == ("Windows", "AMD64"):
url = "https://sdk.lunarg.com/sdk/download/1.3.236.0/windows/VulkanSDK-1.3.236.0-Installer.exe"
prefix = get_cache_home() / "vulkan-1.3.236.0"
url = "https://sdk.lunarg.com/sdk/download/1.4.313.0/windows/VulkanSDK-1.4.313.0-Installer.exe"
prefix = get_cache_home() / "vulkan-1.4.313.0"
download_dep(
url,
prefix,
Expand Down
Loading
Loading