IDMLBindingTable::BindOutputs method (directml.h)
Binds a set of resources as output tensors.
If binding for a compiled operator, the number of bindings must exactly match the number of inputs of the operator, including optional tensors. This can be determined from the operator description used to create the operator. If too many or too few bindings are provided, device removal will occur. For optional tensors, you may use DML_BINDING_TYPE_NONE to specify 'no binding'. Otherwise, the binding type must match the tensor type when the operator was created.
For operator initializers, the output bindings are the persistent resources of each operator, supplied in the order the operators were given when creating or resetting the initializer. If a particular operator does not require a persistent resource, you should prove an empty binding in that slot.
To unbind all input resources, supply a rangeCount of 0, and a value of nullptr for bindings.
The writable areas of two output tensors must not overlap with one another. The 'writable area' of an output buffer being bound is defined as being the start offset of the buffer range, up to the TotalTensorSizeInBytes as specified in the tensors description.
All buffers being bound as output must have heap type D3D12_HEAP_TYPE_DEFAULT.
Syntax
void BindOutputs(
UINT bindingCount,
[in, optional] const DML_BINDING_DESC *bindings
);
Parameters
bindingCount
Type: UINT
This parameter determines the size of the bindings array (if provided).
[in, optional] bindings
Type: const DML_BINDING_DESC*
An optional pointer to a constant array of DML_BINDING_DESC containing descriptions of the tensor resources to bind.
Return value
None
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | directml.h |
Library | DirectML.lib |
DLL | DirectML.dll |