Skip to content

Commit

Permalink
Strix npu support (#1869)
Browse files Browse the repository at this point in the history
Co-authored-by: Stephen Neuendorffer <stephen.neuendorffer@amd.com>
Co-authored-by: Joseph Melber <joseph.melber@amd.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Oct 23, 2024
1 parent 655adb1 commit 93e6755
Show file tree
Hide file tree
Showing 42 changed files with 1,466 additions and 126 deletions.
1 change: 1 addition & 0 deletions .github/workflows/buildAndTestRyzenAI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ env:
-DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \
-DXRT_ROOT=/opt/xilinx/xrt \
-DAIE_VITIS_COMPONENTS=AIE2;AIE2P \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DAIE_ENABLE_XRT_PYTHON_BINDINGS=ON \
-DAIE_INCLUDE_INTEGRATION_TESTS=OFF
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/buildAndTestRyzenAISw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DAIE_ENABLE_XRT_PYTHON_BINDINGS=ON \
-DAIE_INCLUDE_INTEGRATION_TESTS=OFF \
-DAIE_VITIS_COMPOONENTS=AIE2 \
-DAIE_VITIS_COMPOONENTS="AIE2;AIE2P" \
-DPython3_EXECUTABLE=$(which python) \
-DLLVM_EXTERNAL_LIT=$(which lit) \
-DCMAKE_INSTALL_PREFIX=/workspace/install \
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[submodule "runtime_lib/xaiengine/aie-rt"]
path = third_party/aie-rt
url = https://github.com/stephenneuendorffer/aie-rt.git
branch = phoenix_v2023.2
branch = strix_2024.2
[submodule "third_party/bootgen"]
path = third_party/bootgen
url = https://github.com/Xilinx/bootgen.git
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set(AIE_RUNTIME_TEST_TARGET
"x86_64"
CACHE STRING "Runtime architecture to test with.")

set(AIE_VITIS_COMPONENTS "AIE;AIE2" CACHE STRING "Vitis components")
set(AIE_VITIS_COMPONENTS "AIE;AIE2;AIE2P" CACHE STRING "Vitis components")

if(POLICY CMP0068)
cmake_policy(SET CMP0068 NEW)
Expand Down
9 changes: 9 additions & 0 deletions aie_runtime_lib/AIE/aiesim/genwrapper_for_ps.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
//===- genwrapper_for_ps.mlir ----------------------------------*- MLIR -*-===//
//
// This file is 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
//
// (c) Copyright 2024 Advanced Micro Devices, Inc.
//
//===----------------------------------------------------------------------===//
#include <adf/wrapper/wrapper.h>
#include <xtlm.h>
#define BUSWIDTH 128
Expand Down
9 changes: 9 additions & 0 deletions aie_runtime_lib/AIE2/aiesim/genwrapper_for_ps.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
//===- genwrapper_for_ps.mlir ----------------------------------*- MLIR -*-===//
//
// This file is 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
//
// (c) Copyright 2024 Advanced Micro Devices, Inc.
//
//===----------------------------------------------------------------------===//
#include <adf/wrapper/wrapper.h>
#include <xtlm.h>
#define BUSWIDTH 128
Expand Down
8 changes: 8 additions & 0 deletions aie_runtime_lib/AIE2P/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# This file is 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
#
# (c) Copyright 2024 Xilinx Inc.

add_aie_runtime_libs(AIE2P)
23 changes: 23 additions & 0 deletions aie_runtime_lib/AIE2P/aiesim/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# This file is 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
#
# (c) Copyright 2024 Xilinx Inc.


set(INSTALLS
genwrapper_for_ps.cpp)


foreach(file ${INSTALLS})
add_custom_target(aie-copy-runtime-libs-AIE2P-${file} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${file})
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${file}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${file}
${CMAKE_CURRENT_BINARY_DIR}/${file}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file})
add_dependencies(aie-runtime-libs aie-copy-runtime-libs-AIE2P-${file} )
endforeach()

install(FILES ${INSTALLS} DESTINATION ${CMAKE_INSTALL_PREFIX}/aie_runtime_lib/AIE2P/aiesim)

Loading

0 comments on commit 93e6755

Please sign in to comment.