fix gpu ut

This commit is contained in:
yeyunpeng2020 2021-06-04 17:12:44 +08:00
parent 475386e338
commit b7dc91febd
3 changed files with 16 additions and 11 deletions

View File

@ -6,6 +6,7 @@ set(CODEGEN_ROOT_DIR ${RUNTIME_PKG_NAME}/tools/codegen)
set(CONVERTER_ROOT_DIR ${RUNTIME_PKG_NAME}/tools/converter)
set(OBFUSCATOR_ROOT_DIR ${RUNTIME_PKG_NAME}/tools/obfuscator)
set(CROPPER_ROOT_DIR ${RUNTIME_PKG_NAME}/tools/cropper)
set(TEST_CASE_DIR ${TOP_DIR}/mindspore/lite/test/build)
if(SUPPORT_TRAIN)
set(RUNTIME_DIR ${RUNTIME_PKG_NAME}/train)
@ -195,6 +196,10 @@ if(PLATFORM_ARM64)
if(MSLITE_ENABLE_TOOLS)
install(TARGETS ${BENCHMARK_NAME} RUNTIME DESTINATION ${BENCHMARK_ROOT_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME})
endif()
if(MSLITE_ENABLE_TESTCASES)
install(FILES ${TOP_DIR}/mindspore/lite/build/test/lite-test DESTINATION ${TEST_CASE_DIR}
COMPONENT ${RUNTIME_COMPONENT_NAME})
endif()
elseif(PLATFORM_ARM32)
if(SUPPORT_NPU)
install(FILES ${DDK_LIB_PATH}/libhiai.so DESTINATION ${RUNTIME_DIR}/third_party/hiai_ddk/lib

View File

@ -6,10 +6,6 @@ echo ${basepath}
# Example:sh run_ut_gpu.sh -r /home/temp_test -d "8KE5T19620002408"
while getopts "r:d:" opt; do
case ${opt} in
r)
lite_test_path=${OPTARG}
echo "lite_test_path is ${OPTARG}"
;;
d)
device_id=${OPTARG}
echo "device_id is ${OPTARG}"
@ -32,9 +28,7 @@ echo 'run gpu ut logs: ' > ${run_gpu_ut_log_file}
ut_gpu_config=${basepath}/ut_gpu.cfg
function Run_gpu_ut() {
cd ${lite_test_path} || exit 1
cp -a ${lite_test_path}/lite-test ${ut_test_path}/lite-test || exit 1
cp -a ${basepath}/build/lite-test ${ut_test_path}/lite-test || exit 1
cp -r ${basepath}/ut/src/runtime/kernel/opencl/test_data ${ut_test_path} || exit 1
# adb push all needed files to the phone

View File

@ -1,4 +1,5 @@
TestOpenCL_Transpose.*
TestOpenCL_DepthwiseConv2d.*
TestOpenCL_StridedSlice.1D
TestOpenCL_StridedSlice.2D
TestOpenCL_StridedSlice.3D
@ -6,7 +7,6 @@ TestOpenCL_StridedSlice.4D
TestOpenCL_StridedSlice.4D_stride2
TestOpenCL_StridedSlice.4D_to_3D
TestOpenCL_StridedSlice.test1
TestOpenCL_Stack.*
TestOpenCL_Split.input3_axis0
TestOpenCL_DepthToSpace.*
TestOpenCL_SpaceToDepth.*
@ -36,8 +36,6 @@ TestOpenCL_Conv2D.test1
TestOpenCL_Conv2D.test2
TestOpenCL_Conv2D.test3
TestOpenCL_Conv2D.test3_batch2
TestOpenCL_Concat.*
TestOpenCL_BatchNorm.*
TestOpenCL_BatchToSpaceND.*
TestOpenCL_Arithmetic.ElementwiseAdd
TestOpenCL_Arithmetic.ScalarMul
@ -48,5 +46,13 @@ TestOpenCL_Arithmetic.BroadcastFloorMod
TestOpenCL_Arithmetic.FloorMod
TestOpenCL_Arithmetic.ElementwiseDiv
TestOpenCL_ArithmeticSelf.*
TestOpenCL_ArgMinMax.*
TestOpenCL_Activation.*
TestOpenCL_Concat.input2_axis0
TestOpenCL_Concat.input2_axis0_shape1
TestOpenCL_Concat.input2_axis1_Align
TestOpenCL_Concat.input6_axis1_Align
TestOpenCL_Concat.input6_axis2_Align
TestOpenCL_Concat.input3_axis1_UnAlign
TestOpenCL_Concat.input4_axis3_UnAlign
TestOpenCL_Concat.input5_axis3_UnAlign
TestOpenCL_Concat.input6_axis3_UnAlign