aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/dynamic_fusion/gpu/Integration.cpp
diff options
context:
space:
mode:
authorRamy Elgammal <ramelg01@e129512.arm.com>2023-01-11 18:48:04 +0000
committerRamy Elgammal <ramy.elgammal@arm.com>2023-01-25 10:24:23 +0000
commit002e6530f6218b00a28aef9be8b21efb08cf3602 (patch)
treef3e2f9d064b985ffe283512825b34cdd59f29f50 /tests/validation/dynamic_fusion/gpu/Integration.cpp
parentcc2877368d5e15d9ea89d31c84ec651fc0fffd13 (diff)
downloadComputeLibrary-002e6530f6218b00a28aef9be8b21efb08cf3602.tar.gz
Implement dynamic fusion softmax operator
- Return aux tensorInfo by get_aux_tensors() at runtime to init the aux tensor with the right size. - Keep softmax unfusable for this commit - Hence, added Tensor3D to template writer arguments declaration, for sake of keeping dynamic fusion softmax componenets' kernels matching their cl counterparts. Resolves: COMPMID-5523 Change-Id: I667f39545db925f667036ef448302c79a0330373 Signed-off-by: Ramy Elgammal <ramy.elgammal@arm.com> Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/483924 Tested-by: bsgcomp <bsgcomp@arm.com> Reviewed-by: Gunes Bayir <gunes.bayir@arm.com> Comments-Addressed: bsgcomp <bsgcomp@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8986 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/dynamic_fusion/gpu/Integration.cpp')
-rw-r--r--tests/validation/dynamic_fusion/gpu/Integration.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/tests/validation/dynamic_fusion/gpu/Integration.cpp b/tests/validation/dynamic_fusion/gpu/Integration.cpp
index 7f2d439183..6a283f8082 100644
--- a/tests/validation/dynamic_fusion/gpu/Integration.cpp
+++ b/tests/validation/dynamic_fusion/gpu/Integration.cpp
@@ -90,9 +90,10 @@ TEST_CASE(Conv2d, framework::DatasetMode::ALL)
// Instead of using ACL allocated memory, the user can choose to import memory into the tensors
for(auto &data : runtime.get_auxiliary_tensors())
{
- CLTensor *tensor = data.first;
- AuxMemoryInfo aux_mem_req = data.second;
- tensor->allocator()->init(*data.first->info(), aux_mem_req.alignment);
+ CLTensor *tensor = std::get<0>(data);
+ TensorInfo info = std::get<1>(data);
+ AuxMemoryInfo aux_mem_req = std::get<2>(data);
+ tensor->allocator()->init(info, aux_mem_req.alignment);
tensor->allocator()->allocate(); // Use ACL allocated memory
// auto buf = cl::Buffer();
// tensor->allocator()->import_memory(buf); // Or, import external memory
@@ -178,9 +179,10 @@ TEST_CASE(Add_Output_Add_Output, framework::DatasetMode::ALL)
// Instead of using ACL allocated memory, the user can choose to import memory into the tensors
for(auto &data : runtime.get_auxiliary_tensors())
{
- CLTensor *tensor = data.first;
- AuxMemoryInfo aux_mem_req = data.second;
- tensor->allocator()->init(*data.first->info(), aux_mem_req.alignment);
+ CLTensor *tensor = std::get<0>(data);
+ TensorInfo info = std::get<1>(data);
+ AuxMemoryInfo aux_mem_req = std::get<2>(data);
+ tensor->allocator()->init(info, aux_mem_req.alignment);
tensor->allocator()->allocate(); // Use ACL allocated memory
// auto buf = cl::Buffer();
// tensor->allocator()->import_memory(buf); // Or, import external memory
@@ -282,9 +284,10 @@ TEST_CASE(Add_Output_Add_Cast_Cast_Output, framework::DatasetMode::ALL)
// Instead of using ACL allocated memory, the user can choose to import memory into the tensors
for(auto &data : runtime.get_auxiliary_tensors())
{
- CLTensor *tensor = data.first;
- AuxMemoryInfo aux_mem_req = data.second;
- tensor->allocator()->init(*data.first->info(), aux_mem_req.alignment);
+ CLTensor *tensor = std::get<0>(data);
+ TensorInfo info = std::get<1>(data);
+ AuxMemoryInfo aux_mem_req = std::get<2>(data);
+ tensor->allocator()->init(info, aux_mem_req.alignment);
tensor->allocator()->allocate(); // Use ACL allocated memory
// auto buf = cl::Buffer();
// tensor->allocator()->import_memory(buf); // Or, import external memory