Fixed all OpTensorSync tests

This commit is contained in:
Alejandro Saucedo 2021-02-26 21:36:20 +00:00
parent b3abbf1bb4
commit fd0f0d3eb4
2 changed files with 50 additions and 54 deletions

View file

@ -7,12 +7,12 @@ OpTensorCopy::OpTensorCopy(const std::vector<std::shared_ptr<Tensor>>& tensors)
{
KP_LOG_DEBUG("Kompute OpTensorCopy constructor with params");
this->mTensors = tensors;
if (this->mTensors.size() < 2) {
throw std::runtime_error(
"Kompute OpTensorCopy called with less than 2 tensor");
}
this->mTensors = tensors;
}
OpTensorCopy::~OpTensorCopy()