From 0250fa6c2a0bdbf88c1264f32ad0a1a4e3fec3f3 Mon Sep 17 00:00:00 2001 From: Viet-Hoa Do Date: Mon, 24 Jul 2023 15:47:34 +0100 Subject: Use CLTile for both variable and constant tiles * It's easier to reuse CLTile for other things for example tensor component if it can represent both variable and constant tiles. Partially resolves: COMPMID-6391 Signed-off-by: Viet-Hoa Do Change-Id: Ief06f670332cb339bd31b94a31b4bec186e1f1b8 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9966 Reviewed-by: Gian Marco Iodice Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins Tested-by: Arm Jenkins --- compute_kernel_writer/CMakeLists.txt | 2 - compute_kernel_writer/src/ITile.h | 14 +- compute_kernel_writer/src/cl/CLConstantTile.cpp | 121 ---------------- compute_kernel_writer/src/cl/CLConstantTile.h | 65 --------- compute_kernel_writer/src/cl/CLTile.cpp | 158 ++++++++++++++++----- compute_kernel_writer/src/cl/CLTile.h | 29 +++- compute_kernel_writer/src/cl/ICLTile.cpp | 51 ------- compute_kernel_writer/src/cl/ICLTile.h | 47 ------ .../validation/tests/CLConstantTileTest.hpp | 30 ++-- 9 files changed, 169 insertions(+), 348 deletions(-) delete mode 100644 compute_kernel_writer/src/cl/CLConstantTile.cpp delete mode 100644 compute_kernel_writer/src/cl/CLConstantTile.h delete mode 100644 compute_kernel_writer/src/cl/ICLTile.cpp delete mode 100644 compute_kernel_writer/src/cl/ICLTile.h diff --git a/compute_kernel_writer/CMakeLists.txt b/compute_kernel_writer/CMakeLists.txt index 674bc53309..eddae06f95 100644 --- a/compute_kernel_writer/CMakeLists.txt +++ b/compute_kernel_writer/CMakeLists.txt @@ -130,11 +130,9 @@ target_sources(ckw PRIVATE if(CKW_ENABLE_OPENCL) target_sources(ckw PRIVATE - src/cl/CLConstantTile.cpp src/cl/CLTensorArgument.cpp src/cl/CLHelpers.cpp src/cl/CLTile.cpp - src/cl/ICLTile.cpp src/cl/CLKernelWriter.cpp ) endif() diff --git a/compute_kernel_writer/src/ITile.h b/compute_kernel_writer/src/ITile.h index bed4996607..a54fd9b794 100644 --- a/compute_kernel_writer/src/ITile.h +++ b/compute_kernel_writer/src/ITile.h @@ -66,19 +66,13 @@ public: * * @return the name of the tile */ - std::string name() const - { - return _basename; - } + virtual const std::string &name() const = 0; /** Method to get the tile info * * @return the @ref TileInfo */ - TileInfo info() const - { - return _info; - } + virtual const TileInfo &info() const = 0; /** Method to know whether the tile is assignable or not. * For example, a constant tile is not assignable. @@ -86,10 +80,6 @@ public: * @return true if the tile is assignable */ virtual bool is_assignable() const = 0; - -protected: - TileInfo _info{ DataType::Unknown }; // Tile info - std::string _basename{ "" }; // Tile name }; /** Interface to provide support for scalar access for a Tile. diff --git a/compute_kernel_writer/src/cl/CLConstantTile.cpp b/compute_kernel_writer/src/cl/CLConstantTile.cpp deleted file mode 100644 index e2acffb99b..0000000000 --- a/compute_kernel_writer/src/cl/CLConstantTile.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2023 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "ckw/Error.h" -#include "ckw/TileInfo.h" - -#include "src/Helpers.h" -#include "src/cl/CLConstantTile.h" -#include "src/cl/CLHelpers.h" - -namespace ckw -{ -CLConstantTile::CLConstantTile(const TileContainer &vals, DataType dt) -{ - const int32_t w = vals[0].size(); - const int32_t h = vals.size(); - - _info.width(w); - _info.height(h); - _info.data_type(dt); - - validate_tile_info(_info); - - _vals = TileContainer(h, std::vector(w)); - - for(int32_t y = 0; y < h; ++y) - { - for(int32_t x = 0; x < w; ++x) - { - _vals[y][x] = vals[y][x]; - } - } -} - -TileVariable CLConstantTile::scalar(int32_t row, int32_t col) const -{ - // Clamp to nearest valid edge - col = clamp(col, static_cast(0), _info.width() - 1); - row = clamp(row, static_cast(0), _info.height() - 1); - - // We can use the vector method to retrieve the scalar variable stored in the constant tile - return vector(row, col, 1); -} - -TileVariable CLConstantTile::vector(int32_t row) const -{ - // Clamp to nearest valid edge - row = clamp(row, static_cast(0), _info.height() - 1); - - return vector(row, 0, _info.width()); -} - -TileVariable CLConstantTile::vector(int32_t row, int32_t col_start, int32_t width) const -{ - // Validate the new vector length - cl_validate_vector_length(width); - - // Clamp to nearest valid edge - row = clamp(row, static_cast(0), _info.height() - 1); - - TileVariable t; - t.desc.dt = _info.data_type(); - t.desc.len = width; - - // The vector has the following form: ((data_typeN)(val0, val1,..., ValN-1)) - t.str = "((" + cl_get_variable_datatype_as_string(t.desc.dt, width) + ")"; - t.str += "("; - - int32_t col = col_start; - for(; col < width - 1; ++col) - { - t.str += _vals[row][col]; - t.str += ", "; - } - t.str += _vals[row][col]; - t.str += "))"; - - return t; -} - -std::vector CLConstantTile::all() const -{ - std::vector vars; - - for(int32_t y = 0; y < _info.height(); ++y) - { - for(int32_t x = 0; x < _info.width(); ++x) - { - // We can use the vector method to retrieve all the scalar variables stored in the constant tile - TileVariable t = vector(y, x, 1); - vars.push_back(t); - } - } - return vars; -} - -bool CLConstantTile::is_assignable() const -{ - return false; -} -} // namespace ckw \ No newline at end of file diff --git a/compute_kernel_writer/src/cl/CLConstantTile.h b/compute_kernel_writer/src/cl/CLConstantTile.h deleted file mode 100644 index 658fb63f7f..0000000000 --- a/compute_kernel_writer/src/cl/CLConstantTile.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2023 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef COMPUTE_KERNEL_WRITER_SRC_CL_CLCONSTANTTILE_H -#define COMPUTE_KERNEL_WRITER_SRC_CL_CLCONSTANTTILE_H - -#include "src/ITile.h" -#include "src/cl/ICLTile.h" - -namespace ckw -{ -// Forward declarations -class TileInfo; - -/** OpenCL specific constant tile */ -class CLConstantTile : public ICLTile -{ -public: - /** Constructor - * - * @note A constant tile does not need a name since this object does not return variable's name but rather - * values stored as string type - * - * @param[in] vals The tile container with the constant values as std::string - * @param[in] dt Datatype of the values stored in the tile container - */ - CLConstantTile(const TileContainer &vals, DataType dt); - - // Inherited method overridden - TileVariable scalar(int32_t row, int32_t col) const override; - - TileVariable vector(int32_t row) const override; - - TileVariable vector(int32_t row, int32_t col_start, int32_t width) const override; - - std::vector all() const override; - - bool is_assignable() const override; - -private: - TileContainer _vals{}; -}; -} // namespace ckw - -#endif /* COMPUTE_KERNEL_WRITER_SRC_CL_CLCONSTANTTILE_H */ diff --git a/compute_kernel_writer/src/cl/CLTile.cpp b/compute_kernel_writer/src/cl/CLTile.cpp index cb0b22a23b..c6cf47d831 100644 --- a/compute_kernel_writer/src/cl/CLTile.cpp +++ b/compute_kernel_writer/src/cl/CLTile.cpp @@ -34,6 +34,7 @@ namespace ckw { CLTile::CLTile(const std::string &name, const TileInfo &info) + : _is_constant(false) { validate_tile_info(info); @@ -41,25 +42,66 @@ CLTile::CLTile(const std::string &name, const TileInfo &info) _info = info; } +CLTile::CLTile(const TileContainer &vals, DataType dt) + : _is_constant(true) +{ + const int32_t w = vals[0].size(); + const int32_t h = vals.size(); + + _info.width(w); + _info.height(h); + _info.data_type(dt); + + validate_tile_info(_info); + + _vals = TileContainer(h, std::vector(w)); + + for(int32_t y = 0; y < h; ++y) + { + for(int32_t x = 0; x < w; ++x) + { + _vals[y][x] = vals[y][x]; + } + } +} + +const std::string &CLTile::name() const +{ + return _basename; +} + +const TileInfo &CLTile::info() const +{ + return _info; +} + TileVariable CLTile::scalar(int32_t row, int32_t col) const { // Clamp to nearest valid edge col = clamp(col, static_cast(0), _info.width() - 1); row = clamp(row, static_cast(0), _info.height() - 1); - TileVariable t; - t.str = create_var_name(row); - t.desc.dt = _info.data_type(); - t.desc.len = 1; - - // This check is required because if the width has only one element, we cannot use .s0 - if(_info.width() != 1) + if(_is_constant) { - // Automatic broadcasting - t.str += ".s" + dec_to_hex_as_string(col); + // We can use the vector method to retrieve the scalar variable stored in the constant tile + return vector(row, col, 1); } + else + { + TileVariable t; + t.str = create_var_name(row); + t.desc.dt = _info.data_type(); + t.desc.len = 1; - return t; + // This check is required because if the width has only one element, we cannot use .s0 + if(_info.width() != 1) + { + // Automatic broadcasting + t.str += ".s" + dec_to_hex_as_string(col); + } + + return t; + } } TileVariable CLTile::vector(int32_t row) const @@ -67,11 +109,18 @@ TileVariable CLTile::vector(int32_t row) const // Clamp to nearest valid edge row = clamp(row, static_cast(0), _info.height() - 1); - TileVariable t; - t.str = create_var_name(row); - t.desc.dt = _info.data_type(); - t.desc.len = _info.width(); - return t; + if(_is_constant) + { + return vector(row, 0, _info.width()); + } + else + { + TileVariable t; + t.str = create_var_name(row); + t.desc.dt = _info.data_type(); + t.desc.len = _info.width(); + return t; + } } TileVariable CLTile::vector(int32_t row, int32_t col_start, int32_t width) const @@ -83,38 +132,75 @@ TileVariable CLTile::vector(int32_t row, int32_t col_start, int32_t width) const row = clamp(row, static_cast(0), _info.height() - 1); TileVariable t; - t.str = create_var_name(row); t.desc.dt = _info.data_type(); t.desc.len = width; - if(_info.width() != 1) + if(_is_constant) + { + // The vector has the following form: ((data_typeN)(val0, val1,..., ValN-1)) + t.str = "((" + cl_get_variable_datatype_as_string(t.desc.dt, width) + ")"; + t.str += "("; + + int32_t col = col_start; + for(; col < width - 1; ++col) + { + t.str += _vals[row][col]; + t.str += ", "; + } + t.str += _vals[row][col]; + t.str += "))"; + } + else { - t.str += ".s"; - for(int i = 0; i < width; ++i) + t.str = create_var_name(row); + + if(_info.width() != 1) { - t.str += dec_to_hex_as_string(col_start + i); + t.str += ".s"; + for(int i = 0; i < width; ++i) + { + t.str += dec_to_hex_as_string(col_start + i); + } } } + return t; } std::vector CLTile::all() const { std::vector vars; - for(int32_t y = 0; y < _info.height(); ++y) + + if(_is_constant) { - TileVariable t; - t.str = create_var_name(y); - t.desc.dt = _info.data_type(); - t.desc.len = _info.width(); - vars.push_back(t); + for(int32_t y = 0; y < _info.height(); ++y) + { + for(int32_t x = 0; x < _info.width(); ++x) + { + // We can use the vector method to retrieve all the scalar variables stored in the constant tile + TileVariable t = vector(y, x, 1); + vars.push_back(t); + } + } } + else + { + for(int32_t y = 0; y < _info.height(); ++y) + { + TileVariable t; + t.str = create_var_name(y); + t.desc.dt = _info.data_type(); + t.desc.len = _info.width(); + vars.push_back(t); + } + } + return vars; } bool CLTile::is_assignable() const { - return true; + return !_is_constant; } std::string CLTile::create_var_name(int32_t row) const @@ -122,11 +208,7 @@ std::string CLTile::create_var_name(int32_t row) const std::string var_name = _basename; // If a scalar variable, we do not append the row index - if(_info.height() == 1) - { - return var_name; - } - else + if(_info.height() > 1) { var_name += "_"; var_name += std::to_string(row); @@ -134,4 +216,16 @@ std::string CLTile::create_var_name(int32_t row) const return var_name; } + +std::vector CLTile::supported_vector_lengths() const +{ + return std::vector{ 1, 2, 3, 4, 8, 16 }; +} + +void CLTile::validate_tile_info(const TileInfo &info) const +{ + CKW_ASSERT_MSG(cl_validate_vector_length(info.width()), "Unsupported TileInfo width"); + CKW_ASSERT_MSG(info.data_type() != DataType::Unknown, "DataType::Unknown is not supported"); +} + } // namespace ckw \ No newline at end of file diff --git a/compute_kernel_writer/src/cl/CLTile.h b/compute_kernel_writer/src/cl/CLTile.h index f06bb449c0..46af4de364 100644 --- a/compute_kernel_writer/src/cl/CLTile.h +++ b/compute_kernel_writer/src/cl/CLTile.h @@ -24,7 +24,7 @@ #ifndef COMPUTE_KERNEL_WRITER_SRC_CL_CLTILE_H #define COMPUTE_KERNEL_WRITER_SRC_CL_CLTILE_H -#include "src/cl/ICLTile.h" +#include "src/ITile.h" #include namespace ckw @@ -33,17 +33,31 @@ namespace ckw class TileInfo; /** OpenCL specific tile */ -class CLTile : public ICLTile +class CLTile : public ITile, public IVectorAccess, public IScalarAccess { public: - /** Constructor + /** Initialize a new instance of @ref CLTile class for variable tile. * * @param[in] name Tile name * @param[in] info Tile info */ CLTile(const std::string &name, const TileInfo &info); + /** Initialize a new instane of @ref CLTile class for compile-time constant tile. + * + * @note A constant tile does not need a name since this object does not return variable's name but rather + * values stored as string type + * + * @param[in] vals The tile container with the constant values as std::string + * @param[in] dt Datatype of the values stored in the tile container + */ + CLTile(const TileContainer &vals, DataType dt); + // Inherited method overridden + const std::string &name() const override; + + const TileInfo &info() const override; + TileVariable scalar(int32_t row, int32_t col) const override; TileVariable vector(int32_t row) const override; @@ -54,8 +68,17 @@ public: bool is_assignable() const override; + std::vector supported_vector_lengths() const override; + private: + void validate_tile_info(const TileInfo &info) const; + std::string create_var_name(int32_t row) const; + + TileInfo _info{ DataType::Unknown }; + std::string _basename{ "" }; + bool _is_constant{ false }; + TileContainer _vals{}; }; } // namespace ckw diff --git a/compute_kernel_writer/src/cl/ICLTile.cpp b/compute_kernel_writer/src/cl/ICLTile.cpp deleted file mode 100644 index 38418b5c2a..0000000000 --- a/compute_kernel_writer/src/cl/ICLTile.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2023 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#include "ckw/Error.h" -#include "ckw/TileInfo.h" - -#include "src/cl/CLHelpers.h" -#include "src/cl/ICLTile.h" - -#include - -namespace ckw -{ -std::vector ICLTile::supported_vector_lengths() const -{ - return std::vector{ 1, 2, 3, 4, 8, 16 }; -} - -void ICLTile::validate_tile_info(const TileInfo &info) const -{ - if(cl_validate_vector_length(info.width())) - { - COMPUTE_KERNEL_WRITER_ERROR_ON_MSG("Unsupported TileInfo width"); - } - - if(info.data_type() == DataType::Unknown) - { - COMPUTE_KERNEL_WRITER_ERROR_ON_MSG("DataType::Unknown is not supported"); - } -} -} // namespace ckw \ No newline at end of file diff --git a/compute_kernel_writer/src/cl/ICLTile.h b/compute_kernel_writer/src/cl/ICLTile.h deleted file mode 100644 index 17c44d1d3e..0000000000 --- a/compute_kernel_writer/src/cl/ICLTile.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2023 Arm Limited. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef COMPUTE_KERNEL_WRITER_SRC_CL_ICLTILE_H -#define COMPUTE_KERNEL_WRITER_SRC_CL_ICLTILE_H - -#include "src/ITile.h" - -namespace ckw -{ -// Forward declarations -class TileInfo; - -/** Interface for the OpenCL specific tile */ -class ICLTile : public ITile, // classes inherited - public IVectorAccess, public IScalarAccess // interfaces implemented -{ -public: - // Inherited method overridden - std::vector supported_vector_lengths() const override; - -protected: - void validate_tile_info(const TileInfo &info) const; -}; -} // namespace ckw - -#endif /* COMPUTE_KERNEL_WRITER_SRC_CL_ICLTILE_H */ diff --git a/compute_kernel_writer/validation/tests/CLConstantTileTest.hpp b/compute_kernel_writer/validation/tests/CLConstantTileTest.hpp index 23a75c4ca9..f10ad10146 100644 --- a/compute_kernel_writer/validation/tests/CLConstantTileTest.hpp +++ b/compute_kernel_writer/validation/tests/CLConstantTileTest.hpp @@ -22,13 +22,13 @@ * SOFTWARE. */ -#ifndef COMPUTE_KERNEL_WRITER_TESTS_CLCONSTANTTILETEST_HPP -#define COMPUTE_KERNEL_WRITER_TESTS_CLCONSTANTTILETEST_HPP +#ifndef CKW_TESTS_CLCONSTANTTILETEST_HPP +#define CKW_TESTS_CLCONSTANTTILETEST_HPP #include "common/Common.h" #include "src/Helpers.h" -#include "src/cl/CLConstantTile.h" #include "src/cl/CLHelpers.h" +#include "src/cl/CLTile.h" #include #include @@ -55,10 +55,10 @@ public: int32_t test_idx = 0; for(const auto &test : _values) { - const CLConstantTile tile(test, DataType::Fp16); - const auto vars = tile.all(); - const int32_t num_vars = vars.size(); - const int32_t width = tile.info().width(); + const CLTile tile(test, DataType::Fp16); + const auto vars = tile.all(); + const int32_t num_vars = vars.size(); + const int32_t width = tile.info().width(); for(int32_t y = 0; y < num_vars; ++y) { @@ -136,7 +136,7 @@ public: } } - const CLConstantTile tile(container, dt); + const CLTile tile(container, dt); const TileVariable var = tile.scalar(y_coord, x_coord); @@ -214,7 +214,7 @@ public: } } - const CLConstantTile tile(container, dt); + const CLTile tile(container, dt); const TileVariable var = tile.scalar(y_coord, x_coord); @@ -260,9 +260,9 @@ public: for(const auto &test : _values) { - const CLConstantTile tile(test, dt); - const int32_t width = tile.info().width(); - const int32_t height = tile.info().height(); + const CLTile tile(test, dt); + const int32_t width = tile.info().width(); + const int32_t height = tile.info().height(); for(int32_t row = 0; row < height; ++row) { @@ -326,8 +326,8 @@ public: { for(auto &subwidth : _subwidths) { - const CLConstantTile tile(test, dt); - const int32_t height = tile.info().height(); + const CLTile tile(test, dt); + const int32_t height = tile.info().height(); for(int32_t row = 0; row < height; ++row) { @@ -368,4 +368,4 @@ private: } // namespace ckw -#endif /* COMPUTE_KERNEL_WRITER_TESTS_CLCONSTANTTILETEST_HPP */ +#endif // CKW_TESTS_CLCONSTANTTILETEST_HPP -- cgit v1.2.1