Skip to content

Commit

Permalink
[wip] hsa demo
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Aug 28, 2024
1 parent 3e966c9 commit 68b0bb0
Show file tree
Hide file tree
Showing 6 changed files with 406 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,22 @@ jobs:
$PWD/llvm-aie \
/opt/xilinx/xrt \
/opt/Xilinx/Vitis/2024.2
test_hsa:
name: HSA MWE
strategy:
fail-fast: false
runs-on: linux-phoenix-20240606
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/..
2 changes: 1 addition & 1 deletion experimental/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# 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)
9 changes: 9 additions & 0 deletions experimental/hsa/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 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)
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

0 comments on commit 68b0bb0

Please sign in to comment.