onnxruntime/onnxruntime/test/framework/dummy_provider.h
Dmitri Smirnov d1b1cdc5c4
Replace GSL with GSL-LITE submodule and fix up refs (#1920)
Remove gsl subodule and replace with a local copy of gsl-lite
  Refactor for onnxruntime::make_unique
  gsl::span size and index are now size_t
  Remove lambda auto argument type detection.
  Remove constexpr from fail_fast in gsl due to Linux not being happy.
  Comment out std::stream support due to MacOS std lib broken.
  Move make_unique into include/core/common so it is accessible for server builds.
  Relax requirements for onnxruntime/test/providers/cpu/ml/write_scores_test.cc
  due to x86 build.
  Add ONNXRUNTIME_ROOT to Server Lib includes so gsl is recognized
2019-10-01 12:43:29 -07:00

25 lines
799 B
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "core/framework/execution_provider.h"
#include <memory>
#include "dummy_allocator.h"
namespace onnxruntime {
namespace test {
// Dummy execution provider that does nothing, but will trigger checks for copies to/from devices being needed
// in utils::ExecuteGraph
class DummyExecutionProvider : public IExecutionProvider {
static constexpr const char* kDummyExecutionProviderType = "DummyExecutionProvider";
public:
DummyExecutionProvider() : IExecutionProvider{kDummyExecutionProviderType} {
InsertAllocator(onnxruntime::make_unique<DummyAllocator>());
}
std::shared_ptr<KernelRegistry> GetKernelRegistry() const override;
};
} // namespace test
} // namespace onnxruntime