10
10
#include < intel_gpu/primitives/eltwise.hpp>
11
11
#include < intel_gpu/primitives/gather.hpp>
12
12
#include < intel_gpu/primitives/reorder.hpp>
13
+ #include < intel_gpu/primitives/reshape.hpp>
13
14
#include < intel_gpu/primitives/data.hpp>
14
15
15
16
#include " eltwise_inst.h"
17
+ #include " reshape_inst.h"
16
18
17
19
using namespace cldnn ;
18
20
using namespace ::tests;
@@ -3442,7 +3444,7 @@ TEST(eltwise_gpu_f32, broadcast_test_dim3_dim4) {
3442
3444
TEST (eltwise_gpu_f32, broadcast_test_dim3_dim4_new_shape_infer_false) {
3443
3445
auto & engine = get_test_engine ();
3444
3446
3445
- ov::Shape in2_shape = {1 , 4 , 1 , 1 };
3447
+ ov::Shape in2_shape = {1 , 1 , 4 , 1 };
3446
3448
auto input2 = engine.allocate_memory ({ ov::PartialShape (in2_shape), data_types::f32, format::bfyx });
3447
3449
3448
3450
std::vector<float > const_input = {
@@ -3457,26 +3459,27 @@ TEST(eltwise_gpu_f32, broadcast_test_dim3_dim4_new_shape_infer_false) {
3457
3459
});
3458
3460
3459
3461
float answers[16 ] = {
3460
- 1.5 , 0 .5 , 7 .5 , 4 ,
3461
- 2.5 , 0 .5 , 8 .5 , 7.7 ,
3462
- 3.5 , 1 , 9 .5 , 14.5 ,
3463
- 4.5 , 0 , 10 .5 , 10.5
3462
+ 1.5 , 2 .5 , 5 .5 , 4 ,
3463
+ 2.5 , 2 .5 , 6 .5 , 7.7 ,
3464
+ 3.5 , 3 , 7 .5 , 14.5 ,
3465
+ 4.5 , 2 , 8 .5 , 10.5
3464
3466
};
3465
3467
3466
3468
ExecutionConfig config = get_test_default_config (engine);
3467
3469
config.set_property (ov::intel_gpu::allow_new_shape_infer (false ));
3468
3470
3469
- // in1:dim3, int2:dim4
3471
+ // Eltwise in1:dim3, int2:dim4
3470
3472
{
3471
- ov::Shape in1_shape = {2 , 4 , 2 };
3473
+ ov::Shape in1_shape = {1 , 2 , 2 , 4 };
3472
3474
3473
3475
auto input = engine.allocate_memory ({ ov::PartialShape (in1_shape), data_types::f32, format::bfyx });
3474
3476
set_values (input, const_input);
3475
3477
3476
3478
topology topology;
3477
3479
topology.add (input_layout (" input" , input->get_layout ()));
3478
3480
topology.add (input_layout (" input2" , input2->get_layout ()));
3479
- topology.add (eltwise (" eltwise" , { input_info (" input" ), input_info (" input2" ) }, eltwise_mode::sum));
3481
+ topology.add (reshape (" reshape_input1" , input_info (" input" ), false , {}, ov::PartialShape ({2 , 2 , 4 })));
3482
+ topology.add (eltwise (" eltwise" , { input_info (" reshape_input1" ), input_info (" input2" ) }, eltwise_mode::sum));
3480
3483
3481
3484
network network (engine, topology, config);
3482
3485
0 commit comments