Commit e7e59022 authored by Rob Earhart's avatar Rob Earhart Committed by Scott Cyphers

Remove parent from PlaidML tensor initializer (#2960)

parent 5f83ff57
...@@ -31,15 +31,14 @@ ngraph::runtime::plaidml::PlaidML_Backend::PlaidML_Backend(const char* configura ...@@ -31,15 +31,14 @@ ngraph::runtime::plaidml::PlaidML_Backend::PlaidML_Backend(const char* configura
std::shared_ptr<ngraph::runtime::Tensor> ngraph::runtime::plaidml::PlaidML_Backend::create_tensor( std::shared_ptr<ngraph::runtime::Tensor> ngraph::runtime::plaidml::PlaidML_Backend::create_tensor(
const ngraph::element::Type& element_type, const ngraph::Shape& shape) const ngraph::element::Type& element_type, const ngraph::Shape& shape)
{ {
return std::make_shared<PlaidML_Tensor>( return std::make_shared<PlaidML_Tensor>(&m_config, element_type, shape, "direct_data", nullptr);
this, &m_config, element_type, shape, "direct_data", nullptr);
} }
std::shared_ptr<ngraph::runtime::Tensor> ngraph::runtime::plaidml::PlaidML_Backend::create_tensor( std::shared_ptr<ngraph::runtime::Tensor> ngraph::runtime::plaidml::PlaidML_Backend::create_tensor(
const ngraph::element::Type& element_type, const Shape& shape, void* memory_pointer) const ngraph::element::Type& element_type, const Shape& shape, void* memory_pointer)
{ {
return std::make_shared<PlaidML_Tensor>( return std::make_shared<PlaidML_Tensor>(
this, &m_config, element_type, shape, "direct_data", memory_pointer); &m_config, element_type, shape, "direct_data", memory_pointer);
} }
std::shared_ptr<ngraph::runtime::Executable> std::shared_ptr<ngraph::runtime::Executable>
......
...@@ -22,13 +22,12 @@ ...@@ -22,13 +22,12 @@
namespace vp = vertexai::plaidml; namespace vp = vertexai::plaidml;
ngraph::runtime::plaidml::PlaidML_Tensor::PlaidML_Tensor(Backend* parent, ngraph::runtime::plaidml::PlaidML_Tensor::PlaidML_Tensor(Config* config,
Config* config,
const ngraph::element::Type& element_type, const ngraph::element::Type& element_type,
const ngraph::Shape& shape, const ngraph::Shape& shape,
const std::string& name, const std::string& name,
void* memory) void* memory)
: Tensor{std::make_shared<ngraph::descriptor::Tensor>(element_type, shape, name), parent} : Tensor{std::make_shared<ngraph::descriptor::Tensor>(element_type, shape, name)}
, m_tensor{config->dev->allocate( , m_tensor{config->dev->allocate(
to_plaidml(config->ctx, element_type, shape, ConversionUse::FOR_IO))} to_plaidml(config->ctx, element_type, shape, ConversionUse::FOR_IO))}
, m_memory{memory} , m_memory{memory}
......
...@@ -35,8 +35,7 @@ namespace ngraph ...@@ -35,8 +35,7 @@ namespace ngraph
class ngraph::runtime::plaidml::PlaidML_Tensor final : public ngraph::runtime::Tensor class ngraph::runtime::plaidml::PlaidML_Tensor final : public ngraph::runtime::Tensor
{ {
public: public:
PlaidML_Tensor(Backend* parent, PlaidML_Tensor(Config* config,
Config* config,
const ngraph::element::Type& element_type, const ngraph::element::Type& element_type,
const ngraph::Shape& shape, const ngraph::Shape& shape,
const std::string& name, const std::string& name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment