Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/plugins/intel_gpu/src/graph/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,10 @@ void program::init_graph() {
apply_opt_pass<graph_initializations>();

apply_opt_pass<mark_nodes>();

for (auto& node : processing_order) {
if (!node->is_type<data>())
node->get_output_layouts();
}
// Perform initial shape_of subgraphs markup
apply_opt_pass<mark_shape_of_subgraphs>();
}
Expand All @@ -533,10 +536,6 @@ void program::pre_optimize_graph(bool is_internal) {
processing_order.calculate_BFS_processing_order(); // this method makes sense only for OOOQ (out of order execution queue)

bool output_size_handling_enabled = analyze_output_size_handling_need();
for (auto& node : processing_order) {
if (!node->is_type<data>())
node->get_output_layouts();
}

bool optimize_data = _config.get_property(ov::intel_gpu::optimize_data);
if (optimize_data) {
Expand Down
10 changes: 8 additions & 2 deletions src/plugins/intel_gpu/src/plugin/ops/loop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,14 @@ namespace intel_gpu {
template<class DATA_TYPE>
static DATA_TYPE CreateScalarData(ProgramBuilder &p, const cldnn::primitive_id& id, ov::Shape& shape, cldnn::data_types dtype, int64_t num, int64_t rank) {
auto mem = p.get_engine().allocate_memory({ shape, dtype, cldnn::format::get_default_format(rank) });
cldnn::mem_lock<int64_t> ptr{mem, p.get_engine().get_service_stream()};
*ptr.begin() = num;
if ( dtype == cldnn::data_types::i32 ) {
cldnn::mem_lock<int32_t> ptr{mem, p.get_engine().get_service_stream()};
*ptr.begin() = static_cast<int32_t>(num);
} else {
cldnn::mem_lock<int64_t> ptr{mem, p.get_engine().get_service_stream()};
*ptr.begin() = num;
}

return {id, mem};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ TEST_P(test_can_fuse_reorder_onednn, reorder_for_firstconv_onednn)

INSTANTIATE_TEST_SUITE_P(testing_can_fuse_reorder_first_conv, test_can_fuse_reorder_onednn,
::testing::ValuesIn(std::vector<reorder_test_param>{
reorder_test_param{format::bs_fs_yx_bsv8_fsv4, format::b_fs_yx_fsv32, data_types::f32, data_types::u8, {1, 3, 8, 8}, {1, 32, 8, 8}, {1, 3, 1, 1},
reorder_test_param{format::b_fs_yx_fsv16, format::b_fs_yx_fsv32, data_types::f32, data_types::u8, {1, 3, 8, 8}, {1, 32, 8, 8}, {1, 3, 1, 1},
tensor{1}, tensor{0}, data_types::u8, format::goiyx, true},
reorder_test_param{format::bs_fs_yx_bsv8_fsv2, format::b_fs_yx_fsv16, data_types::f32, data_types::f16, {1, 3, 8, 8}, {1, 32, 8, 8}, {1, 3, 1, 1},
reorder_test_param{format::b_fs_yx_fsv4, format::b_fs_yx_fsv16, data_types::f32, data_types::f16, {1, 3, 8, 8}, {1, 32, 8, 8}, {1, 3, 1, 1},
tensor{1}, tensor{0}, data_types::f16, format::goiyx, true},
}));

Expand Down