[GPU] Update space_to_depth to use nGraph shape inference (#21135)
* [GPU] Update space_to_depth to use nGraph shape inference + Added calc_output_layouts to use shape_infer + Added relevant test-cases for static and dynamic + Modified typo of filename Signed-off-by: Min, Byungil <byungil.min@intel.com>
This commit is contained in:
parent
a0614c4cb8
commit
7f5ba4e074
@ -3,9 +3,11 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include "openvino/op/space_to_depth.hpp"
|
||||||
#include "primitive.hpp"
|
#include "primitive.hpp"
|
||||||
|
|
||||||
namespace cldnn {
|
namespace cldnn {
|
||||||
|
using SpaceToDepth = ov::op::v0::SpaceToDepth;
|
||||||
|
|
||||||
/// @brief SpaceToDepth operation rearranges data from the spatial dimensions of the input tensor into depth dimension of the output tensor.
|
/// @brief SpaceToDepth operation rearranges data from the spatial dimensions of the input tensor into depth dimension of the output tensor.
|
||||||
/// @details SpaceToDepth operation permutes element from the input tensor with shape [b, f, y, x]
|
/// @details SpaceToDepth operation permutes element from the input tensor with shape [b, f, y, x]
|
||||||
@ -44,25 +46,20 @@ struct space_to_depth : public primitive_base<space_to_depth> {
|
|||||||
|
|
||||||
space_to_depth() : primitive_base("", {}) {}
|
space_to_depth() : primitive_base("", {}) {}
|
||||||
|
|
||||||
enum depth_mode {
|
|
||||||
depth_first,
|
|
||||||
blocks_first
|
|
||||||
};
|
|
||||||
|
|
||||||
/// @brief Constructs space_to_depth primitive.
|
/// @brief Constructs space_to_depth primitive.
|
||||||
/// @param id This primitive id.
|
/// @param id This primitive id.
|
||||||
/// @param input Input dictionary primitive id.
|
/// @param input Input dictionary primitive id.
|
||||||
/// @param depth_mode Depth mode (blocks_first / depth_first).
|
/// @param depth_mode Depth mode (BLOCKS_FIRST / DEPTH_FIRST).
|
||||||
/// @param block_size Block size (optional).
|
/// @param block_size Block size (optional).
|
||||||
space_to_depth(const primitive_id& id,
|
space_to_depth(const primitive_id& id,
|
||||||
const input_info& input,
|
const input_info& input,
|
||||||
depth_mode mode,
|
SpaceToDepth::SpaceToDepthMode mode,
|
||||||
const size_t block_size = 1,
|
const size_t block_size = 1,
|
||||||
const padding& output_padding = padding())
|
const padding& output_padding = padding())
|
||||||
: primitive_base(id, {input}, {output_padding}), mode(mode), block_size(block_size) {}
|
: primitive_base(id, {input}, {output_padding}), mode(mode), block_size(block_size) {}
|
||||||
|
|
||||||
/// @brief Depth mode.
|
/// @brief Depth mode.
|
||||||
depth_mode mode = depth_mode::depth_first;
|
SpaceToDepth::SpaceToDepthMode mode = SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST;
|
||||||
|
|
||||||
/// @brief Block size.
|
/// @brief Block size.
|
||||||
size_t block_size = 1;
|
size_t block_size = 1;
|
||||||
@ -86,13 +83,13 @@ struct space_to_depth : public primitive_base<space_to_depth> {
|
|||||||
|
|
||||||
void save(BinaryOutputBuffer& ob) const override {
|
void save(BinaryOutputBuffer& ob) const override {
|
||||||
primitive_base<space_to_depth>::save(ob);
|
primitive_base<space_to_depth>::save(ob);
|
||||||
ob << make_data(&mode, sizeof(depth_mode));
|
ob << make_data(&mode, sizeof(SpaceToDepth::SpaceToDepthMode));
|
||||||
ob << block_size;
|
ob << block_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void load(BinaryInputBuffer& ib) override {
|
void load(BinaryInputBuffer& ib) override {
|
||||||
primitive_base<space_to_depth>::load(ib);
|
primitive_base<space_to_depth>::load(ib);
|
||||||
ib >> make_data(&mode, sizeof(depth_mode));
|
ib >> make_data(&mode, sizeof(SpaceToDepth::SpaceToDepthMode));
|
||||||
ib >> block_size;
|
ib >> block_size;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -27,7 +27,7 @@ struct space_to_depth_impl : typed_primitive_impl_ocl<space_to_depth> {
|
|||||||
auto params = get_default_params<kernel_selector::space_to_depth_params>(impl_param);
|
auto params = get_default_params<kernel_selector::space_to_depth_params>(impl_param);
|
||||||
auto optional_params = get_default_optional_params<kernel_selector::space_to_depth_optional_params>(impl_param.get_program());
|
auto optional_params = get_default_optional_params<kernel_selector::space_to_depth_optional_params>(impl_param.get_program());
|
||||||
|
|
||||||
params.depth_mode = (primitive->mode == space_to_depth::blocks_first) ?
|
params.depth_mode = (primitive->mode == SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST) ?
|
||||||
kernel_selector::SpaceToDepthMode::BLOCKS_FIRST :
|
kernel_selector::SpaceToDepthMode::BLOCKS_FIRST :
|
||||||
kernel_selector::SpaceToDepthMode::DEPTH_FIRST;
|
kernel_selector::SpaceToDepthMode::DEPTH_FIRST;
|
||||||
|
|
||||||
|
@ -8,9 +8,21 @@
|
|||||||
#include "primitive_inst.h"
|
#include "primitive_inst.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace cldnn {
|
namespace cldnn {
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct typed_program_node<space_to_depth> : public typed_program_node_base<space_to_depth> {
|
||||||
|
using parent = typed_program_node_base<space_to_depth>;
|
||||||
|
|
||||||
|
public:
|
||||||
|
using parent::parent;
|
||||||
|
|
||||||
|
program_node& input(size_t index = 0) const { return get_dependency(index); }
|
||||||
|
std::vector<size_t> get_shape_infer_dependencies() const override { return {}; }
|
||||||
|
};
|
||||||
|
|
||||||
using space_to_depth_node = typed_program_node<space_to_depth>;
|
using space_to_depth_node = typed_program_node<space_to_depth>;
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -19,6 +31,8 @@ class typed_primitive_inst<space_to_depth> : public typed_primitive_inst_base<sp
|
|||||||
using parent::parent;
|
using parent::parent;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
template<typename ShapeType>
|
||||||
|
static std::vector<layout> calc_output_layouts(space_to_depth_node const& node, kernel_impl_params const& impl_param);
|
||||||
static layout calc_output_layout(space_to_depth_node const& node, kernel_impl_params const& impl_param);
|
static layout calc_output_layout(space_to_depth_node const& node, kernel_impl_params const& impl_param);
|
||||||
static std::string to_string(space_to_depth_node const& node);
|
static std::string to_string(space_to_depth_node const& node);
|
||||||
|
|
||||||
|
@ -2,16 +2,48 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "openvino/op/space_to_depth.hpp"
|
||||||
#include "space_to_depth_inst.h"
|
#include "space_to_depth_inst.h"
|
||||||
|
|
||||||
#include "primitive_type_base.h"
|
#include "primitive_type_base.h"
|
||||||
#include "intel_gpu/runtime/error_handler.hpp"
|
#include "intel_gpu/runtime/error_handler.hpp"
|
||||||
#include "json_object.h"
|
#include "json_object.h"
|
||||||
|
#include "data_inst.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "space_to_depth_shape_inference.hpp"
|
||||||
|
|
||||||
namespace cldnn {
|
namespace cldnn {
|
||||||
GPU_DEFINE_PRIMITIVE_TYPE_ID(space_to_depth)
|
GPU_DEFINE_PRIMITIVE_TYPE_ID(space_to_depth)
|
||||||
|
|
||||||
|
using SpaceToDepth = ov::op::v0::SpaceToDepth;
|
||||||
|
|
||||||
|
template<typename ShapeType>
|
||||||
|
std::vector<layout> space_to_depth_inst::calc_output_layouts(space_to_depth_node const& node, kernel_impl_params const& impl_param) {
|
||||||
|
auto desc = impl_param.typed_desc<space_to_depth>();
|
||||||
|
auto input_layout = impl_param.get_input_layout(0);
|
||||||
|
|
||||||
|
auto output_type = desc->output_data_types[0].value_or(input_layout.data_type);
|
||||||
|
if (impl_param.has_fused_primitives())
|
||||||
|
output_type = impl_param.get_fused_output_layout().data_type;
|
||||||
|
|
||||||
|
auto output_format = input_layout.format;
|
||||||
|
|
||||||
|
ov::op::v0::SpaceToDepth op;
|
||||||
|
op.set_block_size(desc->block_size);
|
||||||
|
op.set_mode(desc->mode);
|
||||||
|
|
||||||
|
std::vector<ShapeType> output_shapes = { ShapeType() };
|
||||||
|
std::vector<ShapeType> input_shapes = {
|
||||||
|
input_layout.get<ShapeType>()
|
||||||
|
};
|
||||||
|
output_shapes = ov::op::v0::shape_infer(&op, input_shapes);
|
||||||
|
|
||||||
|
return { layout{output_shapes[0], output_type, output_format} };
|
||||||
|
}
|
||||||
|
|
||||||
|
template std::vector<layout> space_to_depth_inst::calc_output_layouts<ov::PartialShape>(space_to_depth_node const& node, const kernel_impl_params& impl_param);
|
||||||
|
|
||||||
layout space_to_depth_inst::calc_output_layout(space_to_depth_node const& node, kernel_impl_params const& impl_param) {
|
layout space_to_depth_inst::calc_output_layout(space_to_depth_node const& node, kernel_impl_params const& impl_param) {
|
||||||
auto desc = impl_param.typed_desc<space_to_depth>();
|
auto desc = impl_param.typed_desc<space_to_depth>();
|
||||||
|
|
||||||
@ -26,7 +58,7 @@ layout space_to_depth_inst::calc_output_layout(space_to_depth_node const& node,
|
|||||||
output_type = impl_param.get_fused_output_layout().data_type;
|
output_type = impl_param.get_fused_output_layout().data_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (depth_mode != space_to_depth::depth_first && depth_mode != space_to_depth::blocks_first)
|
if (depth_mode != SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST && depth_mode != SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST)
|
||||||
CLDNN_ERROR_MESSAGE(desc->id,
|
CLDNN_ERROR_MESSAGE(desc->id,
|
||||||
"Invalid mode for spaceToDepth: must be \"blocks_first\" or \"depth_first\" only");
|
"Invalid mode for spaceToDepth: must be \"blocks_first\" or \"depth_first\" only");
|
||||||
|
|
||||||
@ -79,7 +111,7 @@ std::string space_to_depth_inst::to_string(space_to_depth_node const& node) {
|
|||||||
|
|
||||||
std::stringstream primitive_description;
|
std::stringstream primitive_description;
|
||||||
|
|
||||||
std::string depth_mode = (desc->mode == cldnn::space_to_depth::depth_mode::blocks_first) ?
|
std::string depth_mode = (desc->mode == SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST) ?
|
||||||
"blocks_first" :
|
"blocks_first" :
|
||||||
"depth_first";
|
"depth_first";
|
||||||
|
|
||||||
|
@ -11,23 +11,13 @@
|
|||||||
|
|
||||||
namespace ov {
|
namespace ov {
|
||||||
namespace intel_gpu {
|
namespace intel_gpu {
|
||||||
|
|
||||||
static cldnn::space_to_depth::depth_mode GetDepthMode(ov::op::v0::SpaceToDepth::SpaceToDepthMode mode) {
|
|
||||||
switch (mode) {
|
|
||||||
case ov::op::v0::SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST: return cldnn::space_to_depth::blocks_first;
|
|
||||||
case ov::op::v0::SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST: return cldnn::space_to_depth::depth_first;
|
|
||||||
default: OPENVINO_THROW("[GPU] Unsupported SpaceToDepthMode value: ", static_cast<int>(mode));
|
|
||||||
}
|
|
||||||
return cldnn::space_to_depth::blocks_first;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void CreateSpaceToDepthOp(ProgramBuilder& p, const std::shared_ptr<ov::op::v0::SpaceToDepth>& op) {
|
static void CreateSpaceToDepthOp(ProgramBuilder& p, const std::shared_ptr<ov::op::v0::SpaceToDepth>& op) {
|
||||||
validate_inputs_count(op, {1});
|
validate_inputs_count(op, {1});
|
||||||
auto inputs = p.GetInputInfo(op);
|
auto inputs = p.GetInputInfo(op);
|
||||||
std::string layerName = layer_type_name_ID(op);
|
std::string layerName = layer_type_name_ID(op);
|
||||||
auto spaceToDepthPrim = cldnn::space_to_depth(layerName,
|
auto spaceToDepthPrim = cldnn::space_to_depth(layerName,
|
||||||
inputs[0],
|
inputs[0],
|
||||||
GetDepthMode(op->get_mode()),
|
op->get_mode(),
|
||||||
op->get_block_size());
|
op->get_block_size());
|
||||||
|
|
||||||
p.add_primitive(*op, spaceToDepthPrim);
|
p.add_primitive(*op, spaceToDepthPrim);
|
||||||
|
@ -0,0 +1,195 @@
|
|||||||
|
// Copyright (C) 2023 Intel Corporation
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "shared_test_classes/single_layer/space_to_depth.hpp"
|
||||||
|
#include "shared_test_classes/base/ov_subgraph.hpp"
|
||||||
|
#include "ie_precision.hpp"
|
||||||
|
#include "ov_models/builders.hpp"
|
||||||
|
#include "common_test_utils/ov_tensor_utils.hpp"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
using namespace ov::op::v0;
|
||||||
|
using namespace ov::test;
|
||||||
|
|
||||||
|
namespace GPULayerTestsDefinitions {
|
||||||
|
|
||||||
|
typedef std::tuple<
|
||||||
|
InputShape, // Input shape
|
||||||
|
ElementType, // Input element type
|
||||||
|
SpaceToDepth::SpaceToDepthMode, // Mode
|
||||||
|
std::size_t // Block size
|
||||||
|
> SpaceToDepthLayerGPUTestParams;
|
||||||
|
|
||||||
|
class SpaceToDepthLayerGPUTest : public testing::WithParamInterface<SpaceToDepthLayerGPUTestParams>,
|
||||||
|
virtual public ov::test::SubgraphBaseTest {
|
||||||
|
public:
|
||||||
|
static std::string getTestCaseName(testing::TestParamInfo<SpaceToDepthLayerGPUTestParams> obj) {
|
||||||
|
InputShape shapes;
|
||||||
|
ElementType inType;
|
||||||
|
SpaceToDepth::SpaceToDepthMode mode;
|
||||||
|
std::size_t blockSize;
|
||||||
|
std::tie(shapes, inType, mode, blockSize) = obj.param;
|
||||||
|
|
||||||
|
std::ostringstream results;
|
||||||
|
results << "IS=" << ov::test::utils::partialShape2str({shapes.first}) << "_";
|
||||||
|
results << "TS=";
|
||||||
|
for (const auto& item : shapes.second) {
|
||||||
|
results << ov::test::utils::vec2str(item) << "_";
|
||||||
|
}
|
||||||
|
results << "Prc=" << inType << "_";
|
||||||
|
switch (mode) {
|
||||||
|
case SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST:
|
||||||
|
results << "BLOCKS_FIRST_";
|
||||||
|
break;
|
||||||
|
case SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST:
|
||||||
|
results << "DEPTH_FIRST_";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw std::runtime_error("Unsupported SpaceToDepthMode");
|
||||||
|
}
|
||||||
|
results << "BS=" << blockSize;
|
||||||
|
|
||||||
|
return results.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void SetUp() override {
|
||||||
|
InputShape shapes;
|
||||||
|
SpaceToDepth::SpaceToDepthMode mode;
|
||||||
|
std::size_t blockSize;
|
||||||
|
std::tie(shapes, inType, mode, blockSize) = this->GetParam();
|
||||||
|
|
||||||
|
targetDevice = ov::test::utils::DEVICE_GPU;
|
||||||
|
init_input_shapes({shapes});
|
||||||
|
|
||||||
|
ov::ParameterVector params;
|
||||||
|
for (auto&& shape : inputDynamicShapes)
|
||||||
|
params.push_back(std::make_shared<ov::op::v0::Parameter>(inType, shape));
|
||||||
|
|
||||||
|
auto d2s = std::make_shared<ov::op::v0::SpaceToDepth>(params[0], mode, blockSize);
|
||||||
|
|
||||||
|
ov::ResultVector results;
|
||||||
|
for (size_t i = 0; i < d2s->get_output_size(); i++)
|
||||||
|
results.push_back(std::make_shared<ov::op::v0::Result>(d2s->output(i)));
|
||||||
|
function = std::make_shared<ov::Model>(results, params, "SpaceToDepth");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_P(SpaceToDepthLayerGPUTest, CompareWithRefs) {
|
||||||
|
SKIP_IF_CURRENT_TEST_IS_DISABLED()
|
||||||
|
|
||||||
|
run();
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
const std::vector<ElementType> inputElementType = {
|
||||||
|
ElementType::f32,
|
||||||
|
ElementType::f16,
|
||||||
|
ElementType::i8
|
||||||
|
};
|
||||||
|
|
||||||
|
const std::vector<SpaceToDepth::SpaceToDepthMode> SpaceToDepthModes = {
|
||||||
|
SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST,
|
||||||
|
SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST
|
||||||
|
};
|
||||||
|
|
||||||
|
// ======================== Static Shapes Tests ========================
|
||||||
|
namespace static_shapes {
|
||||||
|
|
||||||
|
const std::vector<ov::Shape> inputShapesBS2_4D = {
|
||||||
|
{1, 16, 8, 8},
|
||||||
|
{1, 5, 8, 16},
|
||||||
|
{2, 1, 8, 4},
|
||||||
|
{1, 32, 4, 4},
|
||||||
|
{2, 16, 64, 8}
|
||||||
|
};
|
||||||
|
|
||||||
|
const std::vector<ov::Shape> inputShapesBS3_4D = {
|
||||||
|
{1, 1, 27, 27},
|
||||||
|
{1, 4, 9, 18},
|
||||||
|
{3, 18, 9, 9},
|
||||||
|
{2, 18, 3, 3}
|
||||||
|
};
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_SUITE_P(smoke_GPUSpaceToDepthStaticBS2_4D, SpaceToDepthLayerGPUTest,
|
||||||
|
testing::Combine(
|
||||||
|
testing::ValuesIn(static_shapes_to_test_representation(inputShapesBS2_4D)),
|
||||||
|
testing::ValuesIn(inputElementType),
|
||||||
|
testing::ValuesIn(SpaceToDepthModes),
|
||||||
|
testing::Values(1, 4)),
|
||||||
|
SpaceToDepthLayerGPUTest::getTestCaseName);
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_SUITE_P(smoke_GPUSpaceToDepthStaticBS3_4D, SpaceToDepthLayerGPUTest,
|
||||||
|
testing::Combine(
|
||||||
|
testing::ValuesIn(static_shapes_to_test_representation(inputShapesBS3_4D)),
|
||||||
|
testing::ValuesIn(inputElementType),
|
||||||
|
testing::ValuesIn(SpaceToDepthModes),
|
||||||
|
testing::Values(1, 3)),
|
||||||
|
SpaceToDepthLayerGPUTest::getTestCaseName);
|
||||||
|
|
||||||
|
const std::vector<ov::Shape> inputShapesBS2_5D = {
|
||||||
|
{1, 1, 4, 8, 8},
|
||||||
|
{2, 5, 4, 8, 4},
|
||||||
|
{4, 1, 4, 4, 4},
|
||||||
|
{2, 1, 4, 20, 4},
|
||||||
|
{2, 16, 4, 32, 4}
|
||||||
|
};
|
||||||
|
|
||||||
|
const std::vector<ov::Shape> inputShapesBS3_5D = {
|
||||||
|
{1, 3, 3, 6, 6},
|
||||||
|
{1, 1, 9, 27, 27},
|
||||||
|
{2, 1, 3, 3, 3},
|
||||||
|
{1, 3, 27, 27, 27}
|
||||||
|
};
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_SUITE_P(smoke_GPUSpaceToDepthStaticBS2_5D, SpaceToDepthLayerGPUTest,
|
||||||
|
testing::Combine(
|
||||||
|
testing::ValuesIn(static_shapes_to_test_representation(inputShapesBS2_5D)),
|
||||||
|
testing::ValuesIn(inputElementType),
|
||||||
|
testing::ValuesIn(SpaceToDepthModes),
|
||||||
|
testing::Values(1, 4)),
|
||||||
|
SpaceToDepthLayerGPUTest::getTestCaseName);
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_SUITE_P(smoke_GPUSpaceToDepthStaticBS3_5D, SpaceToDepthLayerGPUTest,
|
||||||
|
testing::Combine(
|
||||||
|
testing::ValuesIn(static_shapes_to_test_representation(inputShapesBS3_5D)),
|
||||||
|
testing::ValuesIn(inputElementType),
|
||||||
|
testing::ValuesIn(SpaceToDepthModes),
|
||||||
|
testing::Values(1, 3)),
|
||||||
|
SpaceToDepthLayerGPUTest::getTestCaseName);
|
||||||
|
|
||||||
|
} // namespace static_shapes
|
||||||
|
|
||||||
|
//======================== Dynamic Shapes Tests ========================
|
||||||
|
namespace dynamic_shapes {
|
||||||
|
|
||||||
|
const std::vector<InputShape> inputShapes4D = {
|
||||||
|
{{-1, -1, -1, -1}, {{2, 3, 12, 24}}},
|
||||||
|
};
|
||||||
|
|
||||||
|
const std::vector<InputShape> inputShapes5D = {
|
||||||
|
{{-1, -1, -1, -1, -1}, {{2, 3, 2, 4, 8}}},
|
||||||
|
};
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_SUITE_P(smoke_GPUSpaceToDepthDynamic4D, SpaceToDepthLayerGPUTest,
|
||||||
|
testing::Combine(
|
||||||
|
testing::ValuesIn(inputShapes4D),
|
||||||
|
testing::ValuesIn(inputElementType),
|
||||||
|
testing::ValuesIn(SpaceToDepthModes),
|
||||||
|
testing::Values(1, 2, 3)),
|
||||||
|
SpaceToDepthLayerGPUTest::getTestCaseName);
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_SUITE_P(smoke_GPUSpaceToDepthDynamic5D, SpaceToDepthLayerGPUTest,
|
||||||
|
testing::Combine(
|
||||||
|
testing::ValuesIn(inputShapes5D),
|
||||||
|
testing::ValuesIn(inputElementType),
|
||||||
|
testing::ValuesIn(SpaceToDepthModes),
|
||||||
|
testing::Values(1, 2)),
|
||||||
|
SpaceToDepthLayerGPUTest::getTestCaseName);
|
||||||
|
|
||||||
|
} // namespace dynamic_shapes
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
} // namespace GPULayerTestsDefinitions
|
@ -15,12 +15,13 @@
|
|||||||
|
|
||||||
using namespace cldnn;
|
using namespace cldnn;
|
||||||
using namespace ::tests;
|
using namespace ::tests;
|
||||||
|
using namespace ov::op::v0;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
struct space_to_depth_params {
|
struct space_to_depth_params {
|
||||||
tensor input_size;
|
tensor input_size;
|
||||||
tensor output_size;
|
tensor output_size;
|
||||||
space_to_depth::depth_mode mode;
|
SpaceToDepth::SpaceToDepthMode mode;
|
||||||
data_types input_type;
|
data_types input_type;
|
||||||
format input_format;
|
format input_format;
|
||||||
size_t block_size;
|
size_t block_size;
|
||||||
@ -63,14 +64,14 @@ public:
|
|||||||
/* -------------------------------- SpaceToDepth cases ------------------------------------------------- */
|
/* -------------------------------- SpaceToDepth cases ------------------------------------------------- */
|
||||||
/* ----------------------------------------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#define CASE_SPACE_TO_DEPTH_F32_1 { 2, 2, 8, 10 }, { 2, 8, 4, 5 }, space_to_depth::depth_mode::blocks_first, data_types::f32, format::bfyx, 2, data_types::f32, format::bfyx
|
#define CASE_SPACE_TO_DEPTH_F32_1 { 2, 2, 8, 10 }, { 2, 8, 4, 5 }, SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, data_types::f32, format::bfyx, 2, data_types::f32, format::bfyx
|
||||||
#define CASE_SPACE_TO_DEPTH_F32_2 { 1, 2, 6, 6, 6 }, { 1, 54, 2, 2, 2 }, space_to_depth::depth_mode::depth_first, data_types::f32, format::bfzyx, 3, data_types::f32, format::bfyx
|
#define CASE_SPACE_TO_DEPTH_F32_2 { 1, 2, 6, 6, 6 }, { 1, 54, 2, 2, 2 }, SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST, data_types::f32, format::bfzyx, 3, data_types::f32, format::bfyx
|
||||||
#define CASE_SPACE_TO_DEPTH_F16_1 { 1, 3, 6, 6 }, { 1, 12, 3, 3 }, space_to_depth::depth_mode::blocks_first, data_types::f16, format::bfyx, 2, data_types::f32, format::bfyx
|
#define CASE_SPACE_TO_DEPTH_F16_1 { 1, 3, 6, 6 }, { 1, 12, 3, 3 }, SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, data_types::f16, format::bfyx, 2, data_types::f32, format::bfyx
|
||||||
#define CASE_SPACE_TO_DEPTH_F16_2 { 2, 1, 3, 3 }, { 2, 9, 1, 1 }, space_to_depth::depth_mode::blocks_first, data_types::f16, format::b_fs_yx_fsv16, 3, data_types::f32, format::bfyx
|
#define CASE_SPACE_TO_DEPTH_F16_2 { 2, 1, 3, 3 }, { 2, 9, 1, 1 }, SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, data_types::f16, format::b_fs_yx_fsv16, 3, data_types::f32, format::bfyx
|
||||||
#define CASE_SPACE_TO_DEPTH_U8_1 { 2, 2, 8, 10 }, { 2, 8, 4, 5 }, space_to_depth::depth_mode::blocks_first, data_types::u8, format::bfyx, 2, data_types::f32, format::bfyx
|
#define CASE_SPACE_TO_DEPTH_U8_1 { 2, 2, 8, 10 }, { 2, 8, 4, 5 }, SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, data_types::u8, format::bfyx, 2, data_types::f32, format::bfyx
|
||||||
#define CASE_SPACE_TO_DEPTH_U8_2 { 1, 2, 6, 6, 6 }, { 1, 54, 2, 2, 2 }, space_to_depth::depth_mode::depth_first, data_types::u8, format::bfzyx, 3, data_types::f32, format::bfyx
|
#define CASE_SPACE_TO_DEPTH_U8_2 { 1, 2, 6, 6, 6 }, { 1, 54, 2, 2, 2 }, SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST, data_types::u8, format::bfzyx, 3, data_types::f32, format::bfyx
|
||||||
#define CASE_SPACE_TO_DEPTH_I8_1 { 1, 3, 6, 6 }, { 1, 12, 3, 3 }, space_to_depth::depth_mode::blocks_first, data_types::i8, format::bfyx, 2, data_types::f32, format::bfyx
|
#define CASE_SPACE_TO_DEPTH_I8_1 { 1, 3, 6, 6 }, { 1, 12, 3, 3 }, SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, data_types::i8, format::bfyx, 2, data_types::f32, format::bfyx
|
||||||
#define CASE_SPACE_TO_DEPTH_I8_2 { 2, 1, 3, 3 }, { 2, 9, 1, 1 }, space_to_depth::depth_mode::blocks_first, data_types::i8, format::b_fs_yx_fsv16, 3, data_types::f32, format::bfyx
|
#define CASE_SPACE_TO_DEPTH_I8_2 { 2, 1, 3, 3 }, { 2, 9, 1, 1 }, SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, data_types::i8, format::b_fs_yx_fsv16, 3, data_types::f32, format::bfyx
|
||||||
|
|
||||||
class space_to_depth_quantize_i8 : public SpaceToDepthFusingsTest {};
|
class space_to_depth_quantize_i8 : public SpaceToDepthFusingsTest {};
|
||||||
TEST_P(space_to_depth_quantize_i8, basic) {
|
TEST_P(space_to_depth_quantize_i8, basic) {
|
||||||
|
@ -0,0 +1,60 @@
|
|||||||
|
// Copyright (C) 2023 Intel Corporation
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "test_utils.h"
|
||||||
|
|
||||||
|
#include <intel_gpu/primitives/input_layout.hpp>
|
||||||
|
#include <intel_gpu/primitives/space_to_depth.hpp>
|
||||||
|
#include <intel_gpu/primitives/data.hpp>
|
||||||
|
|
||||||
|
#include "space_to_depth_inst.h"
|
||||||
|
|
||||||
|
#include "program_wrapper.h"
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
using namespace cldnn;
|
||||||
|
using namespace ::tests;
|
||||||
|
|
||||||
|
namespace shape_infer_tests {
|
||||||
|
|
||||||
|
struct space_to_depth_test_params {
|
||||||
|
layout input_layout;
|
||||||
|
size_t block_size;
|
||||||
|
layout expected_layout;
|
||||||
|
};
|
||||||
|
|
||||||
|
class space_to_depth_si_test : public testing::TestWithParam<space_to_depth_test_params> { };
|
||||||
|
|
||||||
|
TEST_P(space_to_depth_si_test, shape_infer) {
|
||||||
|
auto p = GetParam();
|
||||||
|
|
||||||
|
auto& engine = get_test_engine();
|
||||||
|
|
||||||
|
auto input_layout_prim = std::make_shared<input_layout>("input", p.input_layout);
|
||||||
|
auto space_to_depth_prim = std::make_shared<space_to_depth>("space_to_depth", input_info("input"),
|
||||||
|
SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, p.block_size);
|
||||||
|
|
||||||
|
cldnn::program prog(engine);
|
||||||
|
auto& input_layout_node = prog.get_or_create(input_layout_prim);
|
||||||
|
auto& space_to_depth_node = prog.get_or_create(space_to_depth_prim);
|
||||||
|
program_wrapper::add_connection(prog, input_layout_node, space_to_depth_node);
|
||||||
|
auto res = space_to_depth_inst::calc_output_layouts<ov::PartialShape>(space_to_depth_node, *space_to_depth_node.get_kernel_impl_params());
|
||||||
|
|
||||||
|
ASSERT_EQ(res.size(), 1);
|
||||||
|
ASSERT_EQ(res[0], p.expected_layout);
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_SUITE_P(smoke, space_to_depth_si_test,
|
||||||
|
testing::ValuesIn(std::vector<space_to_depth_test_params>{
|
||||||
|
{
|
||||||
|
layout{ov::PartialShape{4, 2, 4, 8}, data_types::f16, format::bfyx}, 4, layout{ov::PartialShape{4, 32, 1, 2}, data_types::f16, format::bfyx}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
layout{ov::PartialShape::dynamic(4), data_types::f32, format::bfyx}, 2, layout{ov::PartialShape::dynamic(4), data_types::f32, format::bfyx}
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
|
} // shape_infer_tests
|
@ -2,6 +2,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "openvino/op/space_to_depth.hpp"
|
||||||
#include "test_utils.h"
|
#include "test_utils.h"
|
||||||
|
|
||||||
#include <intel_gpu/primitives/input_layout.hpp>
|
#include <intel_gpu/primitives/input_layout.hpp>
|
||||||
@ -33,7 +34,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(
|
topology.add(
|
||||||
space_to_depth("space_to_depth", input_info("Input0"), space_to_depth::blocks_first, block_size)
|
space_to_depth("space_to_depth", input_info("Input0"), SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, block_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -75,7 +76,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(
|
topology.add(
|
||||||
space_to_depth("space_to_depth", input_info("Input0"), space_to_depth::blocks_first, block_size)
|
space_to_depth("space_to_depth", input_info("Input0"), SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, block_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -123,7 +124,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(
|
topology.add(
|
||||||
space_to_depth("space_to_depth", input_info("Input0"), space_to_depth::blocks_first, block_size)
|
space_to_depth("space_to_depth", input_info("Input0"), SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, block_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -185,7 +186,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(
|
topology.add(
|
||||||
space_to_depth("space_to_depth", input_info("Input0"), space_to_depth::blocks_first, block_size)
|
space_to_depth("space_to_depth", input_info("Input0"), SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, block_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -233,7 +234,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(
|
topology.add(
|
||||||
space_to_depth("space_to_depth", input_info("Input0"), space_to_depth::depth_first, block_size)
|
space_to_depth("space_to_depth", input_info("Input0"), SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST, block_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -275,7 +276,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(
|
topology.add(
|
||||||
space_to_depth("space_to_depth", input_info("Input0"), space_to_depth::depth_first, block_size)
|
space_to_depth("space_to_depth", input_info("Input0"), SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST, block_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -323,7 +324,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(
|
topology.add(
|
||||||
space_to_depth("space_to_depth", input_info("Input0"), space_to_depth::depth_first, block_size)
|
space_to_depth("space_to_depth", input_info("Input0"), SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST, block_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -385,7 +386,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(
|
topology.add(
|
||||||
space_to_depth("space_to_depth", input_info("Input0"), space_to_depth::depth_first, block_size)
|
space_to_depth("space_to_depth", input_info("Input0"), SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST, block_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -435,7 +436,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(
|
topology.add(
|
||||||
space_to_depth("space_to_depth", input_info("Input0"), space_to_depth::blocks_first, block_size)
|
space_to_depth("space_to_depth", input_info("Input0"), SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, block_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -474,7 +475,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(
|
topology.add(
|
||||||
space_to_depth("space_to_depth", input_info("Input0"), space_to_depth::blocks_first, block_size)
|
space_to_depth("space_to_depth", input_info("Input0"), SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, block_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -522,7 +523,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(
|
topology.add(
|
||||||
space_to_depth("space_to_depth", input_info("Input0"), space_to_depth::blocks_first, block_size)
|
space_to_depth("space_to_depth", input_info("Input0"), SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, block_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -576,7 +577,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(
|
topology.add(
|
||||||
space_to_depth("space_to_depth", input_info("Input0"), space_to_depth::blocks_first, block_size)
|
space_to_depth("space_to_depth", input_info("Input0"), SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST, block_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -623,7 +624,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(
|
topology.add(
|
||||||
space_to_depth("space_to_depth", input_info("Input0"), space_to_depth::depth_first, block_size)
|
space_to_depth("space_to_depth", input_info("Input0"), SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST, block_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -662,7 +663,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(
|
topology.add(
|
||||||
space_to_depth("space_to_depth", input_info("Input0"), space_to_depth::depth_first, block_size)
|
space_to_depth("space_to_depth", input_info("Input0"), SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST, block_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -710,7 +711,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(
|
topology.add(
|
||||||
space_to_depth("space_to_depth", input_info("Input0"), space_to_depth::depth_first, block_size)
|
space_to_depth("space_to_depth", input_info("Input0"), SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST, block_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -764,7 +765,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(
|
topology.add(
|
||||||
space_to_depth("space_to_depth", input_info("Input0"), space_to_depth::depth_first, block_size)
|
space_to_depth("space_to_depth", input_info("Input0"), SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST, block_size)
|
||||||
);
|
);
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -819,7 +820,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(reorder("reorder", input_info("Input0"), format::b_fs_yx_fsv16, data_types::f32));
|
topology.add(reorder("reorder", input_info("Input0"), format::b_fs_yx_fsv16, data_types::f32));
|
||||||
topology.add(space_to_depth("space_to_depth", input_info("reorder"), space_to_depth::depth_first, block_size));
|
topology.add(space_to_depth("space_to_depth", input_info("reorder"), SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST, block_size));
|
||||||
topology.add(reorder("reorder_out", input_info("space_to_depth"), format::bfyx, data_types::f32));
|
topology.add(reorder("reorder_out", input_info("space_to_depth"), format::bfyx, data_types::f32));
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
@ -874,7 +875,7 @@ public:
|
|||||||
topology topology;
|
topology topology;
|
||||||
topology.add(input_layout("Input0", input1->get_layout()));
|
topology.add(input_layout("Input0", input1->get_layout()));
|
||||||
topology.add(reorder("reorder", input_info("Input0"), format::b_fs_yx_fsv4, data_types::f32));
|
topology.add(reorder("reorder", input_info("Input0"), format::b_fs_yx_fsv4, data_types::f32));
|
||||||
topology.add(space_to_depth("space_to_depth", input_info("reorder"), space_to_depth::depth_first, block_size));
|
topology.add(space_to_depth("space_to_depth", input_info("reorder"), SpaceToDepth::SpaceToDepthMode::DEPTH_FIRST, block_size));
|
||||||
topology.add(reorder("reorder_out", input_info("space_to_depth"), format::bfyx, data_types::f32));
|
topology.add(reorder("reorder_out", input_info("space_to_depth"), format::bfyx, data_types::f32));
|
||||||
|
|
||||||
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
cldnn::network::ptr network = get_network(engine, topology, get_test_default_config(engine), get_test_stream_ptr(), is_caching_test);
|
||||||
|
Loading…
Reference in New Issue
Block a user