This repository was archived by the owner on Aug 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 230230 done
231231fi
232232
233+ TEST_CODE_DIR=" $( dirname ${BASH_SOURCE[0]} ) /test_example_code"
233234build_and_run_example_cpp () {
234235 if [[ " $DESIRED_DEVTOOLSET " == * " cxx11-abi" * ]]; then
235236 GLIBCXX_USE_CXX11_ABI=1
@@ -256,7 +257,7 @@ build_and_run_example_cpp () {
256257 if [ -f " ${install_root} /lib/libtorch_cuda.so" ] || [ -f " ${install_root} /lib/libtorch_cuda.dylib" ]; then
257258 TORCH_CUDA_LINK_FLAGS=" -ltorch_cuda"
258259 fi
259- g++ /builder/test_example_code /$1 .cpp -I${install_root} /include -I${install_root} /include/torch/csrc/api/include -D_GLIBCXX_USE_CXX11_ABI=$GLIBCXX_USE_CXX11_ABI -std=gnu++14 -L${install_root} /lib ${REF_LIB} ${ADDITIONAL_LINKER_FLAGS} -ltorch $TORCH_CPU_LINK_FLAGS $TORCH_CUDA_LINK_FLAGS $C10_LINK_FLAGS -o $1
260+ g++ ${TEST_CODE_DIR} /$1 .cpp -I${install_root} /include -I${install_root} /include/torch/csrc/api/include -D_GLIBCXX_USE_CXX11_ABI=$GLIBCXX_USE_CXX11_ABI -std=gnu++14 -L${install_root} /lib ${REF_LIB} ${ADDITIONAL_LINKER_FLAGS} -ltorch $TORCH_CPU_LINK_FLAGS $TORCH_CUDA_LINK_FLAGS $C10_LINK_FLAGS -o $1
260261 ./$1
261262}
262263
@@ -287,7 +288,7 @@ build_example_cpp_with_incorrect_abi () {
287288 if [ -f " ${install_root} /lib/libtorch_cuda.so" ] || [ -f " ${install_root} /lib/libtorch_cuda.dylib" ]; then
288289 TORCH_CUDA_LINK_FLAGS=" -ltorch_cuda"
289290 fi
290- g++ /builder/test_example_code /$1 .cpp -I${install_root} /include -I${install_root} /include/torch/csrc/api/include -D_GLIBCXX_USE_CXX11_ABI=$GLIBCXX_USE_CXX11_ABI -std=gnu++14 -L${install_root} /lib ${REF_LIB} ${ADDITIONAL_LINKER_FLAGS} -ltorch $TORCH_CPU_LINK_FLAGS $TORCH_CUDA_LINK_FLAGS $C10_LINK_FLAGS -o $1
291+ g++ ${TEST_CODE_DIR} /$1 .cpp -I${install_root} /include -I${install_root} /include/torch/csrc/api/include -D_GLIBCXX_USE_CXX11_ABI=$GLIBCXX_USE_CXX11_ABI -std=gnu++14 -L${install_root} /lib ${REF_LIB} ${ADDITIONAL_LINKER_FLAGS} -ltorch $TORCH_CPU_LINK_FLAGS $TORCH_CUDA_LINK_FLAGS $C10_LINK_FLAGS -o $1
291292 ERRCODE=$?
292293 set -e
293294 if [ " $ERRCODE " -eq " 0" ]; then
You can’t perform that action at this time.
0 commit comments