Class Execute

Inheritance Relationships

Derived Type

Class Documentation

class Execute

Subclassed by mindspore::dataset::PyExecute

Public Functions

explicit Execute(const std::shared_ptr<TensorOperation> &op, MapTargetDevice device_type = MapTargetDevice::kCpu, uint32_t device_id = 0)

Constructor.

Parameters
  • op[in] TensorOperation to be applied in Eager mode, it accepts operation in type of shared pointer.

  • device_type[in] Target device environment to perform operation, can be kCPU/kGPU/kAscend310 (default=kCPU).

  • device_id[in] Target device ID to perform operation, only valid when device_type=kAscend310 (default=0).

explicit Execute(const std::shared_ptr<TensorTransform> &op, MapTargetDevice device_type = MapTargetDevice::kCpu, uint32_t device_id = 0)

Constructor.

Parameters
  • op[in] TensorTransform to be applied in Eager mode, it accepts operation in type of shared pointer.

  • device_type[in] Target device environment to perform operation, can be kCPU/kGPU/kAscend310 (default=kCPU).

  • device_id[in] Target device ID to perform operation, only valid when device_type=kAscend310 (default=0).

explicit Execute(const std::reference_wrapper<TensorTransform> &op, MapTargetDevice device_type = MapTargetDevice::kCpu, uint32_t device_id = 0)

Constructor.

Parameters
  • op[in] TensorTransform to be applied in Eager mode, it accepts operation in type of reference.

  • device_type[in] Target device environment to perform operation, can be kCPU/kGPU/kAscend310 (default=kCPU).

  • device_id[in] Target device ID to perform operation, only valid when device_type=kAscend310 (default=0).

explicit Execute(TensorTransform *op, MapTargetDevice device_type = MapTargetDevice::kCpu, uint32_t device_id = 0)

Constructor.

Parameters
  • op[in] TensorTransform to be applied in Eager mode, it accepts operation in type of raw pointer.

  • device_type[in] Target device environment to perform operation, can be kCPU/kGPU/kAscend310 (default=kCPU).

  • device_id[in] Target device ID to perform operation, only valid when device_type=kAscend310 (default=0).

explicit Execute(const std::vector<std::shared_ptr<TensorOperation>> &ops, MapTargetDevice device_type = MapTargetDevice::kCpu, uint32_t device_id = 0)

Constructor.

Parameters
  • ops[in] A vector of TensorOperations to be applied in Eager mode, it accepts operation in type of shared pointer.

  • device_type[in] Target device environment to perform operation, can be kCPU/kGPU/kAscend310 (default=kCPU).

  • device_id[in] Target device ID to perform operation, only valid when device_type=kAscend310 (default=0).

explicit Execute(const std::vector<std::shared_ptr<TensorTransform>> &ops, MapTargetDevice device_type = MapTargetDevice::kCpu, uint32_t device_id = 0)

Constructor.

Parameters
  • ops[in] A vector of TensorTransforms to be applied in Eager mode, it accepts operation in type of shared pointer.

  • device_type[in] Target device environment to perform operation, can be kCPU/kGPU/kAscend310 (default=kCPU).

  • device_id[in] Target device ID to perform operation, only valid when device_type=kAscend310 (default=0).

explicit Execute(const std::vector<std::reference_wrapper<TensorTransform>> &ops, MapTargetDevice device_type = MapTargetDevice::kCpu, uint32_t device_id = 0)

Constructor.

Parameters
  • ops[in] A vector of TensorTransforms to be applied in Eager mode, it accepts operation in type of raw pointer.

  • device_type[in] Target device environment to perform operation, can be kCPU/kGPU/kAscend310 (default=kCPU).

  • device_id[in] Target device ID to perform operation, only valid when device_type=kAscend310 (default=0).

explicit Execute(const std::vector<TensorTransform*> &ops, MapTargetDevice device_type = MapTargetDevice::kCpu, uint32_t device_id = 0)

Constructor.

Parameters
  • ops[in] A vector of TensorTransforms to be applied in Eager mode, it accepts operation in type of raw pointer.

  • device_type[in] Target device environment to perform operation, can be kCPU/kGPU/kAscend310 (default=kCPU).

  • device_id[in] Target device ID to perform operation, only valid when device_type=kAscend310 (default=0).

~Execute()

Destructor.

Status DeviceMemoryRelease()

The function to release device memory on Ascend310.

std::string AippCfgGenerator()

The function to generate AIPP configuration.

Public Static Functions

static Status Run(const std::vector<std::shared_ptr<dataset::Execute>> &data_graph, const std::vector<mindspore::MSTensor> &inputs, std::vector<mindspore::MSTensor> *outputs)

Given a set of Executes, run them.