Skip to content

Commit

Permalink
update global thread test
Browse files Browse the repository at this point in the history
  • Loading branch information
mszhanyi committed Jan 23, 2024
1 parent 93373c9 commit 298347c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions onnxruntime/test/global_thread_pools/test_inference.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "test_allocator.h"
#include "../shared_lib/test_fixture.h"
#include <stdlib.h>
#include "test/common/cuda_op_test_utils.h"

struct Input {
const char* name = nullptr;
Expand Down Expand Up @@ -56,11 +55,11 @@ static void RunSession(OrtAllocator& allocator, Ort::Session& session_object,
// size_t total_len = type_info.GetElementCount();
ASSERT_EQ(values_y.size(), static_cast<size_t>(5));

auto tolerance = 1e-6f;
// test inference is using onnxruntime_shared_lib_test_LIBS, so HasCudaEnvironment(800) isn't available
#ifdef USE_CUDA
if (HasCudaEnvironment(800)) {
tolerance = 1e-5f;
}
const float tolerance = 1e-5f;
#else
const float tolerance = 1e-6f;
#endif
OutT* f = output_tensor->GetTensorMutableData<OutT>();
for (size_t i = 0; i != static_cast<size_t>(5); ++i) {
Expand Down

0 comments on commit 298347c

Please sign in to comment.