summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eval/src/tests/tensor/onnx_wrapper/onnx_wrapper_test.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/eval/src/tests/tensor/onnx_wrapper/onnx_wrapper_test.cpp b/eval/src/tests/tensor/onnx_wrapper/onnx_wrapper_test.cpp
index e50c41e2e09..021b20149d1 100644
--- a/eval/src/tests/tensor/onnx_wrapper/onnx_wrapper_test.cpp
+++ b/eval/src/tests/tensor/onnx_wrapper/onnx_wrapper_test.cpp
@@ -482,7 +482,11 @@ TEST(OnnxTest, inspect_float_to_int8_conversion) {
TEST(OnnxTest, default_allocator_type) {
Ort::AllocatorWithDefaultOptions default_alloc;
+#if ORT_API_VERSION >= 10
+ OrtAllocatorType res = OrtInvalidAllocator;
+#else
OrtAllocatorType res = Invalid;
+#endif
Ort::ThrowOnError(Ort::GetApi().MemoryInfoGetType(default_alloc.GetInfo(), &res));
fprintf(stderr, "default allocator type: %d\n", int(res));
}