Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions cmake/onnxruntime_test_pch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
target_precompile_headers(onnxruntime_test_all PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/test_pch.h"
)
target_precompile_headers(onnxruntime_provider_test PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/test_pch.h"
)
if (TARGET onnxruntime_provider_test)
target_precompile_headers(onnxruntime_provider_test PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/test_pch.h"
)
endif()
endif()

# Exclude certain files that might conflict with PCH
Expand Down
10 changes: 5 additions & 5 deletions onnxruntime/core/providers/cpu/ml/tree_ensemble_attribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,6 @@ struct TreeEnsembleAttributesV5 {
for (auto i : nodes_modes_i) {
nodes_modes.push_back(static_cast<NODE_MODE_ONNX>(i));
}
#else
// GetVectorAttrsOrDefault is not part of the minimal build.
// As a result, TreeEnsemble v5 cannot be available in this build.
ORT_THROW("TreeEnsemble(ai.onnx.ml==5) is not supported with the minimal build.");
#endif

aggregate_function = info.GetAttrOrDefault<int64_t>("aggregate_function", 1);
leaf_targetids = info.GetAttrsOrDefault<int64_t>("leaf_targetids");
Expand All @@ -151,6 +146,11 @@ struct TreeEnsembleAttributesV5 {
nodes_truenodeids = info.GetAttrsOrDefault<int64_t>("nodes_truenodeids");
post_transform = info.GetAttrOrDefault<int64_t>("post_transform", 0);
tree_roots = info.GetAttrsOrDefault<int64_t>("tree_roots");
#else
// GetVectorAttrsOrDefault is not part of the minimal build.
// As a result, TreeEnsemble v5 cannot be available in this build.
ORT_THROW("TreeEnsemble(ai.onnx.ml==5) is not supported with the minimal build.");
#endif
}

void convert_to_v3(TreeEnsembleAttributesV3<ThresholdType>& output) const {
Expand Down
3 changes: 2 additions & 1 deletion onnxruntime/test/platform/device_discovery_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include "gtest/gtest.h"

#if !defined(ORT_MINIMAL_BUILD) && !defined(_GAMING_XBOX)
namespace onnxruntime::test {

namespace {

std::vector<OrtHardwareDevice> GetDevicesByType(OrtHardwareDeviceType device_type) {
Expand All @@ -31,3 +31,4 @@ TEST(DeviceDiscoveryTest, HasCpuDevice) {
}

} // namespace onnxruntime::test
#endif // !defined(ORT_MINIMAL_BUILD) && !defined(_GAMING_XBOX)
1 change: 1 addition & 0 deletions onnxruntime/test/platform/file_io_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "gtest/gtest.h"

#include "core/common/span_utils.h"
#include "test/util/include/asserts.h"
#include "test/util/include/file_util.h"

namespace onnxruntime {
Expand Down
4 changes: 4 additions & 0 deletions onnxruntime/test/providers/provider_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

#include "test/unittest_util/checkers.h"
#include "test/unittest_util/conversion.h"

#if !defined(ORT_MINIMAL_BUILD)
#include "test/unittest_util/model_tester.h"
#include "test/unittest_util/op_tester.h"
#endif // !defined(ORT_MINIMAL_BUILD)

#include "test/unittest_util/run_options_config_keys.h"
Loading