Control: tags -1 + patch Control: user -1 [email protected] Control: usertags -1 mips-patch
Hi Ghislain, I have updated the patch that reduces optimization level with requested information, Fix-build-on-MIPS.patch‎. Do you want me to add anything else? Maybe it would be enough to apply only this patch, as the second one was needed for one of my local machines that may have lower performance than Debian's build servers. I will monitor the status of reported issues and ask for patch removal when the time comes. Regards, Dejan
Description: Reducing optimization level for mips/mipsel Some test fails on mips/mipsel with SIGILL or SIGBUS. This failures are triggered by ldxc1 instruction (Load Doubleword Indexed to Floating-Point). During address calculation compiler decides to count on overflow, this works fine on pure 32-bits system but if 32-bits Debian is running on 64-bits machine then the issue occurs. If lover optimization level is used, this situation is not present. This patch reduces optimization level on mips/mipsel only for problematic code parts that induce described behaviour. Author: Dejan Latinovic <[email protected]> Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836599 Bug: https://github.com/Shark-ML/Shark/issues/112 Forwarded: https://dmz-portal.mips.com/bugz/show_bug.cgi?id=2408 Last-Update: 2016-10-18 --- shark-3.1.3+ds1.orig/Test/CMakeLists.txt +++ shark-3.1.3+ds1/Test/CMakeLists.txt @@ -280,6 +280,20 @@ if(HDF5_FOUND) ) endif() +if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "mips") + if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "4") + set_source_files_properties(LinAlg/BLAS/vector_proxy.cpp PROPERTIES COMPILE_FLAGS -O1) + set_source_files_properties(LinAlg/sumRows.cpp PROPERTIES COMPILE_FLAGS -O1) + set_source_files_properties(LinAlg/BLAS/transformations.cpp PROPERTIES COMPILE_FLAGS -O1) + set_source_files_properties(Models/ConcatenatedModel.cpp PROPERTIES COMPILE_FLAGS -O1) + set_source_files_properties(Models/LinearNorm.cpp PROPERTIES COMPILE_FLAGS -O1) + set_source_files_properties(ObjectiveFunctions/SquaredEpsilonHingeLoss.cpp PROPERTIES COMPILE_FLAGS -O1) + set_source_files_properties(ObjectiveFunctions/HuberLoss.cpp PROPERTIES COMPILE_FLAGS -O1) + set_source_files_properties(ObjectiveFunctions/TukeyBiweightLoss.cpp PROPERTIES COMPILE_FLAGS -O1) + endif() +endif() + + # Create output dir add_custom_command( TARGET Data_Csv --- shark-3.1.3+ds1.orig/src/CMakeLists.txt +++ shark-3.1.3+ds1/src/CMakeLists.txt @@ -2,6 +2,13 @@ file( GLOB_RECURSE SHARK_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp) file(GLOB_RECURSE SHARK_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ../include/*.h ../include/*.hpp ../include/*.inl) +if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "mips") + if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "4") + set_source_files_properties(Models/Softmax.cpp PROPERTIES COMPILE_FLAGS -O1) + endif() +endif() + + # Group the source for MSVC foreach(FILE ${SHARK_SRCS}) # Get the directory of the source file

