IDMLOperatorInitializer interface (directml.h)

Represents a specialized object whose purpose is to initialize compiled operators. To create an instance of this object, call IDMLDevice::CreateOperatorInitializer. The IDMLOperatorInitializer interface inherits from IDMLDispatchable.

An operator initializer is associated with one or more compiled operators, which are the targets for initialization. You can record operator initialization onto a command list using IDMLCommandRecorder::RecordDispatch. When the initialization completes execution on the GPU, all of the target operators enter the initialized state. You must initialize all operators exactly once before they can be executed.

Inheritance

The IDMLOperatorInitializer interface inherits from the IDMLDispatchable interface.

Methods

The IDMLOperatorInitializer interface has these methods.

 
IDMLOperatorInitializer::Reset

Resets the initializer to handle initialization of a new set of operators.

Remarks

Operator initializers are reusable: once an instance has been used to initialize a set of operators, you can reset it with a different set of compiled operators as targets.

When executing an initializer, the expected bindings are as follows:

  • Inputs should be one buffer array binding for each target operator, in the order that you originally specified the operators when creating or resetting the initializer. Each buffer array binding itself should have a size equal to the inputs of its respective operator. Alternatively, you may specify NONE for a binding to bind no inputs for initialization of that target operator.
  • Outputs should be the persistent resources for each target operator, in the order that you originally specified the operators when creating or resetting the initializer.
  • As with any dispatchable object (an operator initializer, or a compiled operator), the initializer may require a temporary resource. Call IDMLDispatchable::GetBindingProperties to determine the require size of the temporary resource.
  • Operator initializers don't ever require persistent resources. Therefore, calling IDMLDispatchable::GetBindingProperties on an operator initializer always returns a PersistentResourceSize of 0.

The operator initializer itself doesn't need to be initialized—GPU initialization only applies to compiled operators.

Requirements

Requirement Value
Target Platform Windows
Header directml.h

See also

Binding in DirectML

IDMLDispatchable