Build test

This commit is contained in:
Ryan Hill 2021-04-19 18:58:29 -07:00
parent 7c3855d655
commit d9d2c3d538
4 changed files with 10 additions and 9 deletions

View file

@ -102,12 +102,7 @@ using IndexedSubGraph_MetaDef = IndexedSubGraph::MetaDef;
namespace onnxruntime {
namespace contrib {
void Link_embed_layer_norm_helper();
} // namespace contrib
ProviderHost* g_host{};
//ProviderHost* g_host{};
ProviderInfo_CUDA* GetProviderInfo_CUDA();

View file

@ -8,13 +8,15 @@
#include <mutex>
#include "core/providers/shared/common.h"
#if 0
namespace onnxruntime {
ProviderHost* g_host = Provider_GetHost();
}
#endif
// Override default new/delete so that we match the host's allocator
void* operator new(size_t n) {
onnxruntime::g_host = Provider_GetHost();
// onnxruntime::g_host = Provider_GetHost();
return Provider_GetHost()->HeapAllocate(n);
}
void operator delete(void* p) { return Provider_GetHost()->HeapFree(p); }

View file

@ -4,6 +4,8 @@
// Public wrappers around internal ort interfaces (currently)
// In the future the internal implementations could derive from these to remove the need for the wrapper implementations
#include "core/providers/shared/common.h"
#define PROVIDER_DISALLOW_ALL(TypeName) \
TypeName() = delete; \
TypeName(const TypeName&) = delete; \
@ -761,7 +763,8 @@ struct ProviderHost {
#endif
};
extern ProviderHost* g_host;
#define g_host Provider_GetHost()
//extern ProviderHost* g_host;
#ifdef SHARED_PROVIDER

View file

@ -1,7 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifdef USE_CUDA
#if 0 // TODO: Can't call these directly from external code as Cuda is now a shared library
//#ifdef USE_CUDA
#include "gtest/gtest.h"
#include "core/providers/cuda/cuda_common.h"