Open
Conversation
Build command: ./build.sh --config Debug --parallel 0 --enable_pybind --build_wheel --allow_running_as_root
This change fixes test OrtModelOnlyTests.ValidateOrtFormatModelDoesNotRunOptimizersInFullBuild on s390x.
Later this data is narrowed: *p_data++ = static_cast<T>(*data_iter); If for example BE int32_t data is 4 bytes: 0x00 0x00 0x00 0x01 After byteswapping it'll become: 0x01 0x00 0x00 0x00 And after narrowing to int16_t two rightmost bytes are used on big endian and result is 0x00 0x00 If instead we byteswap it as two shorts, byteswapping result is: 0x00 0x00 0x01 0x00 And narrowing result is 0x01 0x00, which is correct LE representation of that number. This change fixes following test on s390x: FlatbufferUtilsTest.ExternalWriteReadWithLoadInitializers
Raw data is expected to be in LE. This change fixes tests: SparseTensorConversionTests.SparseTensorProtoToDense_Rank1Indices64 SparseTensorConversionTests.SparseTensorProtoToDense_Rank1Indices32 SparseTensorConversionTests.SparseTensorProtoToDense_Rank1Indices16 SparseTensorConversionTests.SparseTensorProtoToDense_Rank1Indices8 SparseTensorConversionTests.SparseTensorProtoToDense_Rank2Indices_COO
This change fixes tests: OrtModelOnlyTests.SparseInitializerHandling SparseTensorConversionTests.TestConstantNodeConversion
This change fixes following tests on s390x: ExecutionFrameTestInit.SparseInitializerAsOutput CApiTest.SparseOutputModel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR contains fixes to various big endian support issues in onnxruntime, both in libraries and tests.
Motivation and Context
Currently some tests from onnxruntime testsuite fail.
This change fixes all tests from onnxruntime testsuite when it's built without training support.
It also includes a linking issue fix.
Following tests are fixed on s390x:
OrtModelOnlyTests.ValidateOrtFormatModelDoesNotRunOptimizersInFullBuild
FlatbufferUtilsTest.ExternalWriteReadWithLoadInitializers
SparseTensorConversionTests.SparseTensorProtoToDense_Rank1Indices64
SparseTensorConversionTests.SparseTensorProtoToDense_Rank1Indices32
SparseTensorConversionTests.SparseTensorProtoToDense_Rank1Indices16
SparseTensorConversionTests.SparseTensorProtoToDense_Rank1Indices8
SparseTensorConversionTests.SparseTensorProtoToDense_Rank2Indices_COO
SparseTensorConversionTests.TestConstantNodeConversion
OrtModelOnlyTests.SparseInitializerHandling
SparseTensorConversionTests.TestConstantNodeConversion
SparseTensorConversionTests.TestDenseToSparseConversion
ExecutionFrameTestInit.SparseInitializerAsOutput
CApiTest.SparseOutputModel