14 using namespace armnn;
16 TEST_CASE(
"ImportTensorFactoryAskedToCreateManagedTensorThrowsException")
28 TEST_CASE(
"ImportTensorFactoryCreateMallocTensorHandle")
37 auto tensorHandle = factory.CreateTensorHandle(tensorInfo);
43 tensorHandle = factory.CreateTensorHandle(tensorInfo,
false);
55 TEST_CASE(
"CreateSubtensorOfImportTensor")
63 auto tensorHandle = factory.CreateTensorHandle(tensorInfo);
67 uint32_t origin[4] = { 1, 1, 0, 0 };
68 auto subTensor = factory.CreateSubTensorHandle(*tensorHandle, subTensorShape, origin);
71 ARMNN_ASSERT(subTensor->GetParent() == tensorHandle.get());
74 TEST_CASE(
"CreateSubtensorNonZeroXYIsInvalid")
82 auto tensorHandle = factory.CreateTensorHandle(tensorInfo);
87 uint32_t origin[4] = { 0, 0, 1, 1 };
88 auto subTensor = factory.CreateSubTensorHandle(*tensorHandle, subTensorShape, origin);
93 TEST_CASE(
"CreateSubtensorXYMustMatchParent")
101 auto tensorHandle = factory.CreateTensorHandle(tensorInfo);
105 uint32_t origin[4] = { 1, 1, 0, 0 };
106 auto subTensor = factory.CreateSubTensorHandle(*tensorHandle, subTensorShape, origin);
111 TEST_CASE(
"CreateSubtensorMustBeSmallerThanParent")
119 auto tensorHandle = factory.CreateTensorHandle(tensorInfo);
122 uint32_t origin[4] = { 1, 1, 0, 0 };
124 auto subTensor = factory.CreateSubTensorHandle(*tensorHandle, subTensorShape, origin);
unsigned int MemorySourceFlags
Copyright (c) 2021 ARM Limited and Contributors.
#define ARMNN_ASSERT(COND)
This factory creates ClImportTensorHandles that refer to imported memory tensors. ...