3
3
# This script runs test inside the corresponding ROCm docker container.
4
4
set -o pipefail
5
5
6
+ # Export Python path
7
+ export PYTHONPATH=" .."
8
+
6
9
# Print ROCm version
7
10
echo " --- Confirming Clean Initial State"
8
11
while true ; do
@@ -74,6 +77,15 @@ HF_MOUNT="/root/.cache/huggingface"
74
77
75
78
commands=$@
76
79
echo " Commands:$commands "
80
+
81
+ if [[ $commands == * " pytest -v -s basic_correctness/test_basic_correctness.py" * ]]; then
82
+ commands=${commands// " pytest -v -s basic_correctness/test_basic_correctness.py" / " VLLM_USE_TRITON_FLASH_ATTN=0 pytest -v -s basic_correctness/test_basic_correctness.py" }
83
+ fi
84
+
85
+ if [[ $commands == * " pytest -v -s compile/test_basic_correctness.py" * ]]; then
86
+ commands=${commands// " pytest -v -s compile/test_basic_correctness.py" / " VLLM_USE_TRITON_FLASH_ATTN=0 pytest -v -s compile/test_basic_correctness.py" }
87
+ fi
88
+
77
89
# ignore certain kernels tests
78
90
if [[ $commands == * " kernels/core" * ]]; then
79
91
commands=" ${commands} \
161
173
162
174
163
175
PARALLEL_JOB_COUNT=8
176
+ MYPYTHONPATH=" .."
177
+
164
178
# check if the command contains shard flag, we will run all shards in parallel because the host have 8 GPUs.
165
179
if [[ $commands == * " --shard-id=" * ]]; then
166
180
# assign job count as the number of shards used
@@ -181,6 +195,7 @@ if [[ $commands == *"--shard-id="* ]]; then
181
195
-e AWS_SECRET_ACCESS_KEY \
182
196
-v " ${HF_CACHE} :${HF_MOUNT} " \
183
197
-e " HF_HOME=${HF_MOUNT} " \
198
+ -e " PYTHONPATH=${MYPYTHONPATH} " \
184
199
--name " ${container_name} _${GPU} " \
185
200
" ${image_name} " \
186
201
/bin/bash -c " ${commands_gpu} " \
211
226
-e AWS_SECRET_ACCESS_KEY \
212
227
-v " ${HF_CACHE} :${HF_MOUNT} " \
213
228
-e " HF_HOME=${HF_MOUNT} " \
229
+ -e " PYTHONPATH=${MYPYTHONPATH} " \
214
230
--name " ${container_name} " \
215
231
" ${image_name} " \
216
232
/bin/bash -c " ${commands} "
0 commit comments