-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xdna_driver and xdna_driver plugin build fixes
fixes for errors detected while building on docker for ubuntu - boost directory location from rocm sdk builder - possibility disable the kernel driver build and only build the xdna_xrt_plugin that can communicate from userspace to the kernel driver Signed-off-by: Mika Laitio <[email protected]>
- Loading branch information
Showing
3 changed files
with
62 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
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
54 changes: 54 additions & 0 deletions
54
.../rocm-6.1.2/xdna_driver_xrt/0001-allow-building-kernel-driver-and-plugin-separately.patch
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,54 @@ | ||
From ecf39aa24f57f2fad4f7227aee7434797768fdf2 Mon Sep 17 00:00:00 2001 | ||
From: Mika Laitio <[email protected]> | ||
Date: Fri, 17 Jan 2025 20:03:34 -0800 | ||
Subject: [PATCH] allow building kernel driver and plugin separately | ||
|
||
- cmake support for variables to disable for example | ||
the kernel driver build by setting variables: | ||
|
||
-DXDNA_KERNEL_DRIVER=no | ||
-DXDNA_USERSPACE_DRIVER_PLUGIN=yes | ||
|
||
Signed-off-by: Mika Laitio <[email protected]> | ||
--- | ||
CMakeLists.txt | 7 +++++++ | ||
src/CMakeLists.txt | 8 ++++++-- | ||
2 files changed, 13 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index c48e204..f9fab53 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -20,6 +20,13 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/xrt.cmake) | ||
# version.cmake create XRT_PLUGIN_VERSION_STRING | ||
include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/version.cmake) | ||
|
||
+if(NOT DEFINED XDNA_KERNEL_DRIVER) | ||
+ SET(XDNA_KERNEL_DRIVER 1) | ||
+endif() | ||
+if(NOT DEFINED XDNA_USERSPACE_PLUGIN) | ||
+ SET(XDNA_USERSPACE_DRIVER_PLUGIN 1) | ||
+endif() | ||
+ | ||
# For saving all built artifacts for quick testing purpose | ||
# Should be redirected/prefixed by DESTDIR in make command line | ||
# Can only be used with cmake install() command | ||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index f853324..02c4dcd 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -1,5 +1,9 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. All rights reserved. | ||
|
||
-add_subdirectory(driver) | ||
-add_subdirectory(shim) | ||
+if(XDNA_KERNEL_DRIVER) | ||
+ add_subdirectory(driver) | ||
+endif() | ||
+if(XDNA_USERSPACE_DRIVER_PLUGIN) | ||
+ add_subdirectory(shim) | ||
+endif() | ||
-- | ||
2.41.1 | ||
|