未验证 提交 08f24a31 编写于 作者: G GeminiCarrie 提交者: GitHub

Fix precision problem (#29567)

* Fix a bug when running on an operating system without "bash."

* add execution condition

* for ci-coverage

* get cpu information to check the precision problem

* Update compilation environment for musl version

* update dependencies

* remove test code

check cpu info

remove test code

review

* update alpine and third_party denpendencies

* add newline for ci Code format
上级 740c0d58
...@@ -51,6 +51,11 @@ message(STATUS "C compiler: ${CMAKE_C_COMPILER}, version: " ...@@ -51,6 +51,11 @@ message(STATUS "C compiler: ${CMAKE_C_COMPILER}, version: "
"${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}") "${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}")
message(STATUS "AR tools: ${CMAKE_AR}") message(STATUS "AR tools: ${CMAKE_AR}")
# MUSL build turn off warnings
if(WITH_MUSL)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=deprecated-declarations -Wno-deprecated-declarations -Wno-error=pessimizing-move -Wno-error=deprecated-copy")
endif()
if(WIN32) if(WIN32)
option(MSVC_STATIC_CRT "use static C Runtime library by default" ON) option(MSVC_STATIC_CRT "use static C Runtime library by default" ON)
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM python:3.7-alpine3.10 FROM python:3.7-alpine3.11
USER root USER root
......
linux-headers=4.19.36-r0 linux-headers
freetype-dev=2.10.0-r1 freetype-dev
libjpeg-turbo-dev=2.0.4-r1 libjpeg-turbo-dev
zlib-dev=1.2.11-r1 zlib-dev
lapack-dev=3.8.0-r1 lapack-dev
openblas-dev=0.3.6-r0 openblas-dev
openssl-dev=1.1.1g-r0 openssl-dev
libuv-dev=1.29.1-r0 libuv-dev
graphviz graphviz
...@@ -122,17 +122,6 @@ if(NOT WITH_DISTRIBUTE) ...@@ -122,17 +122,6 @@ if(NOT WITH_DISTRIBUTE)
LIST(REMOVE_ITEM TEST_OPS test_program_code_dist) LIST(REMOVE_ITEM TEST_OPS test_program_code_dist)
endif() endif()
if(WITH_MUSL)
# TODO: In the musl docker environment provided by SEC,
# the calculation accuracy of testcase in this unittest
# cannot meet the requirement, error like:
# AssertionError:
# 2.3044646853182973e-07 not less than or equal to 1e-07
# SEC needs to follow up on this issue, and need to be
# resolved before CI requared
LIST(REMOVE_ITEM TEST_OPS test_sigmoid_focal_loss_op)
endif()
if(WIN32) if(WIN32)
LIST(REMOVE_ITEM TEST_OPS test_rnn_decode_api) LIST(REMOVE_ITEM TEST_OPS test_rnn_decode_api)
LIST(REMOVE_ITEM TEST_OPS test_complex_matmul) LIST(REMOVE_ITEM TEST_OPS test_complex_matmul)
......
file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py") file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py")
string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}") string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")
if(WITH_MUSL)
# TODO: In the musl docker environment provided by SEC,
# the test_yolov3 will randomly calculate the result of
# nan, error like:
# AssertionError:
# dygraph_loss: [15742.11914062 9392.61047363]
# static_loss: [nan, nan]
# SEC needs to follow up on this issue, and need to be
# resolved before CI requared
LIST(REMOVE_ITEM TEST_OPS test_yolov3)
endif()
foreach(TEST_OP ${TEST_OPS}) foreach(TEST_OP ${TEST_OPS})
py_test_modules(${TEST_OP} MODULES ${TEST_OP}) py_test_modules(${TEST_OP} MODULES ${TEST_OP})
endforeach(TEST_OP) endforeach(TEST_OP)
set_tests_properties(test_se_resnet PROPERTIES TIMEOUT 900) set_tests_properties(test_se_resnet PROPERTIES TIMEOUT 900)
set_tests_properties(test_tsm PROPERTIES TIMEOUT 900) set_tests_properties(test_tsm PROPERTIES TIMEOUT 900)
if(NOT WITH_MUSL) set_tests_properties(test_yolov3 PROPERTIES TIMEOUT 900 LABELS "RUN_TYPE=EXCLUSIVE")
set_tests_properties(test_yolov3 PROPERTIES TIMEOUT 900 LABELS "RUN_TYPE=EXCLUSIVE")
endif()
set_tests_properties(test_mobile_net PROPERTIES TIMEOUT 120) set_tests_properties(test_mobile_net PROPERTIES TIMEOUT 120)
set_tests_properties(test_seq2seq PROPERTIES TIMEOUT 120) set_tests_properties(test_seq2seq PROPERTIES TIMEOUT 120)
set_tests_properties(test_cycle_gan PROPERTIES TIMEOUT 120) set_tests_properties(test_cycle_gan PROPERTIES TIMEOUT 120)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册