onnxruntime/winml/lib/Common/inc/common.h
Ryan Lai f207f0bf5e
Add WinML Model testing (#5417)
* Model test start with float

* Clean up code and add environment variable detection

* Move into namespace

* PR comments

* Fix linker errors in latest merge to master and also fix warning

* add skipping model test mechanism

* Return std::string instead of writing to buffer

* Address case where env variable is larger than max_path

* use const static string for test reason

* Disable x86 tests and don't build if ort memory checker is enabled

* Add comment

* Add additional failing x86 tests and ifdef for checking fo rx86 build

* PR comments
2020-10-15 19:04:12 -07:00

54 lines
No EOL
1.2 KiB
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
// STL
#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
#define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING
#include <algorithm>
#include <cassert>
#include <codecvt>
#include <functional>
#include <iterator>
#include <locale>
#include <numeric>
#include <sstream>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <variant>
#include <vector>
#include <thread>
#include <tuple>
// WIL
#include <wil/cppwinrt.h>
#include <wil/result.h>
#include <wil/wrl.h>
#include <wil/winrt.h>
// Windows pollutes with preprocessor that redefine OPTIONAL.
// Undefine OPTIONAL to get onnx macros to resolve correctly.
#ifdef OPTIONAL
#undef OPTIONAL
#endif
#pragma warning(disable : 4100)
// Telemetry
#include "WinMLTelemetryHelper.h"
// Declare global telemetry helper
extern WinMLTelemetryHelper telemetry_helper;
#ifndef WINML_TELEMETRY_DISABLED
// Declare TraceLogging provider
TRACELOGGING_DECLARE_PROVIDER(winml_trace_logging_provider);
#endif //WINML_TELEMETRY_DISABLED
// WinML
#include "errors.h"
#include "NamespaceAliases.h"
#include "StringHelpers.h"
#include "WinML_Lock.h"