Skip to content
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

[AIE][CI] Accelerate CI #14

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions .github/workflows/amd-aie-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
name: Test llvm,clang
uses: ./.github/workflows/llvm-project-tests.yml
with:
build_target: check-all
projects: clang;clang-tools-extra;lld
build_target: check-llvm-aie check-clang-aie check-lld-aie
projects: clang;lld
cache-key: amd-aie
extra_cmake_args: '-DLLVM_USE_LINKER=gold -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="AIE" -DLLVM_TARGETS_TO_BUILD="host" -DLIBC_ENABLE_USE_BY_CLANG=ON -DLLVM_ENABLE_RUNTIMES="compiler-rt;libc" -DLLVM_BUILTIN_TARGETS="aie2-none-unknown-elf;aie-none-unknown-elf" -DLLVM_RUNTIME_TARGETS="aie-none-unknown-elf;aie2-none-unknown-elf" -DBUILTINS_aie-none-unknown-elf_LLVM_USE_LINKER=lld -DBUILTINS_aie-none-unknown-elf_CMAKE_BUILD_TYPE=Release -DRUNTIMES_aie-none-unknown-elf_LLVM_USE_LINKER=lld -DRUNTIMES_aie-none-unknown-elf_CMAKE_BUILD_TYPE=Release -DBUILTINS_aie2-none-unknown-elf_LLVM_USE_LINKER=lld -DBUILTINS_aie2-none-unknown-elf_CMAKE_BUILD_TYPE=Release -DRUNTIMES_aie2-none-unknown-elf_LLVM_USE_LINKER=lld -DRUNTIMES_aie2-none-unknown-elf_CMAKE_BUILD_TYPE=Release -DLLVM_LIBC_FULL_BUILD=ON'
os_list: '["ubuntu-latest"]'
1 change: 1 addition & 0 deletions .github/workflows/amd-upstream-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
with:
build_target: check-all
projects: clang
cache-key: amd-upstream
extra_cmake_args: '-DLLVM_USE_LINKER=gold -DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64;AMDGPU"'
os_list: '["ubuntu-latest", "windows-2019"]'

Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/llvm-project-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ permissions:
on:
workflow_dispatch:
inputs:
cache-key:
required: false
default: 'sccache'
build_target:
required: false
projects:
Expand All @@ -17,6 +20,11 @@ on:
default: '["ubuntu-latest", "windows-2019", "macOS-11"]'
workflow_call:
inputs:
cache-key:
required: false
type: string
default: 'sccache'

build_target:
required: true
type: string
Expand Down Expand Up @@ -86,8 +94,8 @@ jobs:
# run creates a new cache entry so we want to ensure that we have
# enough cache space for all the tests to run at once and still
# fit under the 10 GB limit.
max-size: 500M
key: sccache-${{ matrix.os }}
max-size: 1.5G
key: ${{ inputs.cache-key }}-${{ matrix.os }}
variant: sccache
- name: Build and Test
uses: llvm/actions/build-test-llvm-project@main
Expand Down
9 changes: 9 additions & 0 deletions clang/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,12 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/debuginfo-tests)
add_subdirectory(debuginfo-tests)
endif()
endif()


add_custom_target(check-clang-aie)
add_dependencies(check-clang-aie
check-clang-codegen-aie
check-clang-misc
check-clang-preprocessor
check-clang-driver-aie
)
6 changes: 3 additions & 3 deletions clang/test/CodeGen/aie/aie-builtins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
//===----------------------------------------------------------------------===//
// RUN: %clang -O2 -ffast-math --target=aie-none-elf %s -S -o %t
// RUN: cat %t | FileCheck %s
// RUN: %clang -O2 -ffast-math --target=aie-none-elf %s -o %t.o
// RUN: llvm-objdump -dr --triple=aie %t.o | FileCheck %s --check-prefix=CHECK-LINK

// We should automatically link against the builtins.
// Note that this doesn't actually test linking against the builtins, since
// we don't necessarily have a good way to require that the runtimes are actually
// compiled.

#include<stdint.h>

Expand Down
5 changes: 5 additions & 0 deletions lld/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,8 @@ add_subdirectory(MinGW)
add_subdirectory(wasm)

add_subdirectory(cmake/modules)

add_custom_target(check-lld-aie)
add_dependencies(check-lld-aie
check-lld-elf-aie
)
13 changes: 13 additions & 0 deletions llvm/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,16 @@ add_lit_testsuites(LLVM ${CMAKE_CURRENT_SOURCE_DIR}
add_custom_target(check)
add_dependencies(check check-all)
set_target_properties(check PROPERTIES FOLDER "Tests")


add_custom_target(check-llvm-aie)
add_dependencies(check-llvm-aie
check-llvm-codegen-aie
check-llvm-codegen-mir-aie
check-llvm-mc-aie
check-llvm-object-aie
Comment on lines +261 to +264
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these somehow automatically generated CMake targets? I don't see them anywhere (or any substring) in the code base?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I guess they are

build_target: check-llvm-codegen-spirv

which doesn't appear anywhere either but presumably is a valid target.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, cmake generates a directory for each target. There are 2 add_lit_testsuite() commands, one which only does the local stuff and one which generates the subdirectory targets.

check-llvm-tablegen
check-llvm-transforms-hardwareloops-aie
check-llvm-transforms-simplifycfg-aie
check-llvm-tools-updatetestchecks
check-llvm-tools-llvm-dwarfdump-aie)
Loading