Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#48 from wangye707/wangye_fix_DeviceGe…
Browse files Browse the repository at this point in the history
…tHandle_bug

修复gpu返回str问题
  • Loading branch information
wangye707 committed Jul 23, 2021
2 parents e482ab4 + eb664e1 commit 2317b26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion inference/python_api_test/test_case/infer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def disable_gpu_test(self, input_data_dict: dict, repeat=20):

cuda_visible_devices = os.environ.get("CUDA_VISIBLE_DEVICES")
if cuda_visible_devices:
cuda_visible_device = cuda_visible_devices.split(",")[0]
cuda_visible_device = int(cuda_visible_devices.split(",")[0])
else:
cuda_visible_device = 0

Expand Down
3 changes: 1 addition & 2 deletions inference/python_api_test/test_class_model/run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
python -m pip install pytest
export FLAGS_call_stack_level=2
cases=`find . -name "test*.py" | sort`
ignore=""
Expand All @@ -11,7 +10,7 @@ do
if [[ ${ignore} =~ ${file##*/} ]]; then
echo "跳过"
else
python3.7 -m pytest ${file}
python -m pytest ${file}
if [ $? -ne 0 ]; then
echo ${file} >> result.txt
bug=`expr ${bug} + 1`
Expand Down

0 comments on commit 2317b26

Please sign in to comment.