PlaidML from nGraph

class PlaidML_Backend : public ngraph::runtime::Backend

Public Functions

std::shared_ptr<ngraph::runtime::Tensor> create_tensor(const ngraph::element::Type &element_type, const Shape &shape)

Create a tensor specific to this backend.

Return
shared_ptr to a new backend-specific tensor
Parameters
  • element_type: The type of the tensor element
  • shape: The shape of the tensor

std::shared_ptr<ngraph::runtime::Tensor> create_tensor(const ngraph::element::Type &element_type, const Shape &shape, void *memory_pointer)

Create a tensor specific to this backend.

Return
shared_ptr to a new backend-specific tensor
Parameters
  • element_type: The type of the tensor element
  • shape: The shape of the tensor
  • memory_pointer: A pointer to a buffer used for this tensor. The size of the buffer must be sufficient to contain the tensor. The lifetime of the buffer is the responsibility of the caller.

std::shared_ptr<ngraph::runtime::Executable> compile(std::shared_ptr<Function> func, bool enable_performance_data = false)

Compiles a Function.

Return
compiled function or nullptr on failure
Parameters
  • func: The function to compile

bool is_supported(const Node &node) const

Test if a backend is capable of supporting an op.

Return
true if the op is supported, false otherwise.
Parameters
  • node: is the op to test.

bool is_supported_property(const Property prop) const

Test if a backend particular property is supported.

Return
true if the property is supported, false otherwise.
Parameters
  • prop: is the feature to test.