Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GPU] Remove unused formats #23431

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
77 changes: 0 additions & 77 deletions src/plugins/intel_gpu/include/intel_gpu/runtime/format.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,26 +139,16 @@ struct format {
oyix,
oxiy,
os_iyx_osv16, ///< format used only for convolution weights
o_is_yx_isv2, ///< format used only for convolution weights
o_is_yx_isv4, ///< format used only for convolution weights
o_is_yx_isv16, ///< format used only for convolution weights
o_is_zyx_isv16, ///< format used only for convolution weights
os_yxi_osv16, ///< format used only for convolution weights
os_is_yx_osv16_isv2, ///< format used only for convolution weights
os_is_yx_osv16_isv16, ///< format used for convolution i8 weights
os_is_zyx_osv32_isv16,
os_is_zyx_osv64_isv16,
os_zyxi_osv16, ///< format used for weights for 3D convolution
os_is_yx_isv16_osv16, ///< format used for blocked convolution
os_is_zyx_isv16_osv16, ///< format used for weights for blocked 3D convolution
is_os_zyx_isv16_osv16, ///< format used for weights for blocked 3D deconvolution
is_os_yx_osv8_isv4, ///< format used for weights for blocked deconvolution
is_os_yx_isv16_osv16, ///< format used for weights for blocked deconvolution
is_os_yx_isv16_osv8, ///< format used for weights for blocked deconvolution
is_os_yx_isv16_osv4, ///< format used for weights for blocked deconvolution
is_os_yx_isv16_osv2, ///< format used for weights for blocked deconvolution
os_is_yx_isa8_osv16_isv2, ///< format used for weights for blocked 2D onednn convolution
os_is_zyx_isa8_osv16_isv2, ///< format used for weights for blocked 3D onednn convolution
os_is_yx_isv8_osv16_isv2, ///< format used for weights for blocked 2D convolution
os_is_zyx_isv8_osv16_isv2, ///< format used for weights for blocked 3D convolution
///< os - output feature maps slice, i - input feature maps,
Expand Down Expand Up @@ -187,66 +177,24 @@ struct format {
os_is_zyx_isa8_osv8_isv4, ///< format for weights for MMAD convolution
os_is_yx_isa8_osv16_isv4, ///< format for weights for fully connected MMAD
os_is_zyx_isa8_osv16_isv4, ///< format for weights for fully connected MMAD
os_is_yx_isa8_osv8_isv4_swizzled_by_4, ///< format for weights for MMAD convolution
os_is_yx_osa4_isa8_osv8_isv4_swizzled_by_4, ///< format for weights for MMAD fsv32 convolution
os_is_zyx_osa4_isa8_osv8_isv4_swizzled_by_4, ///< format for weights for MMAD fsv32 convolution
os_is_yx_osa4_isa8_osv8_isv2, ///< format for weights for MMAD fsv32 convolution
os_is_zyx_osa4_isa8_osv8_isv2, ///< format for weights for MMAD fsv32 convolution
os_is_zyx_osa4_isa8_osv8_isv4, ///< format for weights for MMAD fsv32 convolution
os_is_yx_osa4_isa8_osv8_isv4, ///< format for weights for MMAD fsv32 convolution
os_is_yx_osa2_isa8_osv8_isv2,
os_is_zyx_osa2_isa8_osv8_isv2,
os_is_yx_osa2_isa8_osv16_isv2,
os_is_yx_osa2_isa8_osv16_isv4,
os_is_yx_isa8_osv8_isv2,
is_os_yx_isa8_osv8_isv2,
is_os_yx_isa8_osv8_isv4,
is_os_yx_osa8_isv16_osv4,
os_is_zyx_isa8_osv8_isv2,
is_os_zyx_isa8_osv8_isv2,
is_os_zyx_isa8_osv8_isv4,
is_os_yx_isa2_osa8_isv8_osv2,
is_os_yx_isa4_osa8_isv8_osv4,
is_os_yx_osa4_isa8_osv8_isv4,
is_o_yx_isv32, ///< format for weights for 1x1 MMAD convolutions
is_o32_yx_isv32_swizzled_by_4, ///< format for weights for 1x1 MMAD convolutions
os_is_y_x8_osv8_isv4, ///< format for weights for 1x1 MMAD convolutions
os_is_y_x8_osv8_isv4_swizzled_by_4, ///< format for weights for 1x1 MMAD convolutions
os_is_yx_osv16_isv4, ///< format for weights for IMAD convolutions
os_is_yx_osv8_isv4, ///< format used for convolution i8 weights
os_is_zyx_osv8_isv4, ///< format used for convolution i8 weights
os_is_yx_osv8_isv2, ///< format used for convolution fp16 weights
os_is_zyx_osv8_isv2, ///< format used for convolution fp16 weights
os_is_zyx_osv16_isv16, ///< format for weights for IMAD convolutions
os_is_yx_osv32_isv4_swizzled_by_2, ///< format for weights for IMAD convolutions
os_is_yx_osv32_isv4, ///< format for weights for IMAD convolutions
os_is_zyx_osv32_isv4, ///< format for weights for IMAD convolutions
os_is_osv32_isv32_swizzled_by_4, ///< format for weights for 1x1 IMAD convolution
os_iyx_osv8,
os_iyx_osv32__ai32,
iy_xs_os_xsv2_osv8__ao32,
iy_xs_os_xsv2_osv16__ao32,
i_yxs_os_yxsv2_osv16,
os_i_yxs_osv4_yxsv4,
os_i_osv16, ///< format used only for fully connected weights
os_i_osv16__ai8, ///< format used only for fully connected weights
os_i_osv8__ai8, ///< format used only for fully connected weights
os_y_is_x_osv8_isv2,
os_y_is_x_osv8_isv4,
os_y_is_x_osv16_isv4,
os_yx_is_osv8_isv2,
os_yx_is_osv8_isv4,
os_yx_is_osv16_isv2,
os_zyx_is_osv8_isv2,
os_zyx_is_osv8_isv4,
os_zy_is_x_osv8_isv2,
os_zy_is_x_osv8_isv4,
os_is_yx_osv4_isv16,
os_is_yx_osv4_isv2,
os_is_yx_osv8_isv16,
os_is_yx_osv2_isv4,
os_is_yx_osv2_isv16,
os_is_yx_osv2_isv32,

goiyx, ///< format used for weights for 2D convolution
gioyx, ///< format used for weights for 2D deconvolution
Expand All @@ -256,54 +204,29 @@ struct format {
g_os_iyx_osv8, ///< format used for weights for 2D convolution
g_os_iyx_osv16, ///< format used for weights for 2D convolution
g_os_iyx_osv32, ///< format used for weights for 2D convolution
gs_oiyx_gsv8, ///< format used for weights for 2D convolution
gs_oiyx_gsv16, ///< format used for weights for 2D convolution
gs_oizyx_gsv8, ///< format used for weights for 3D convolution
gs_oizyx_gsv16, ///< format used for weights for 3D convolution
gs_oiyx_gsv32, ///< format used for weights for 2D convolution
gs_oizyx_gsv32, ///< format used for weights for 3D convolution
g_is_os_zyx_isv16_osv16, ///< format used for grouped weights for blocked 3D deconvolution
g_os_is_yx_osv16_isv4,
g_os_is_zyx_osv16_isv16,
g_is_os_yx_isv16_osv16,
g_os_is_yx_isa8_osv8_isv2,
g_os_is_yx_isa8_osv8_isv4,
g_os_is_zyx_isv8_osv16_isv2,
g_os_is_yx_isv8_osv16_isv2,
g_os_is_zyx_isv16_osv16,
g_os_zy_is_x_osv8_isv2,
g_os_zy_is_x_osv8_isv4,
g_os_zyx_is_osv8_isv2,
g_os_zyx_is_osv8_isv4,
g_os_zyx_is_osv16_isv4, ///< format for imad deconvolution
g_os_zyx_is_osv16_isv16, ///< format for imad deconvolution
g_os_zyx_is_osv16_isv32, ///< format for imad deconvolution
g_os_zyx_is_osv32_isv4, ///< format for imad deconvolution
g_os_zyx_is_osv32_isv16, ///< format for imad deconvolution
g_os_zyx_is_osv32_isv32, ///< format for imad deconvolution
g_os_is_yx_isv16_osv16,
g_os_is_yx_osv8_isv2,
g_os_is_yx_osv8_isv4,
gs_oi_yxs_gsv4_yxsv4,
gs_oi_yxs_gsv16_yxsv4,
gs_oi_yxs_gsv32_yxsv4,
gi_yxs_os_yxsv2_osv16,
giy_xs_os_xsv2_osv8__ao32,
giy_xs_os_xsv2_osv16__ao32,
g_os_is_yx_osa2_isa8_osv8_isv2,
g_os_is_yx_osa4_isa8_osv8_isv4,
g_os_is_yx_osa4_isa8_osv8_isv2,
g_os_is_yx_osa2_isa8_osv16_isv2,
g_os_is_yx_osa2_isa8_osv16_isv4,
g_os_is_zyx_osa4_isa8_osv8_isv2,
g_os_is_zyx_osa4_isa8_osv8_isv4,
g_os_is_zyx_isa8_osv8_isv2,
g_os_is_zyx_isa8_osv8_isv4,
g_os_yx_is_osv8_isv2,
g_os_yx_is_osv8_isv4,
g_os_yx_is_osv16_isv2,
g_os_y_is_x_osv8_isv2,
g_os_y_is_x_osv8_isv4,

format_num, ///< number of format types
custom, ///< means that this format is created based on custom format traits and may have no corresponding label
Expand Down
25 changes: 0 additions & 25 deletions src/plugins/intel_gpu/include/intel_gpu/runtime/tensor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,20 +550,6 @@ struct tensor {
my_sizes[1] = align_to(my_sizes[1], 32);
adjusted_coords[0] = align_to(adjusted_coords[0], 16);
adjusted_coords[1] = align_to(adjusted_coords[1], 32);
} else if (fmt == cldnn::format::os_is_yx_isa8_osv8_isv4_swizzled_by_4 && !(is_aligned_to(my_sizes[0], 32)) && !(is_aligned_to(my_sizes[1], 32))) {
my_sizes[0] = align_to(my_sizes[0], 32);
my_sizes[1] = align_to(my_sizes[1], 32);
adjusted_coords[0] = align_to(adjusted_coords[0], 32);
adjusted_coords[1] = align_to(adjusted_coords[1], 32);
} else if (fmt == cldnn::format::is_o32_yx_isv32_swizzled_by_4 && (!is_aligned_to(my_sizes[1], 32) || !is_aligned_to(my_sizes[0], 32))) {
my_sizes[0] = align_to(my_sizes[0], 32);
my_sizes[3] = align_to(my_sizes[3], 32);
adjusted_coords[0] = align_to(adjusted_coords[0], 32);
adjusted_coords[3] = align_to(adjusted_coords[3], 32);
} else if (fmt == cldnn::format::os_is_y_x8_osv8_isv4 || fmt == cldnn::format::os_is_yx_isa8_osv8_isv4_swizzled_by_4) {
my_sizes[1] = align_to(my_sizes[1], 4);
my_sizes[0] = align_to(my_sizes[0], 8);
my_sizes[2] = align_to(my_sizes[2], 8);
} else if (fmt == cldnn::format::gs_oi_yxs_gsv4_yxsv4 || fmt == cldnn::format::gs_oi_yxs_gsv16_yxsv4 || fmt == cldnn::format::gs_oi_yxs_gsv32_yxsv4) {
const auto yxsv = 4;
const auto flat_xy = adjusted_coords[4] + adjusted_coords[3] * my_sizes[4];
Expand All @@ -590,17 +576,6 @@ struct tensor {
adjusted_coords.insert(std::prev(adjusted_coords.end()), flat_xy % yxsv);
adjusted_coords[2] = flat_xy / yxsv;
adjusted_coords[1] = 0;
} else if (fmt == cldnn::format::os_i_yxs_osv4_yxsv4) {
const auto yxsv = 4;
const auto flat_xy = adjusted_coords[3] + adjusted_coords[2] * my_sizes[3];

my_sizes.push_back(yxsv);
my_sizes[3] = ceil_div(my_sizes[2] * my_sizes[3], yxsv);
my_sizes[2] = 1;

adjusted_coords.push_back(flat_xy % yxsv);
adjusted_coords[3] = flat_xy / yxsv;
adjusted_coords[2] = 0;
} else if ((fmt == cldnn::format::giy_xs_os_xsv2_osv8__ao32 || fmt == cldnn::format::giy_xs_os_xsv2_osv16__ao32) && !is_aligned_to(my_sizes[3], 32)) {
my_sizes[4] = align_to(my_sizes[4], 32);
}
Expand Down
Loading
Loading