11 #include <arm_compute/dynamic_fusion/sketch/gpu/GpuWorkloadContext.h>
12 #include <arm_compute/dynamic_fusion/sketch/gpu/GpuWorkloadSketch.h>
13 #include <arm_compute/dynamic_fusion/sketch/gpu/operators/GpuResize.h>
14 #include <arm_compute/dynamic_fusion/sketch/gpu/operators/GpuOutput.h>
16 using namespace arm_compute::experimental::dynamic_fusion;
17 using namespace armnn::armcomputetensorutils;
26 auto compileCtx = arm_compute::CLKernelLibrary::get().get_compile_context();
27 auto workloadContext = GpuWorkloadContext(&compileCtx);
28 GpuWorkloadSketch sketch{ &workloadContext };
30 arm_compute::TensorInfo aclInputInfo = BuildArmComputeTensorInfo(input, descriptor.
m_DataLayout);
31 aclInputInfo.set_are_values_constant(input.
IsConstant());
32 arm_compute::ITensorInfo* inputInfo = workloadContext.create_tensor_info(aclInputInfo);
36 return GpuResize::validate_op(sketch, inputInfo, resizeAttributes);
43 GpuWorkloadSketch* sketch = blob->
sketch.get();
45 std::vector<arm_compute::ITensorInfo*> inputTensorInfos = {};
46 std::vector<arm_compute::ITensorInfo*> outputTensorInfos = {};
48 arm_compute::TensorInfo aclInputInfo = BuildArmComputeTensorInfo(input, descriptor.
m_DataLayout);
49 aclInputInfo.set_are_values_constant(input.
IsConstant());
51 inputTensorInfos.emplace_back(workloadContext->create_tensor_info(aclInputInfo));
60 const bool supported = aclStatus.error_code() == arm_compute::ErrorCode::OK;
66 arm_compute::ITensorInfo* addOutputInfo = GpuResize::create_op(*sketch,
71 outputTensorInfos.emplace_back(workloadContext->create_tensor_info());
72 GpuOutput::create_op(*sketch, addOutputInfo, outputTensorInfos[0]);
75 blob->
inputTensorInfos = std::make_unique<std::vector<arm_compute::ITensorInfo*>>(inputTensorInfos);
76 blob->
outputTensorInfos = std::make_unique<std::vector<arm_compute::ITensorInfo*>>(outputTensorInfos);