diff --git a/cmake/onnxruntime_unittests.cmake b/cmake/onnxruntime_unittests.cmake index 39e79b740b..87f76a0529 100644 --- a/cmake/onnxruntime_unittests.cmake +++ b/cmake/onnxruntime_unittests.cmake @@ -1043,6 +1043,11 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) DEPENDS ${all_dependencies} ) + if (onnxruntime_USE_ROCM) + target_include_directories(onnxruntime_test_debug_node_inputs_outputs PRIVATE ${onnxruntime_ROCM_HOME}/hipfft/include ${onnxruntime_ROCM_HOME}/include ${onnxruntime_ROCM_HOME}/hipcub/include ${onnxruntime_ROCM_HOME}/hiprand/include ${onnxruntime_ROCM_HOME}/rocrand/include) + target_include_directories(onnxruntime_test_debug_node_inputs_outputs PRIVATE ${ONNXRUNTIME_ROOT} ${CMAKE_CURRENT_BINARY_DIR}/amdgpu/onnxruntime) + endif(onnxruntime_USE_ROCM) + target_compile_definitions(onnxruntime_test_debug_node_inputs_outputs PRIVATE DEBUG_NODE_INPUTS_OUTPUTS) endif(onnxruntime_DEBUG_NODE_INPUTS_OUTPUTS) diff --git a/onnxruntime/test/providers/provider_test_utils.cc b/onnxruntime/test/providers/provider_test_utils.cc index 6374e441d5..49fc345616 100644 --- a/onnxruntime/test/providers/provider_test_utils.cc +++ b/onnxruntime/test/providers/provider_test_utils.cc @@ -851,9 +851,10 @@ std::vector OpTester::ExecuteModel( expected_shape.NumDimensions()); for (size_t d = 0; d < inferred_dims.size(); ++d) { // check equal unless the input involved a symbolic dimension - if (inferred_dims[d] != -1) + if (inferred_dims[d] != -1) { EXPECT_EQ(expected_shape[d], inferred_dims[d]) << "Output idx = " << idx << " dim = " << d; + } } } Check(expected_data, ort_value.Get(), provider_type);