@@ -1780,109 +1780,6 @@ TEST(concat_gpu_onednn, b_fs_yx_fsv16_input_types) {
1780
1780
}
1781
1781
}
1782
1782
1783
- TEST (concat_gpu_onednn, crop_b_fs_yx_fsv16_input_types) {
1784
- auto & engine = get_test_engine ();
1785
- if (!engine.get_device_info ().supports_immad )
1786
- return ;
1787
-
1788
- tests::random_generator rg (GET_SUITE_NAME);
1789
- const int32_t input_b = 1 , input_f = 3 , input_y = 416 , input_x = 416 ;
1790
- uint32_t test_stride = 8 ;
1791
- int32_t test_feature = 88 , test_kernel = 8 ;
1792
- int32_t test_y = input_y / test_stride, test_x = input_x / test_stride;
1793
-
1794
- auto test_dt = data_types::f16 ;
1795
- auto test_format = format::b_fs_yx_fsv16;
1796
-
1797
- layout input0_layout = { test_dt, format::bfyx, { input_b, input_f, input_x, input_y } };
1798
- auto input0 = engine.allocate_memory (input0_layout);
1799
-
1800
- using test_data_type = ov::float16;
1801
- auto data_input = rg.generate_random_4d <test_data_type>(input_b, input_f, input_y, input_x, -1 , 1 );
1802
- auto data_input_flat = flatten_4d (format::bfyx, data_input);
1803
- set_values<test_data_type>(input0, data_input_flat);
1804
-
1805
- auto weights0 = engine.allocate_memory ({ data_types::f16 , format::bfyx, { test_feature * 2 , input_f, test_kernel, test_kernel } });
1806
- auto biases0 = engine.allocate_memory ({ data_types::f16 , format::bfyx, { 1 , test_feature * 2 , 1 , 1 } });
1807
- std::vector<test_data_type> weights0_flat (test_feature * 2 * input_f * test_kernel * test_kernel, 1.0 );
1808
- std::vector<test_data_type> bias0_flat (1 * test_feature * 2 * 1 * 1 , 1.0 );
1809
- set_values (weights0, weights0_flat);
1810
- set_values (biases0, bias0_flat);
1811
-
1812
- auto weights1 = engine.allocate_memory ({ data_types::f16 , format::bfyx, { test_feature, test_feature, 1 , 1 } });
1813
- auto biases1 = engine.allocate_memory ({ data_types::f16 , format::bfyx, { 1 , test_feature, 1 , 1 } });
1814
- std::vector<test_data_type> weights1_flat (test_feature * test_feature * 1 * 1 , 1.0 );
1815
- std::vector<test_data_type> bias1_flat (1 * test_feature * 1 * 1 , 1.0 );
1816
- set_values (weights1, weights1_flat);
1817
- set_values (biases1, bias1_flat);
1818
-
1819
- auto output_name = " reorder" ;
1820
- layout reorder_layout = { test_dt, format::bfyx, { input_b, test_feature * 2 , input_x, input_y } };
1821
-
1822
- ov::intel_gpu::ImplementationDesc impl;
1823
- std::vector<test_data_type> outputs_ref (input_b * test_feature * 2 * test_y * test_x);
1824
- for (int i = 0 ; i < 2 ; ++i) {
1825
- if (i == 0 ) {
1826
- impl = { test_format, std::string (" " ), impl_types::ocl };
1827
- } else {
1828
- impl = { test_format, std::string (" " ), impl_types::onednn };
1829
- }
1830
-
1831
- topology topology (
1832
- input_layout (" input0" , input0_layout),
1833
- data (" weights0" , weights0),
1834
- data (" biases0" , biases0),
1835
- convolution ( " conv0" , input_info (" input0" ), " weights0" , " biases0" , 1 , {test_stride, test_stride}, {1 , 1 }, {0 , 0 }, {0 , 0 }, false ),
1836
- crop (" variadic_split.out0" , input_info (" conv0" ), {input_b, test_feature, test_x, test_y }, {0 , 0 , 0 , 0 }),
1837
- crop (" variadic_split.out1" , input_info (" conv0" ), {input_b, test_feature, test_x, test_y }, {0 , test_feature, 0 , 0 }),
1838
- data (" weights1" , weights1),
1839
- data (" biases1" , biases1),
1840
- convolution ( " conv1" , input_info (" variadic_split.out1" ), " weights1" , " biases1" , 1 , {1 , 1 }, {1 , 1 }, {0 , 0 }, {0 , 0 }, false ),
1841
- concatenation (" concat" ,
1842
- { input_info (" variadic_split.out0" ), input_info (" conv1" ) },
1843
- 1 ,
1844
- test_dt),
1845
- reorder (" reorder" , input_info (" concat" ), reorder_layout)
1846
- );
1847
-
1848
- ExecutionConfig cfg = get_test_default_config (engine);
1849
- cfg.set_property (ov::intel_gpu::custom_outputs (std::vector<std::string>{ output_name }));
1850
- cfg.set_property (ov::intel_gpu::force_implementations (ov::intel_gpu::ImplForcingMap{ {" concat" , impl} }));
1851
- network network_test (engine, topology, cfg);
1852
-
1853
- network_test.set_input_data (" input0" , input0);
1854
- auto outputs = network_test.execute ();
1855
-
1856
- ASSERT_EQ (outputs.size (), size_t (1 ));
1857
- ASSERT_EQ (outputs.begin ()->first , output_name);
1858
-
1859
- auto output_memory = outputs.at (output_name).get_memory ();
1860
- auto output_layout = output_memory->get_layout ();
1861
- int y_size = output_layout.spatial (1 );
1862
- int x_size = output_layout.spatial (0 );
1863
- int f_size = output_layout.feature ();
1864
- int b_size = output_layout.batch ();
1865
-
1866
- ASSERT_EQ (output_layout.format , format::bfyx);
1867
- ASSERT_EQ (y_size, test_y);
1868
- ASSERT_EQ (x_size, test_x);
1869
- ASSERT_EQ (f_size, test_feature * 2 );
1870
- ASSERT_EQ (b_size, input_b);
1871
-
1872
- cldnn::mem_lock<test_data_type> output_ptr (output_memory, get_test_stream ());
1873
-
1874
- if (i == 0 ) {
1875
- for (size_t x = 0 ; x < output_layout.count (); ++x) {
1876
- outputs_ref[x] = output_ptr[x];
1877
- }
1878
- } else {
1879
- for (size_t x = 0 ; x < output_layout.count (); ++x) {
1880
- ASSERT_EQ (output_ptr[x], outputs_ref[x]);
1881
- }
1882
- }
1883
- }
1884
- }
1885
-
1886
1783
template <typename Type>
1887
1784
struct concat_gpu_4d_implicit_onednn : public concat_gpu_implicit {
1888
1785
public:
0 commit comments