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
std::shared_ptr<ngraph::runtime::Tensor> ngraph::runtime::plaidml::PlaidML_Backend::create_tensor(
const ngraph::element::Type& element_type, const ngraph::Shape& shape)
{
return std::make_shared<PlaidML_Tensor>(
this, &m_config, element_type, shape, "direct_data", nullptr);
return std::make_shared<PlaidML_Tensor>(&m_config, element_type, shape, "direct_data", nullptr);
}
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)
{
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>
......
......@@ -22,13 +22,12 @@
namespace vp = vertexai::plaidml;
ngraph::runtime::plaidml::PlaidML_Tensor::PlaidML_Tensor(Backend* parent,
Config* config,
ngraph::runtime::plaidml::PlaidML_Tensor::PlaidML_Tensor(Config* config,
const ngraph::element::Type& element_type,
const ngraph::Shape& shape,
const std::string& name,
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(
to_plaidml(config->ctx, element_type, shape, ConversionUse::FOR_IO))}
, m_memory{memory}
......
......@@ -35,8 +35,7 @@ namespace ngraph
class ngraph::runtime::plaidml::PlaidML_Tensor final : public ngraph::runtime::Tensor
{
public:
PlaidML_Tensor(Backend* parent,
Config* config,
PlaidML_Tensor(Config* config,
const ngraph::element::Type& element_type,
const ngraph::Shape& shape,
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