blob: 2ccf255236b0350a48bda5238c51cfac0a9814f7 [file] [log] [blame]
Adnan AlSinan2e6d6592023-08-21 13:54:27 +01001/*
2 * Copyright (c) 2023 Arm Limited.
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24#ifndef ACL_SRC_DYNAMIC_FUSION_SKETCH_GPU_CKW_DRIVER_COMPONENTS_GPUCKWPOOL2D_H
25#define ACL_SRC_DYNAMIC_FUSION_SKETCH_GPU_CKW_DRIVER_COMPONENTS_GPUCKWPOOL2D_H
26
27#include "src/core/common/Macros.h"
28#include "src/dynamic_fusion/sketch/gpu/ckw_driver/IGpuCkwComponentDriver.h"
29#include "src/dynamic_fusion/sketch/gpu/components/cl/ClComponentPool2d.h"
30
31#include <string>
32
33namespace arm_compute
34{
35namespace experimental
36{
37namespace dynamic_fusion
38{
39class GpuCkwPool2d : public IGpuCkwComponentDriver
40{
41public:
42 using Attributes = ClComponentPool2d::Attributes;
43 using Settings = ClComponentPool2d::Settings;
44
45 /** Constructor
46 *
47 * For supported configurations please refer to @ref ClComponentCast::validate()
48 *
49 * @param[in] id Component id
50 * @param[in] tensors Tensor arguments to the component
51 * @param[in] attributes Component attributes
52 * @param[in] settings Component settings
53 */
54 GpuCkwPool2d(ComponentId id,
55 const ArgumentPack<ITensorInfo> &tensors,
56 const Attributes &attributes,
57 const Settings &settings);
58 ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE(GpuCkwPool2d);
59 /** Destructor */
60 ~GpuCkwPool2d() override = default;
61 // Inherited methods overriden:
62 virtual void write_component_code(const ComponentGroup &comp_group, GpuCkwVariableTable &vtable, GpuCkwScopedKernelWriter writer) const override;
63 Window get_window() const override;
64 std::string get_name(const ComponentGroup &comp_group) const override;
65
66private:
67 const ITensorInfo *_src;
68 const ITensorInfo *_dst;
69 Attributes _attributes;
70 Settings _settings;
71};
72} // namespace dynamic_fusion
73} // namespace experimental
74} // namespace arm_compute
75
76#endif // ACL_SRC_DYNAMIC_FUSION_SKETCH_GPU_CKW_DRIVER_COMPONENTS_GPUCKWPOOL2D_H