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

[wip] hsa demo #711

Closed
wants to merge 3 commits into from
Closed
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
42 changes: 42 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,45 @@ jobs:
iree-install \
print_ir_aie2xclbin_results \
$PWD/llvm-aie

test_hsa_full:
name: HSA MWE
strategy:
fail-fast: false
matrix:
runs-on: [linux-phoenix-20240606]
runs-on: ${{ matrix.runs-on }}
steps:
- name: "Checking out repository" # for test scripts
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
submodules: false # not required for testbench

- name: Build and run HSA example
run: |
cd experimental/hsa
mkdir build && pushd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja
ninja aie_hsa_dispatch_test
./aie_hsa_dispatch_test $PWD/..

test_hsa_bare:
name: HSA MWE
strategy:
fail-fast: false
matrix:
runs-on: [linux-phoenix-20240819]
runs-on: ${{ matrix.runs-on }}
steps:
- name: "Checking out repository" # for test scripts
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
submodules: false # not required for testbench

- name: Build and run HSA example
run: |
cd experimental/hsa
mkdir build && pushd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja
ninja aie_hsa_bare_add_one
./aie_hsa_bare_add_one $PWD/..
6 changes: 5 additions & 1 deletion experimental/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

iree_add_all_subdirs()
add_subdirectory(delegate)
find_package(hsa-runtime64 QUIET)
if(${hsa-runtime64_FOUND})
add_subdirectory(hsa)
endif()
11 changes: 11 additions & 0 deletions experimental/hsa/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright 2024 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

find_package(hsa-runtime64 REQUIRED)
add_executable(aie_hsa_dispatch_test aie_hsa_dispatch_test.cc)
target_link_libraries(aie_hsa_dispatch_test PUBLIC hsa-runtime64::hsa-runtime64)

add_executable(aie_hsa_bare_add_one aie_hsa_bare_add_one.cc)
Binary file added experimental/hsa/add_one.pdi
Binary file not shown.
68 changes: 68 additions & 0 deletions experimental/hsa/add_one_insts.txt
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
Loading
Loading