mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-16 21:00:14 +00:00
This addresses a DML performance regression from the following PR resulting in allocations not being rounded and pooled in the DML execution provider. https://github.com/microsoft/onnxruntime/pull/15833 This also fixes a pre-existing limitation that allocations during session initialization (primarily large weights and persistent resources) only bypassed rounding and pooling while using the Winml API. The allocator now also respects a caller's rounding mode parameter when provided.
35 lines
1.4 KiB
C
35 lines
1.4 KiB
C
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
#include "test.h"
|
|
struct AdapterDmlEpTestApi {
|
|
SetupTest AdapterDmlEpTestSetup;
|
|
TeardownClass AdapterDmlEpTestTeardown;
|
|
VoidTest DmlExecutionProviderFlushContext;
|
|
VoidTest DmlExecutionProviderReleaseCompletedReferences;
|
|
VoidTest DmlCreateGPUAllocationFromD3DResource;
|
|
VoidTest DmlCreateAndFreeGPUAllocationFromD3DResource;
|
|
VoidTest GetTensorMemoryInfo;
|
|
VoidTest ExecutionProviderSync;
|
|
VoidTest DmlCopyTensor;
|
|
VoidTest CreateCustomRegistry;
|
|
VoidTest ValueGetDeviceId;
|
|
VoidTest SessionGetInputRequiredDeviceId;
|
|
};
|
|
const AdapterDmlEpTestApi& getapi();
|
|
|
|
WINML_TEST_CLASS_BEGIN(AdapterDmlEpTest)
|
|
WINML_TEST_CLASS_SETUP_METHOD(AdapterDmlEpTestSetup)
|
|
WINML_TEST_CLASS_TEARDOWN_METHOD(AdapterDmlEpTestTeardown)
|
|
WINML_TEST_CLASS_BEGIN_TESTS
|
|
WINML_TEST(AdapterDmlEpTest, DmlExecutionProviderFlushContext)
|
|
WINML_TEST(AdapterDmlEpTest, DmlExecutionProviderReleaseCompletedReferences)
|
|
WINML_TEST(AdapterDmlEpTest, DmlCreateGPUAllocationFromD3DResource)
|
|
WINML_TEST(AdapterDmlEpTest, DmlCreateAndFreeGPUAllocationFromD3DResource)
|
|
WINML_TEST(AdapterDmlEpTest, GetTensorMemoryInfo)
|
|
WINML_TEST(AdapterDmlEpTest, ExecutionProviderSync)
|
|
WINML_TEST(AdapterDmlEpTest, DmlCopyTensor)
|
|
WINML_TEST(AdapterDmlEpTest, CreateCustomRegistry)
|
|
WINML_TEST(AdapterDmlEpTest, ValueGetDeviceId)
|
|
WINML_TEST(AdapterDmlEpTest, SessionGetInputRequiredDeviceId)
|
|
WINML_TEST_CLASS_END()
|