HDK
|
#include <dml_provider_factory.h>
Public Member Functions | |
ORT_API2_STATUS (SessionOptionsAppendExecutionProvider_DML, _In_ OrtSessionOptions *options, int device_id) | |
ORT_API2_STATUS (SessionOptionsAppendExecutionProvider_DML1, _In_ OrtSessionOptions *options, _In_ IDMLDevice *dml_device, _In_ ID3D12CommandQueue *cmd_queue) | |
ORT_API2_STATUS (CreateGPUAllocationFromD3DResource, _In_ ID3D12Resource *d3d_resource, _Out_ void **dml_resource) | |
ORT_API2_STATUS (FreeGPUAllocation, _In_ void *dml_resource) | |
ORT_API2_STATUS (GetD3D12ResourceFromAllocation, _In_ OrtAllocator *provider, _In_ void *dml_resource, _Out_ ID3D12Resource **d3d_resource) | |
ORT_API2_STATUS (SessionOptionsAppendExecutionProvider_DML2, _In_ OrtSessionOptions *options, OrtDmlDeviceOptions *device_opts) | |
Definition at line 93 of file dml_provider_factory.h.
OrtDmlApi::ORT_API2_STATUS | ( | SessionOptionsAppendExecutionProvider_DML | , |
_In_ OrtSessionOptions * | options, | ||
int | device_id | ||
) |
Creates a DirectML Execution Provider which executes on the hardware adapter with the given device_id, also known as the adapter index. The device ID corresponds to the enumeration order of hardware adapters as given by IDXGIFactory::EnumAdapters. A device_id of 0 always corresponds to the default adapter, which is typically the primary display GPU installed on the system. A negative device_id is invalid.
OrtDmlApi::ORT_API2_STATUS | ( | SessionOptionsAppendExecutionProvider_DML1 | , |
_In_ OrtSessionOptions * | options, | ||
_In_ IDMLDevice * | dml_device, | ||
_In_ ID3D12CommandQueue * | cmd_queue | ||
) |
Creates a DirectML Execution Provider using the given DirectML device, and which executes work on the supplied D3D12 command queue. The DirectML device and D3D12 command queue must have the same parent ID3D12Device, or an error will be returned. The D3D12 command queue must be of type DIRECT or COMPUTE (see D3D12_COMMAND_LIST_TYPE). If this function succeeds, the inference session maintains a strong reference on both the dml_device and the command_queue objects. See also: DMLCreateDevice See also: ID3D12Device::CreateCommandQueue
OrtDmlApi::ORT_API2_STATUS | ( | CreateGPUAllocationFromD3DResource | , |
_In_ ID3D12Resource * | d3d_resource, | ||
_Out_ void ** | dml_resource | ||
) |
CreateGPUAllocationFromD3DResource This API creates a DML EP resource based on a user-specified D3D12 resource.
OrtDmlApi::ORT_API2_STATUS | ( | FreeGPUAllocation | , |
_In_ void * | dml_resource | ||
) |
FreeGPUAllocation This API frees the DML EP resource created by CreateGPUAllocationFromD3DResource.
OrtDmlApi::ORT_API2_STATUS | ( | GetD3D12ResourceFromAllocation | , |
_In_ OrtAllocator * | provider, | ||
_In_ void * | dml_resource, | ||
_Out_ ID3D12Resource ** | d3d_resource | ||
) |
GetD3D12ResourceFromAllocation This API gets the D3D12 resource when an OrtValue has been allocated by the DML EP.
OrtDmlApi::ORT_API2_STATUS | ( | SessionOptionsAppendExecutionProvider_DML2 | , |
_In_ OrtSessionOptions * | options, | ||
OrtDmlDeviceOptions * | device_opts | ||
) |
SessionOptionsAppendExecutionProvider_DML2 Creates a DirectML Execution Provider given the supplied device options that contain a performance preference (high power, low power, or default) and a device filter (None, GPU, or NPU).