Skip to content

Commit 5693127

Browse files
authored
Remove obsolete env vars from run and board scripts (#5530)
Also remove dead code related to these variables.
1 parent 1bc3cfd commit 5693127

File tree

4 files changed

+5
-100
lines changed

4 files changed

+5
-100
lines changed

build/board.sh

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ tests=
2020
csv=
2121
select="PASS"
2222
rel=2019.1
23-
sdxp="Scout"
2423

2524
usage()
2625
{
@@ -38,7 +37,6 @@ usage()
3837
echo "[-csv <path>] Path to csv file to parse for tests"
3938
echo "[-ini <path>] Path to sdaccel.ini file"
4039
echo "[-xrt <path>] Path to XRT install (default: $xrt)"
41-
echo "[-sdx <path>] Path to SDx install (default: $sdx)"
4240
echo ""
4341
echo "With no optional options, this script runs all previously synced tests in"
4442
echo "current directory. "
@@ -104,11 +102,6 @@ while [ $# -gt 0 ]; do
104102
csv=$1
105103
shift
106104
;;
107-
-sdx)
108-
shift
109-
sdx=$1
110-
shift
111-
;;
112105
-select)
113106
shift
114107
select=$1
@@ -131,11 +124,6 @@ while [ $# -gt 0 ]; do
131124
esac
132125
done
133126

134-
sdx=/proj/xbuilds/${rel}_daily_latest/installs/lin64/Scout/${rel}
135-
if [[ $rel < 2019.2 ]]; then
136-
sdx=/proj/xbuilds/${rel}_daily_latest/installs/lin64/SDx/${rel}
137-
fi
138-
139127
################################################################
140128
# Environment
141129
################################################################
@@ -150,24 +138,14 @@ if [[ "X$xrt" != "X" && -d "$xrt" ]] ; then
150138
export XILINX_XRT=${XILINX_XRT:=$xrt}
151139
export LD_LIBRARY_PATH=$XILINX_XRT/lib
152140
export PATH=$XILINX_XRT/bin:${PATH}
153-
echo "echo $XILINX_XRT/lib/libxilinxopencl.so > /etc/OpenCL/vendors/xilinx.icd"
154-
echo "$XILINX_XRT/lib/libxilinxopencl.so" | sudo tee /etc/OpenCL/vendors/xilinx.icd > /dev/null
155-
fi
156-
157-
if [[ "X$sdx" != "X" && -d "$sdx" ]] ; then
158-
export XILINX_SDX=${XILINX_SDX:=$sdx}
159-
export XILINX_OPENCL=$XILINX_SDX
160-
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$XILINX_SDX/lib/lnx64.o/Default:$XILINX_SDX/lib/lnx64.o:$XILINX_SDX/runtime/lib/x86_64
141+
export OCL_ICD_VENDORS=$XILINX_XRT/lib/libxilinxopencl.so
161142
fi
162143

163144
export DSA=`${XILINX_XRT}/bin/xbutil scan | grep '\[0\]' | cut -d':' -f5 | cut -d'(' -f1`
164145

165146
echo "XILINX_XRT = $XILINX_XRT"
166-
echo "XILINX_SDX = $XILINX_SDX"
167-
echo "XILINX_SCOUT = $XILINX_SDX"
168-
echo "XILINX_OPENCL = $XILINX_OPENCL"
169147
echo "LD_LIBRARY_PATH = $LD_LIBRARY_PATH"
170-
148+
echo "OCL_ICD_VENDORS = $OCL_ICD_VENDORS"
171149

172150
################################################################
173151
# Test extraction
@@ -235,8 +213,6 @@ for f in ${tests[*]}; do
235213
echo "================================================================"
236214
echo "RUNDIR = $PWD"
237215
echo "XILINX_XRT = $XILINX_XRT"
238-
echo "XILINX_SDX = $XILINX_SDX"
239-
echo "XILINX_OPENCL = $XILINX_OPENCL"
240216
echo "LD_LIBRARY_PATH = $LD_LIBRARY_PATH"
241217
echo "DSA = $DSA"
242218
echo "================================================================"

build/run.sh

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,8 @@
77
# % run.sh -dbg emacs
88
XRTBUILD=$(readlink -f $(dirname ${BASH_SOURCE[0]}))
99

10-
# Define SDX and VIVADO to allow this loader script to be used
11-
# through other scripts (e.g. sprite scripts) that invoke SDx
12-
# and Vivado tools in addition to using XRT.
13-
14-
# Set to location of your preferred SDx install
15-
vitis=/proj/xbuilds/2020.2_released/installs/lin64/Vitis/2020.2
16-
17-
# Set to location of your preferred Vivado install
18-
vivado=/proj/xbuilds/2020.2_released/installs/lin64/Vivado/2020.2
10+
# Set to location of your preferred Vitis install
11+
vitis=/proj/xbuilds/2021.1_released/installs/lin64/Vitis/2021.1
1912

2013
ext=.o
2114
rel="Release"
@@ -34,7 +27,6 @@ usage()
3427
echo "[-conf] Run conformance mode testing"
3528
echo "[-ini <path>] Set SDACCEL_INI_PATH"
3629
echo "[-vitis <path>] Specify Vitis install (default: $vitis)"
37-
echo "[-vivado <path>] Specify Vivado install (default: $vivado)"
3830
echo "[-xrt <path>] Path to XRT install (default: $XRTBUILD/opt/xilinx/xrt)"
3931
echo "[-ldp <path>] Prepend path to LD_LIBRARY_PATH"
4032
echo "[--] End option parsing for this script invocation"
@@ -71,11 +63,6 @@ while [ $# -gt 0 ]; do
7163
vitis=$1
7264
shift
7365
;;
74-
-vivado)
75-
shift
76-
vivado=$1
77-
shift
78-
;;
7966
-ini)
8067
shift
8168
ini=$1
@@ -126,24 +113,16 @@ fi
126113

127114
if [[ "X$vitis" != "X" && -d "$vitis" ]] ; then
128115
export XILINX_VITIS=${XILINX_VITIS:=$vitis}
129-
export XILINX_OPENCL=$XILINX_VITIS
130116
export VITIS_CXX_PATH=${VITIS_CXX_PATH:=$XILINX_VITIS/bin/xcpp}
131-
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$XILINX_VITIS/lib/lnx64${ext}/Default:$XILINX_VITIS/lib/lnx64${ext}:$XILINX_VITIS/runtime/lib/x86_64
132-
fi
133-
134-
if [[ "X$vivado" != "X" && -d "$vivado" ]] ; then
135-
export XILINX_VIVADO=${XILINX_VIVADO:=$vivado}
136-
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$XILINX_VIVADO/lib/lnx64${ext}
117+
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$XILINX_VITIS/lib/lnx64${ext}
137118
fi
138119

139120
if [ "X$ldp" != "X" ] ; then
140121
export LD_LIBRARY_PATH=$ldp:${LD_LIBRARY_PATH}
141122
fi
142123

143-
echo "XILINX_OPENCL=$XILINX_OPENCL"
144124
echo "XILINX_XRT=$XILINX_XRT"
145125
echo "XILINX_VITIS=$XILINX_VITIS"
146-
echo "XILINX_VIVADO=$XILINX_VIVADO"
147126
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
148127
echo "OCL_ICD_VENDORS=$OCL_ICD_VENDORS"
149128
echo "PATH=$PATH"

src/runtime_src/xocl/core/platform.cpp

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,6 @@ namespace {
3535

3636
static xocl::platform* g_platform = nullptr;
3737

38-
static const char*
39-
value_or_empty(const char* value)
40-
{
41-
return value ? value : "";
42-
}
43-
44-
static std::string
45-
get_env(const char* env)
46-
{
47-
return value_or_empty(std::getenv(env));
48-
}
49-
5038
} // namespace
5139

5240
namespace xocl {
@@ -175,18 +163,4 @@ get_num_platforms()
175163
return g_platform ? 1 : 0;
176164
}
177165

178-
std::string
179-
get_xilinx_opencl()
180-
{
181-
static std::string xilinx_opencl = get_env("XILINX_OPENCL");
182-
return xilinx_opencl;
183-
}
184-
185-
std::string
186-
get_xilinx_sdx()
187-
{
188-
static std::string xilinx_sdx = get_env("XILINX_SDX");
189-
return xilinx_sdx;
190-
}
191-
192166
} // xocl

src/runtime_src/xocl/core/platform.h

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -117,30 +117,6 @@ get_shared_platform();
117117
unsigned int
118118
get_num_platforms();
119119

120-
/**
121-
* @return
122-
* The value of XILINX_OPENCL if set, empty otherwise
123-
*/
124-
std::string
125-
get_xilinx_opencl();
126-
127-
/**
128-
* @return
129-
* The value of XILINX_SDX if set, empty otherwise
130-
*/
131-
std::string
132-
get_xilinx_sdx();
133-
134-
/**
135-
* @return
136-
* The install root (same as xilinx_opencl)
137-
*/
138-
inline std::string
139-
get_install_root()
140-
{
141-
return get_xilinx_opencl();
142-
}
143-
144120
} // xocl
145121

146122
#endif

0 commit comments

Comments
 (0)