forked from ROCm/ROCR-Runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f505444
commit 9191877
Showing
8 changed files
with
1,878 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
name: CI Linux | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
pull_request: | ||
merge_group: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
# A PR number if a pull request and otherwise the commit hash. This cancels | ||
# queued and in-progress runs for the same PR (presubmit) or commit | ||
# (postsubmit). | ||
group: ci-build-test-cpp-linux-${{ github.event.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build (linux) | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
runs-on: | ||
- ubuntu-22.04 | ||
# - nod-ai-shared-cpubuilder-manylinux-x86_64 | ||
runs-on: ${{ matrix.runs-on }} | ||
steps: | ||
- name: Install tmate | ||
if: ${{ matrix.runs-on == 'nod-ai-shared-cpubuilder-manylinux-x86_64' }} | ||
run: dnf install -y epel-release && dnf install -y tmate | ||
|
||
- name: Configure local git mirrors | ||
if: ${{ matrix.runs-on == 'nod-ai-shared-cpubuilder-manylinux-x86_64' }} | ||
run: | | ||
/gitmirror/scripts/trigger_update_mirrors.sh | ||
/gitmirror/scripts/git_config.sh | ||
- name: Install deps | ||
if: ${{ matrix.runs-on == 'nod-ai-shared-cpubuilder-manylinux-x86_64' }} | ||
run: | | ||
dnf install -y almalinux-release-devel | ||
yum install -y elfutils-libelf-devel p7zip p7zip-plugins | ||
- name: Install deps | ||
if: ${{ matrix.runs-on == 'ubuntu-22.04' }} | ||
run: | | ||
sudo apt install -y libelf-dev libnuma-dev libdrm-dev | ||
- name: Setup Cpp | ||
if: ${{ matrix.runs-on == 'ubuntu-22.04' }} | ||
uses: aminya/setup-cpp@v1 | ||
with: | ||
compiler: llvm-18 | ||
cmake: true | ||
ninja: true | ||
ccache: true | ||
|
||
- name: "Checking out repository" | ||
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Build and install libnuma | ||
if: ${{ matrix.runs-on == 'nod-ai-shared-cpubuilder-manylinux-x86_64' }} | ||
run: | | ||
curl --silent -L \ | ||
https://github.com/numactl/numactl/releases/download/v2.0.18/numactl-2.0.18.tar.gz \ | ||
-o numactl-2.0.18.tar.gz | ||
tar -xf numactl-2.0.18.tar.gz | ||
pushd numactl-2.0.18 | ||
./configure | ||
make install | ||
popd | ||
- name: Hack ROCR | ||
run: | | ||
sed -i 's/amdgcn-amd-amdhsa/amdgcn-amd-amdhsa -nogpulib/g' runtime/hsa-runtime/core/runtime/blit_shaders/CMakeLists.txt | ||
sed -i 's/amdgcn-amd-amdhsa/amdgcn-amd-amdhsa -nogpulib/g' runtime/hsa-runtime/core/runtime/trap_handler/CMakeLists.txt | ||
sed -i 's/amdgcn-amd-amdhsa/amdgcn-amd-amdhsa -nogpulib/g' runtime/hsa-runtime/image/blit_src/CMakeLists.txt | ||
- name: Build ROCR distro | ||
run: | | ||
rocr_dir="$(cd ${{ github.workspace }} && pwd)" | ||
build_rocr_dir="${{ github.workspace }}/rocr-build" | ||
mkdir -p "$build_rocr_dir" | ||
build_rocr_dir="$(cd $build_rocr_dir && pwd)" | ||
rocr_install_dir="${{ github.workspace }}/rocr-install" | ||
cmake -GNinja \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX="$rocr_install_dir" \ | ||
-DClang_DIR=/usr/lib/llvm-18/lib/cmake/clang \ | ||
-DLLVM_DIR=/usr/lib/llvm-18/lib/cmake/llvm \ | ||
-DIMAGE_SUPPORT=OFF \ | ||
-S "$rocr_dir" -B "$build_rocr_dir" | ||
cmake --build "$build_rocr_dir" --target install | ||
tar -cf rocr-$(git rev-parse --short HEAD).tar rocr-install | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: ${{ !cancelled() }} | ||
with: | ||
name: linux_x86_64_distro | ||
path: rocr-*.tar | ||
if-no-files-found: warn | ||
|
||
- name: Setup tmate session | ||
if: ${{ failure() }} | ||
uses: mxschmitt/[email protected] | ||
with: | ||
limit-access-to-actor: true | ||
install-dependencies: ${{ matrix.runs-on == 'ubuntu-22.04' }} | ||
|
||
test_aie: | ||
name: AIE tests | ||
needs: build | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
runs-on: [linux-phoenix] | ||
runs-on: ${{ matrix.runs-on }} | ||
steps: | ||
- name: "Checking out repository" | ||
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 | ||
|
||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: linux_x86_64_distro | ||
|
||
- name: Extract artifact | ||
run: | | ||
tar -xf rocr-*.tar | ||
echo hsa_runtime64_ROOT="$PWD/rocr-install" >> $GITHUB_ENV | ||
- name: Build and run AIE smoke test | ||
run: | | ||
pushd rocrtst/suites/aie | ||
build_dir="$PWD/build" | ||
mkdir -p $build_dir | ||
cmake -GNinja \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
"-Dhsa-runtime64_DIR=$hsa_runtime64_ROOT/lib/cmake/hsa-runtime64" \ | ||
-S "$PWD" -B "$build_dir" | ||
cmake --build "$build_dir" --target aie_hsa_bare_add_one | ||
"$build_dir"/aie_hsa_bare_add_one $PWD | ||
popd | ||
- name: Build AIE test suite | ||
run: | | ||
pushd rocrtst/suites/aie | ||
build_dir="$PWD/build" | ||
mkdir -p $build_dir | ||
cmake -GNinja \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
"-Dhsa-runtime64_DIR=$hsa_runtime64_ROOT/lib/cmake/hsa-runtime64" \ | ||
-S "$PWD" -B "$build_dir" | ||
! cmake --build "$build_dir" --target aie_hsa_dispatch_test | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
find_package(hsa-runtime64 CONFIG REQUIRED NAMES hsa_runtime64 hsa-runtime64) | ||
|
||
# smoke test | ||
add_executable(aie_hsa_bare_add_one aie_hsa_bare_add_one.cc) | ||
|
||
# hsa test | ||
add_executable(aie_hsa_dispatch_test aie_hsa_dispatch_test.cc) | ||
target_link_libraries(aie_hsa_dispatch_test PUBLIC hsa-runtime64::hsa-runtime64) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
06030100 | ||
00000105 | ||
00000007 | ||
00000110 | ||
00000001 | ||
00000000 | ||
0001D000 | ||
00000030 | ||
00000400 | ||
00000000 | ||
00000000 | ||
00000000 | ||
80000000 | ||
00000000 | ||
00000000 | ||
02000000 | ||
00000081 | ||
00000030 | ||
00000000 | ||
00000000 | ||
00000000 | ||
00000000 | ||
0001D004 | ||
00000000 | ||
00000001 | ||
00000000 | ||
00000000 | ||
00000000 | ||
00000000 | ||
00000000 | ||
0001D204 | ||
00000000 | ||
80000000 | ||
00000018 | ||
00000001 | ||
00000000 | ||
0001D020 | ||
00000030 | ||
00000400 | ||
00000000 | ||
00000000 | ||
00000000 | ||
80000000 | ||
00000000 | ||
00000000 | ||
02000000 | ||
00000081 | ||
00000030 | ||
00000000 | ||
00000000 | ||
00000000 | ||
00000000 | ||
0001D024 | ||
00000000 | ||
00000000 | ||
00000000 | ||
00000000 | ||
00000000 | ||
00000000 | ||
00000000 | ||
0001D214 | ||
00000000 | ||
00000001 | ||
00000018 | ||
00000080 | ||
00000010 | ||
00000000 | ||
00010100 |
Oops, something went wrong.