Updated test to cover sequences
This commit is contained in:
parent
a828bb9f79
commit
3c486ebf72
1 changed files with 9 additions and 6 deletions
|
|
@ -8,7 +8,7 @@ TEST(TestOpTensorCopy, CopyDeviceToDeviceTensor)
|
|||
|
||||
kp::Manager mgr;
|
||||
|
||||
std::vector<float> testVecA{ 9, 8, 7 };
|
||||
std::vector<float> testVecA{ 1, 2, 3 };
|
||||
std::vector<float> testVecB{ 0, 0, 0 };
|
||||
|
||||
std::shared_ptr<kp::Tensor> tensorA{ new kp::Tensor(testVecA) };
|
||||
|
|
@ -33,7 +33,7 @@ TEST(TestOpTensorCopy, CopyDeviceToDeviceTensorMulti)
|
|||
|
||||
kp::Manager mgr;
|
||||
|
||||
std::vector<float> testVecA{ 9, 8, 7 };
|
||||
std::vector<float> testVecA{ 2, 3, 4 };
|
||||
std::vector<float> testVecB{ 0, 0, 0 };
|
||||
std::vector<float> testVecC{ 0, 0, 0 };
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ TEST(TestOpTensorCopy, CopyDeviceToHostTensor)
|
|||
|
||||
kp::Manager mgr;
|
||||
|
||||
std::vector<float> testVecA{ 9, 8, 7 };
|
||||
std::vector<float> testVecA{ 3, 4, 5 };
|
||||
std::vector<float> testVecB{ 0, 0, 0 };
|
||||
|
||||
std::shared_ptr<kp::Tensor> tensorA{ new kp::Tensor(testVecA) };
|
||||
|
|
@ -92,7 +92,7 @@ TEST(TestOpTensorCopy, CopyHostToDeviceTensor)
|
|||
|
||||
kp::Manager mgr;
|
||||
|
||||
std::vector<float> testVecA{ 9, 8, 7 };
|
||||
std::vector<float> testVecA{ 4, 5, 6 };
|
||||
std::vector<float> testVecB{ 0, 0, 0 };
|
||||
|
||||
std::shared_ptr<kp::Tensor> tensorA{ new kp::Tensor(
|
||||
|
|
@ -101,6 +101,9 @@ TEST(TestOpTensorCopy, CopyHostToDeviceTensor)
|
|||
|
||||
mgr.rebuild({ tensorA, tensorB }, false);
|
||||
|
||||
// Manually copy data into host memory of Tensor
|
||||
tensorA->mapDataIntoHostMemory();
|
||||
|
||||
// Only calling sync on device type tensor
|
||||
mgr.evalOpDefault<kp::OpTensorSyncDevice>({ tensorB });
|
||||
|
||||
|
|
@ -121,7 +124,7 @@ TEST(TestOpTensorCopy, CopyHostToHostTensor)
|
|||
|
||||
kp::Manager mgr;
|
||||
|
||||
std::vector<float> testVecA{ 9, 8, 7 };
|
||||
std::vector<float> testVecA{ 5, 6, 7 };
|
||||
std::vector<float> testVecB{ 0, 0, 0 };
|
||||
|
||||
std::shared_ptr<kp::Tensor> tensorA{ new kp::Tensor(
|
||||
|
|
@ -148,7 +151,7 @@ TEST(TestOpTensorCopy, SingleTensorShouldFail)
|
|||
|
||||
kp::Manager mgr;
|
||||
|
||||
std::vector<float> testVecA{ 9, 8, 7 };
|
||||
std::vector<float> testVecA{ 6, 7, 8 };
|
||||
|
||||
std::shared_ptr<kp::Tensor> tensorA{ new kp::Tensor(
|
||||
testVecA, kp::Tensor::TensorTypes::eHost) };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue