File tree Expand file tree Collapse file tree 1 file changed +2
-18
lines changed
src/plugins/intel_gpu/src/kernel_selector Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -443,14 +443,7 @@ DataTensor DataTensor::FlattenFeatureAndSpatials() const {
443443
444444 case Tensor::fyxb:
445445 targetLayout = Tensor::fb;
446-
447- // TODO: [FUTURE] Use C++17 [[fallthrough]] instead of code duplication to get portable warning avoidance.
448- if (f.pitch == y.v * x.v * x.pitch ) { // no padding in X/Y axis
449- l = targetLayout;
450- break ;
451- }
452- throw std::runtime_error (" Unsupported - cannot flatten with padding" );
453-
446+ [[fallthrough]];
454447 case Tensor::bfyx:
455448 if (f.pitch == y.v * x.v * x.pitch ) { // no padding in X/Y axis
456449 l = targetLayout;
@@ -472,16 +465,7 @@ DataTensor DataTensor::FlattenFeatureAndSpatials() const {
472465 throw std::runtime_error (" Unsupported - cannot flatten with padding" );
473466 case Tensor::yxfb:
474467 targetLayout = Tensor::fb;
475-
476- // TODO: [FUTURE] Use C++17 [[fallthrough]] instead of code duplication to get portable warning avoidance.
477- if ((x.pitch == f.pitch && y.pitch == x.v * x.pitch ) || // YX - no Features (val/pitch)
478- (y.v == 1 && x.v == 1 && x.pitch == f.pitch && y.pitch == f.pitch ) || // Feature only
479- (f.v * f.pitch == x.pitch && f.v * f.pitch == y.pitch && y.v == 1 && x.v == 1 )) { // Feature only
480- l = targetLayout;
481- break ;
482- }
483- throw std::runtime_error (" Unsupported - cannot flatten yxf to f if f/yx != 1" );
484-
468+ [[fallthrough]];
485469 case Tensor::byxf:
486470 if ((x.pitch == f.pitch && y.pitch == x.v * x.pitch ) || // YX - no Features (val/pitch)
487471 (y.v == 1 && x.v == 1 && x.pitch == f.pitch && y.pitch == f.pitch ) || // Feature only
You can’t perform that action at this time.
0 commit comments