Skip to content

Commit f848f6f

Browse files
authored
Rename xilinx.icd to amdxrt.icd for XRT upstream builds (#9386)
Avoid package conflict when installing internal XRT packages (/opt/xilinx) with upstream packages (/usr). The OpenCL ICD loader `/etc/OpenCL/vendors/xilinx.icd` is installed by internally built xrt-base package, which otherwise installs content to `/opt/xilinx/xrt`. For upstream packages, the ICD loader must be named differently in order to co-exist with internal installs. Signed-off-by: Soren Soe <[email protected]>
1 parent 8690ce1 commit f848f6f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/CMake/icd.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# SPDX-License-Identifier: Apache-2.0
22
# Copyright (C) 2019-2021 Xilinx, Inc. All rights reserved.
33
# Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved.
4-
SET (ICD_FILE_NAME "xilinx.icd")
4+
if (XRT_UPSTREAM)
5+
set(ICD_FILE_NAME "amdxrt.icd")
6+
else()
7+
set(ICD_FILE_NAME "xilinx.icd")
8+
endif()
59

610
message("-- Preparing OpenCL ICD ${ICD_FILE_NAME}")
711

812
configure_file (
9-
"${XRT_SOURCE_DIR}/CMake/config/${ICD_FILE_NAME}.in"
13+
"${XRT_SOURCE_DIR}/CMake/config/xilinx.icd.in"
1014
${ICD_FILE_NAME}
1115
)
1216

0 commit comments

Comments
 (0)