Skip to content

Commit

Permalink
[Draft] Update LLVM version to debug a building issue
Browse files Browse the repository at this point in the history
This draft PR is trying to find the culprit of the building issue we currently have when we try to update llvm. We are bisecting between 2 versions.
  • Loading branch information
karupayun committed Aug 6, 2024
1 parent 9267087 commit 61665fd
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/llvm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,6 @@ jobs:
mkdir -p ${{ env.SCCACHE_DIR }}
rm -rf ${{ env.SCCACHE_DIR }}/*
- name: Enable Cache
uses: actions/cache@v4
with:
path: ${{ env.SCCACHE_DIR }}
key: ${{ matrix.config.target-os }}-${{ matrix.config.arch }}-${{ env.short_llvm_commit_hash }}
restore-keys: ${{ matrix.config.target-os }}-${{ matrix.config.arch }}-

- name: Configure, Build, Test, and Install LLVM (Ubuntu and macOS x64)
if: matrix.config.arch == 'x64' && (matrix.config.target-os == 'ubuntu' || matrix.config.target-os == 'macos')
run: >
Expand All @@ -107,6 +100,7 @@ jobs:
-DLLVM_INSTALL_UTILS=ON
-DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU"
-DLLVM_ENABLE_TERMINFO=OFF
-DLLVM_ENABLE_ABI_BREAKING_CHECKS=0
llvm-project/llvm
ninja -C llvm-project/build check-mlir install
Expand All @@ -130,6 +124,7 @@ jobs:
-DLLVM_INSTALL_UTILS=ON
-DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU"
-DLLVM_ENABLE_TERMINFO=OFF
-DLLVM_ENABLE_ABI_BREAKING_CHECKS=0
llvm-project/llvm
ninja -C llvm-project/build check-mlir install
Expand Down Expand Up @@ -175,6 +170,7 @@ jobs:
-DCMAKE_LINKER=$LINKER \
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
-DLLVM_ENABLE_ZSTD=OFF \
-DLLVM_ENABLE_ABI_BREAKING_CHECKS=0 \
-DLLVM_INSTALL_UTILS=ON \
-DCMAKE_INSTALL_PREFIX="${{ env.llvm_install_dir }}" \
-DLLVM_TARGETS_TO_BUILD="AArch64;NVPTX;AMDGPU" \
Expand Down Expand Up @@ -225,6 +221,7 @@ jobs:
-DLLVM_TARGETS_TO_BUILD="AArch64;NVPTX;AMDGPU"
-DLLVM_USE_HOST_TOOLS=ON
-DLLVM_ENABLE_TERMINFO=OFF
-DLLVM_ENABLE_ABI_BREAKING_CHECKS=0
llvm-project/llvm
ninja -C llvm-project/build install
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/llvm-build/almalinux.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ RUN cmake -GNinja -Bbuild \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_ENABLE_ABI_BREAKING_CHECKS=0 \
-DLLVM_TARGETS_TO_BUILD="host;NVPTX;AMDGPU" \
/source/llvm-project/llvm

Expand Down
2 changes: 1 addition & 1 deletion cmake/llvm-hash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1a9acd786d493b00c08d1611f51420d421b74cf1
ce80c80dca45c7b4636a3e143973e2c6cbdb2884
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def build_extension(self, ext):
"-G", "Ninja", # Ninja is much faster than make
"-DCMAKE_MAKE_PROGRAM=" +
ninja_dir, # Pass explicit path to ninja otherwise cmake may cache a temporary path
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON", "-DLLVM_ENABLE_WERROR=ON",
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON", "-DLLVM_ENABLE_WERROR=ON", "-DLLVM_ENABLE_ABI_BREAKING_CHECKS=0",
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=" + extdir, "-DTRITON_BUILD_TUTORIALS=OFF",
"-DTRITON_BUILD_PYTHON_MODULE=ON", "-DPython3_EXECUTABLE:FILEPATH=" + sys.executable,
"-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON", "-DPYTHON_INCLUDE_DIRS=" + python_include_dir,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class CallOpConversion : public mlir::RewritePattern {
auto operands = callOp.getOperands();
auto result = callOp.getResult();

LLVM::LLVMFunctionType calleeType = callOp.getCalleeFunctionType();
LLVM::LLVMFunctionType calleeType = callOp.getCalleeType().value();
Type returnType = calleeType.getReturnType();

auto loc = callOp.getLoc();
Expand Down
4 changes: 3 additions & 1 deletion third_party/amd/python/triton_amd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ void init_triton_amd(py::module &&m) {
target->createMCAsmBackend(*sti, *mri, mcOptions));
mcStreamer.reset(target->createMCObjectStreamer(
triple, ctx, std::move(mab), mab->createObjectWriter(svos),
std::move(ce), *sti));
std::move(ce), *sti, mcOptions.MCRelaxAll,
mcOptions.MCIncrementalLinkerCompatible,
/*DWARFMustBeAtTheEnd=*/false));

std::unique_ptr<llvm::MCAsmParser> parser(
createMCAsmParser(srcMgr, ctx, *mcStreamer, *mai));
Expand Down

0 comments on commit 61665fd

Please sign in to comment.