@@ -15,6 +15,7 @@ unset oldest
1515unset no_special
1616unset run_all_and_examples
1717unset allow_failures
18+ unset torch_backend
1819declare -a from_source_specs=()
1920
2021SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
@@ -26,6 +27,7 @@ Usage: $0
2627 [ --repo-home input]
2728 [ --target-env-name input ]
2829 [ --oldest ] # Use oldest CI requirements (Python 3.10, requirements-oldest.txt)
30+ [ --torch-backend input ] (cpu, auto, cu128, etc. default: auto)
2931 [ --no-rebuild-base ]
3032 [ --no-special ] # Skip special tests (standalone/experimental), run only main test suite
3133 [ --run-all-and-examples ] # Run all FTS example tests (both standalone and non-standalone)
5658exit 1
5759}
5860
59- args=$( getopt -o ' ' --long repo-home:,repo_home:,target-env-name:,target_env_name:,oldest,no-rebuild-base,no_rebuild_base,no-special,run-all-and-examples,allow-failures,include-experimental:,include_experimental,uv-install-flags:,uv_install_flags:,no-commit-pin,no_commit_pin,venv-dir:,from-source:,dry-run,help -- " $@ " )
61+ args=$( getopt -o ' ' --long repo-home:,repo_home:,target-env-name:,target_env_name:,oldest,torch-backend:, no-rebuild-base,no_rebuild_base,no-special,run-all-and-examples,allow-failures,include-experimental:,include_experimental,uv-install-flags:,uv_install_flags:,no-commit-pin,no_commit_pin,venv-dir:,from-source:,dry-run,help -- " $@ " )
6062if [[ $? -gt 0 ]]; then
6163 usage
6264fi
6870 --repo-home|--repo_home) repo_home=$2 ; shift 2 ;;
6971 --target-env-name|--target_env_name) target_env_name=$2 ; shift 2 ;;
7072 --oldest) oldest=1 ; shift ;;
73+ --torch-backend) torch_backend=$2 ; shift 2 ;;
7174 --no-rebuild-base|--no_rebuild_base) no_rebuild_base=1 ; shift ;;
7275 --no-special) no_special=1 ; shift ;;
7376 --run-all-and-examples) run_all_and_examples=1 ; shift ;;
@@ -145,6 +148,11 @@ env_rebuild(){
145148 cmd_args+=(" --venv-dir=${venv_dir} " )
146149 fi
147150
151+ # Add torch-backend flag if specified
152+ if [[ -n " ${torch_backend} " ]]; then
153+ cmd_args+=(" --torch-backend=${torch_backend} " )
154+ fi
155+
148156 # Add from-source parameters
149157 for spec in " ${from_source_specs[@]} " ; do
150158 cmd_args+=(" --from-source=${spec} " )
0 commit comments