Skip to content

Commit

Permalink
Fix L0_backend_python iGPU PyTorch installation (#7231)
Browse files Browse the repository at this point in the history
* Fix TEST_JETSON double square bracket issue

* Use and instead of or
  • Loading branch information
kthui authored May 16, 2024
1 parent 6d9849d commit 23a6c21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion qa/L0_backend_python/examples/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ rm -fr *.log python_backend/

# Install torch
pip3 uninstall -y torch
if [[ "$TEST_JETSON" == "0" ]] || [[ ${TEST_WINDOWS} == 0 ]]; then
if [ "$TEST_JETSON" == "0" ] && [[ ${TEST_WINDOWS} == 0 ]]; then
pip3 install torch==2.0.0+cu117 -f https://download.pytorch.org/whl/torch_stable.html torchvision==0.15.0+cu117
else
pip3 install torch==2.0.0 -f https://download.pytorch.org/whl/torch_stable.html torchvision==0.15.0
Expand Down
6 changes: 3 additions & 3 deletions qa/L0_backend_python/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ cp ../python_models/dlpack_identity/model.py ./models/dlpack_identity/1/
cp ../python_models/dlpack_identity/config.pbtxt ./models/dlpack_identity


if [[ "$TEST_JETSON" == "0" ]] && [[ ${TEST_WINDOWS} == 0 ]]; then
if [ "$TEST_JETSON" == "0" ] && [[ ${TEST_WINDOWS} == 0 ]]; then
pip3 install torch==1.13.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
else
# GPU tensor tests are disabled on jetson
Expand Down Expand Up @@ -237,7 +237,7 @@ set -e
#
# Test KIND_GPU
# Disable env test for Jetson & Windows since GPU Tensors are not supported
if [[ "$TEST_JETSON" == "0" ]] && [[ ${TEST_WINDOWS} == 0 ]]; then
if [ "$TEST_JETSON" == "0" ] && [[ ${TEST_WINDOWS} == 0 ]]; then
rm -rf models/
mkdir -p models/add_sub_gpu/1/
cp ../python_models/add_sub/model.py ./models/add_sub_gpu/1/
Expand Down Expand Up @@ -408,7 +408,7 @@ fi
# Disable ensemble, io and bls tests for Jetson since GPU Tensors are not supported
# Disable variants test for Jetson since already built without GPU Tensor support
# Disable decoupled test because it uses GPU tensors
if [[ "$TEST_JETSON" == "0" ]]; then
if [ "$TEST_JETSON" == "0" ]; then
SUBTESTS="ensemble bls decoupled"
# [DLIS-6093] Disable variants test for Windows since tests are not executed in docker container (cannot apt update/install)
# [DLIS-5970] Disable io tests for Windows since GPU Tensors are not supported
Expand Down

0 comments on commit 23a6c21

Please sign in to comment.