Skip to content

Commit

Permalink
Change API Name
Browse files Browse the repository at this point in the history
  • Loading branch information
nums11 committed Sep 21, 2023
1 parent 9a32189 commit ff87aa2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/onnxruntime/core/providers/dml/dml_provider_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ struct OrtDmlApi {
ORT_API2_STATUS(GetD3D12ResourceFromAllocation, _In_ OrtAllocator* provider, _In_ void* dml_resource, _Out_ ID3D12Resource** d3d_resource);

/**
* OrtSessionOptionsAppendExecutionProvider_DML2
* SessionOptionsAppendExecutionProvider_DML2
* Creates a DirectML Execution Provider given the supplied device options that contain a performance preference
* (high power, low power, or defult) and a device filter (None, GPU, or NPU).
*/
ORT_API2_STATUS(OrtSessionOptionsAppendExecutionProvider_DML2, _In_ OrtSessionOptions* options, OrtDmlDeviceOptions* device_opts);
ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_DML2, _In_ OrtSessionOptions* options, OrtDmlDeviceOptions* device_opts);
};

#ifdef __cplusplus
Expand Down
5 changes: 2 additions & 3 deletions onnxruntime/core/providers/dml/dml_provider_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ bool IsNPU(IDXCoreAdapter* compute_adapter) {
return !(compute_adapter->IsAttributeSupported(DXCORE_ADAPTER_ATTRIBUTE_D3D12_GRAPHICS));
}

ORT_API_STATUS_IMPL(OrtSessionOptionsAppendExecutionProvider_DML2, _In_ OrtSessionOptions* options, OrtDmlDeviceOptions* device_opts) {
ORT_API_STATUS_IMPL(SessionOptionsAppendExecutionProvider_DML2, _In_ OrtSessionOptions* options, OrtDmlDeviceOptions* device_opts) {
API_IMPL_BEGIN
OrtDmlPerformancePreference perf_pref = device_opts->perf_pref;
OrtDmlDeviceFilter dev_filter = device_opts->dev_filter;
Expand Down Expand Up @@ -377,8 +377,7 @@ static constexpr OrtDmlApi ort_dml_api_10_to_x = {
&OrtSessionOptionsAppendExecutionProviderEx_DML,
&CreateGPUAllocationFromD3DResource,
&FreeGPUAllocation,
&GetD3D12ResourceFromAllocation,
&OrtSessionOptionsAppendExecutionProvider_DML2
&GetD3D12ResourceFromAllocation
};

const OrtDmlApi* GetOrtDmlApi(_In_ uint32_t /*version*/) NO_EXCEPTION {
Expand Down

0 comments on commit ff87aa2

Please sign in to comment.