microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
14.77k stars 2.94k forks source link

[AIX] CPUAllocatorTest failure #22873

Closed ranjitshs closed 2 days ago

ranjitshs commented 3 days ago

Describe the issue

I think, with https://github.com/microsoft/onnxruntime/pull/22460 changes, in AIX below test failures are introduced. In 1.20.0 branch and older branch, alloc_type value is 0 , but in main branch it's getting updated as 1 causing test failure. is there any env settings/compiler defines for env to fix this ?


0) root @ aixoss1-lp6: /home/buildusr/onnxruntime/build/Linux/Release
# ./onnxruntime_test_all "--gtest_filter=TensorTest.EmptyTensorTest"
Note: Google Test filter = TensorTest.EmptyTensorTest
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from TensorTest
[ RUN      ] TensorTest.EmptyTensorTest
/home/buildusr/onnxruntime/onnxruntime/test/framework/tensor_test.cc:144: Failure
Expected equality of these values:
  location.alloc_type
    Which is: 1
  OrtAllocatorType::OrtDeviceAllocator
    Which is: 0

[  FAILED  ] TensorTest.EmptyTensorTest (0 ms)
[----------] 1 test from TensorTest (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (0 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] TensorTest.EmptyTensorTest

 1 FAILED TEST

(1) root @ aixoss1-lp6: /home/buildusr/onnxruntime/build/Linux/Release
# ./onnxruntime_test_all "--gtest_filter=AllocatorTest.CPUAllocatorTest"
Note: Google Test filter = AllocatorTest.CPUAllocatorTest
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from AllocatorTest
[ RUN      ] AllocatorTest.CPUAllocatorTest
/home/buildusr/onnxruntime/onnxruntime/test/framework/allocator_test.cc:22: Failure
Expected equality of these values:
  cpu_arena->Info().alloc_type
    Which is: 1
  OrtAllocatorType::OrtDeviceAllocator
    Which is: 0

[  FAILED  ] AllocatorTest.CPUAllocatorTest (0 ms)
[----------] 1 test from AllocatorTest (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (0 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] AllocatorTest.CPUAllocatorTest

 1 FAILED TEST

Urgency

No response

Target platform

AIX

Build script

https://onnxruntime.ai/docs/build/inferencing.html is having build steps.

Error / output

it's mention in describe section.

Visual Studio Version

No response

GCC / Compiler Version

10.3

ranjitshs commented 3 days ago

@edgchen1 @snnn FYI.

tianleiwu commented 3 days ago

@edgchen1, https://github.com/microsoft/onnxruntime/pull/22460 need update those tests to check whether pointer is 4 bytes to align with the code.

edgchen1 commented 3 days ago

Thanks for reporting this. @ranjitshs can you try this branch and see if it fixes the test failures?

https://github.com/microsoft/onnxruntime/tree/edgchen1/fix_cpu_allocator_tests

ranjitshs commented 2 days ago

@edgchen1 yes. Failed tests are passing in above mentioned branch.

(0) root @ aixoss1-lp6: /home/buildusr/onnxruntime/build/Linux/Release
# ./onnxruntime_test_all "--gtest_filter=TensorTest.EmptyTensorTest"
Note: Google Test filter = TensorTest.EmptyTensorTest
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from TensorTest
[ RUN      ] TensorTest.EmptyTensorTest
[       OK ] TensorTest.EmptyTensorTest (0 ms)
[----------] 1 test from TensorTest (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (0 ms total)
[  PASSED  ] 1 test.

(0) root @ aixoss1-lp6: /home/buildusr/onnxruntime/build/Linux/Release
# ./onnxruntime_test_all "--gtest_filter=AllocatorTest.CPUAllocatorTest"
Note: Google Test filter = AllocatorTest.CPUAllocatorTest
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from AllocatorTest
[ RUN      ] AllocatorTest.CPUAllocatorTest
[       OK ] AllocatorTest.CPUAllocatorTest (0 ms)
[----------] 1 test from AllocatorTest (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (0 ms total)
[  PASSED  ] 1 test.

(0) root @ aixoss1-lp6: /home/buildusr/onnxruntime/build/Linux/Release
# git branch
* (HEAD detached at upstream/edgchen1/fix_cpu_allocator_tests)
  aix-build-break
  gh-pages
  main