summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-04-03 17:13:47 +0200
committerTor Egge <Tor.Egge@online.no>2022-04-03 17:13:47 +0200
commit363bb6411525d55abb0c17ad821a54b63f7f4865 (patch)
treee16f5c826ca1c052b3ba5ecffe1e5c1496ce5e0f
parenta8ebc51eaeb26c977e997e6a9f1dab2123cdddcf (diff)
Track changes to onnxruntime API.
-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));
}