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 230
230
done
231
231
fi
232
232
233
+ TEST_CODE_DIR=" $( dirname ${BASH_SOURCE[0]} ) /test_example_code"
233
234
build_and_run_example_cpp () {
234
235
if [[ " $DESIRED_DEVTOOLSET " == * " cxx11-abi" * ]]; then
235
236
GLIBCXX_USE_CXX11_ABI=1
@@ -256,7 +257,7 @@ build_and_run_example_cpp () {
256
257
if [ -f " ${install_root} /lib/libtorch_cuda.so" ] || [ -f " ${install_root} /lib/libtorch_cuda.dylib" ]; then
257
258
TORCH_CUDA_LINK_FLAGS=" -ltorch_cuda"
258
259
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
260
261
./$1
261
262
}
262
263
@@ -287,7 +288,7 @@ build_example_cpp_with_incorrect_abi () {
287
288
if [ -f " ${install_root} /lib/libtorch_cuda.so" ] || [ -f " ${install_root} /lib/libtorch_cuda.dylib" ]; then
288
289
TORCH_CUDA_LINK_FLAGS=" -ltorch_cuda"
289
290
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
291
292
ERRCODE=$?
292
293
set -e
293
294
if [ " $ERRCODE " -eq " 0" ]; then
You can’t perform that action at this time.
0 commit comments