mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
[JSEP] fix constructor for OrtDevice (#15805)
### Description Add the missing `OrtDevice` initialization in JSEP introduced by #15618
This commit is contained in:
parent
33d1372729
commit
df7424e11f
1 changed files with 2 additions and 3 deletions
|
|
@ -295,7 +295,7 @@ std::unique_ptr<KernelRegistry> RegisterKernels() {
|
|||
using namespace js;
|
||||
|
||||
JsExecutionProvider::JsExecutionProvider(const JsExecutionProviderInfo& info)
|
||||
: IExecutionProvider{kJsExecutionProvider, true} {
|
||||
: IExecutionProvider{kJsExecutionProvider, OrtDevice(OrtDevice::GPU, OrtDevice::MemType::DEFAULT, 0), true} {
|
||||
}
|
||||
|
||||
// implement RegisterAllocator to test/validate sharing the CPU EP's allocator
|
||||
|
|
@ -315,10 +315,9 @@ void JsExecutionProvider::RegisterAllocator(AllocatorManager& allocator_manager)
|
|||
InsertAllocator(cpu_alloc);
|
||||
}
|
||||
|
||||
OrtDevice custom_device{OrtDevice::GPU, OrtDevice::MemType::DEFAULT, 0};
|
||||
auto custom_alloc = GetAllocator(OrtMemTypeDefault);
|
||||
if (!custom_alloc) {
|
||||
custom_alloc = allocator_manager.GetAllocator(OrtMemTypeDefault, custom_device);
|
||||
custom_alloc = allocator_manager.GetAllocator(OrtMemTypeDefault, default_device_);
|
||||
if (!custom_alloc) {
|
||||
AllocatorCreationInfo customAllocatorCreationInfo([&](int) {
|
||||
return std::make_unique<js::JsCustomAllocator>();
|
||||
|
|
|
|||
Loading…
Reference in a new issue