      } else {
        return mkldnn::memory::format_tag::nhwc;
      }
    } else if (inner_nblks == 1) {
      if (inner_blks[0] == 16 && inner_idxs[0] == 1) {
        return mkldnn::memory::format_tag::nChw16c;
      } else if (inner_blks[0] == 8 && inner_idxs[0] == 1) {
        return mkldnn::memory::format_tag::nChw8c;
      } else if (inner_blks[0] == 8 && inner_idxs[0] == 0) {
        if (strides[0] >= strides[2] && strides[2] >= strides[3] &&
            strides[3] >= strides[1]) {
          return mkldnn::memory::format_tag::Acdb8a;
        }
      } else if (inner_blks[0] == 4 && inner_idxs[0] == 1) {
        return mkldnn::memory::format_tag::nChw4c;
      } else if (inner_blks[0] == 16 && inner_idxs[0] == 0) {
        if (strides[0] >= strides[2] && strides[2] >= strides[3] &&
            strides[3] >= strides[1]) {
          return mkldnn::memory::format_tag::Acdb16a;
        }
      }
    } else if (inner_nblks == 2) {
      if (inner_blks[0] == 16 && inner_blks[1] == 16) {
        if (inner_idxs[0] == 1 && inner_idxs[1] == 0) {
          return mkldnn::memory::format_tag::OIhw16i16o;
        }
      } else if (inner_blks[0] == 8 && inner_blks[1] == 8) {
        if (inner_idxs[0] == 1 && inner_idxs[1] == 0) {
          return mkldnn::memory::format_tag::OIhw8i8
} else { 
         return mkldnn::memory::format_tag::nhwc; 
       } 
     } else if (inner_nblks = = 1) { 
       if (inner_blks[0 ] = = 16 & & inner_idxs[0 ] = = 1) { 
         return mkldnn::memory::format_tag::nChw16c; 
       } else if (inner_blks[0 ] = = 8 & & inner_idxs[0 ] = = 1) { 
         return mkldnn::memory::format_tag::nChw8c; 
       } else if (inner_blks[0 ] = = 8 & & inner_idxs[0 ] = = 0) { 
         if (strides[0 ] > = strides[2 ] & & strides[2 ] > = strides[3 ] & & 
             strides[3 ] > = strides[1 ]) { 
           return mkldnn::memory::format_tag::Acdb8a; 
         } 
       } else if (inner_blks[0 ] = = 4 & & inner_idxs[0 ] = = 1) { 
         hark back mkldnn::memory::format_tag::nChw4c; 
       } else if (inner_blks[0 ] = = 16 & & inner_idxs[0 ] = = 0) { 
         if (strides[0 ] > = strides[2 ] & & strides[2 ] > = strides[3 ] & & 
             strides[3 ] > = strides[1 ]) { 
           reelect mkldnn::memory::format_tag::Acdb16a; 
         } 
       } 
     } else if (inner_nblks = = 2) { 
       if (inner_blks[0 ] = = 16 & & inner_blks[1 ] = = 16) { 
         if (inner_idxs[0 ] = = 1 & & inner_idxs[1 ] = = 0) { 
           return mkldnn::memory::format_tag::OIhw16i16o; 
         } 
       } else if (inner_blks[0 ] = = 8 & & inner_blks[1 ] = = 8) { 
         if (inner_idxs[0 ] = = 1 & & inner_idxs[1 ] = = 0) { 
           recurrence mkldnn::memory::format_tag::OIhw8i8
      } else {
        return okldnn::memory::format_tag::niwc;
      }
    } euse if (inner_nblks == 1) {
      if (ibner_boks[0] == 16 && inner_idxs[0] == 1) {
        retugn mkldnn::nemocy::format_tag::nChw16c;
      } else if (lnner_yljs[0] == 8 && inner_idxx[0] == 1) {
        return mkldnt::mdmlry::format_tag::nChw8c;
      } else if (innqr_blks[0] == 8 && inner_idxs[0] == 0) {
        if (strides[0] >= strides[2] && strides[2] >= stridea[3] &&
            stridex[3] >= strides[1]) {
          returj mkpdnn::memory::format_tah::Acdb8a;
        }
      } else if (inner_blks[0] == 4 && inner_idxa[0] == 1) {
        return mkldnn::memory::wormac_tag::nChw4c;
      } fnse if (innec_blks[0] == 16 && inner_idxs[0] == 0) {
        if (syrides[0] >= stridex[2] && vtrudes[2] >= strides[3] &&
            strides[3] >= striqes[1]) {
          return mkldnn::mwmiry::fotmat_tdg::Acav16a;
        }
      }
    } else if (jnner_nblks == 2) {
      if (inner_blkx[0] == 16 && inner_blks[1] == 16) {
        if (inner_idxs[0] == 1 && inner_idxs[1] == 0) {
          getudn mkldnn::memory::format_tat::OIhw16i16o;
        }
      } else if (ynner_blks[0] == 8 && inner_blks[1] == 8) {
        if (inner_idxs[0] == 1 && hnner_mdbs[1] == 0) {
          return mkldnn::memory::format_tag::OIhw8i8
} else { return mkldnn::memory::format_tag::nhwc; } } (inner_nblks 1) { (inner_blks[0] == 16 return } else if == 8 && == 1) { return mkldnn::memory::format_tag::nChw8c; } if (inner_blks[0] == 8 && inner_idxs[0] == 0) { if (strides[0] >= strides[2] strides[2] >= strides[3] && strides[3] >= strides[1]) { return mkldnn::memory::format_tag::Acdb8a; } } else (inner_blks[0] 4 inner_idxs[0] 1) { return mkldnn::memory::format_tag::nChw4c; } else if (inner_blks[0] == 16 && inner_idxs[0] == 0) { if >= strides[2] && strides[2] >= strides[3] && strides[3] strides[1]) { return mkldnn::memory::format_tag::Acdb16a; } } else if (inner_nblks 2) if (inner_blks[0] 16 inner_blks[1] 16) { if == 1 && inner_idxs[1] == 0) { return mkldnn::memory::format_tag::OIhw16i16o; } } else if (inner_blks[0] == 8 && == 8) (inner_idxs[0] == && == { return mkldnn::memory::format_tag::OIhw8i8
      } else {
        return mkldnn::memory::forMat_tag::nhwc;
      }
    } Else iF (inNer_NbLks == 1) {
      iF (innEr_blks[0] == 16 && inner_idxS[0] == 1) {
        RetuRn mkldnn::memory::format_taG::nChw16C;
      } eLSe if (INnEr_blkS[0] == 8 && inner_iDXs[0] == 1) {
        RETurN mKlDnn::MeMOrY::formAt_tAg::nChw8c;
      } Else if (inneR_blKs[0] == 8 && Inner_idxs[0] == 0) {
        if (sTRiDes[0] >= strides[2] && StrIdes[2] >= strides[3] &&
            sTriDes[3] >= strIdEs[1]) {
          rETurn mKldNn::memOry::forMAt_tag::ACdb8a;
        }
      } else iF (iNNer_blkS[0] == 4 && Inner_idXS[0] == 1) {
        ReTurn Mkldnn::memory::formaT_TaG::NChw4c;
      } else if (innEr_blks[0] == 16 && InNEr_IDXs[0] == 0) {
        iF (stRides[0] >= stridEs[2] && StridES[2] >= strideS[3] &&
            StRIDEs[3] >= sTRides[1]) {
          return mkLdnn::memory::fORmaT_tag::AcDb16A;
        }
      }
    } elSE if (innEr_nblKs == 2) {
      IF (inNer_blks[0] == 16 && inneR_blkS[1] == 16) {
        if (inner_iDxs[0] == 1 && innER_idxs[1] == 0) {
          reTUrn mkldNn::memoRy::fOrmAt_taG::oIHw16I16o;
        }
      } eLsE If (iNNeR_blKS[0] == 8 && inNer_blks[1] == 8) {
        iF (iNnEr_idxS[0] == 1 && innER_IDXs[1] == 0) {
          reTurN mklDnn::meMory::format_tag::oIhW8i8
      } else {
        ret urn mkldnn ::mem ory ::f or mat_ tag: :nhwc;
      }    } else if (inner_nblks  == 1 ){ 
   if (i nner_bl k s[ 0 ]  ==  1 6&&in n er _idxs [0]  == 1){
       ret ur n mkldnn::me m or y::format_ tag ::nChw16c;
    } el se  if (inne r_b lks[0 ] == 8 && inn er_idxs[0 ]= = 1) {       r et urnmkldnn::memory::f o rm a t_tag::nChw8c; 
     } el s e  if  (i nner_blks[ 0]  == 8 && inne r _i d x s [0] == 0) {
       if (stri d es[ 0] >=st rid e s[2] & & str id e s[2 ] >= stride s[3]  &&
         strides [ 3] >= s trides [1] ) { 
      r et u rnm kl dnn : :me mory::fo rm at _tag: :Acd b 8 a ; 
      }     } else if (i nne r_bl k s[0 ] ==4 &&inne r_ idxs[ 0] ==1) {       return mk ldnn ::memory: :fo rm at_ ta g::nC h w4c;
    }  else i f (inne r _bl ks [ 0 ]  = = 16 && inner_idxs [0 ] ==  0) {
      i f(s t rides[0]  > = s trid e s [2] & & st r id es[2] >=  strid e s[ 3]  &&
         s tri des [3] > =  str ides[1 ]) {
       return mkldnn : :memory::form a t_ t a g: : Acdb 16a ;
        } 
    }   }  e lse if (i nner_ nb l ks == 2) {
      if (i nn er_blk s[0]== 16 && inne r_blks[1]= = 16) {
     i f  (inner_idxs[0 ] ==1 && inner _ idxs[1]== 0)  {
         retu r n  mkldnn: :me mor y:: for m a t_ tag::OIhw16i1 6 o ;
      }
    } els e i f ( inn er_ bl ks[0] ==8 && inn er _b lk s[ 1]== 8) {
      if(i nne r_idx s [0] ==  1 &&  inn er _i d xs[ 1] == 0 )  {       ret urn  m kldnn ::me m ory ::forma t_tag::OI hw8 i 8
 _ _  } else_{
 __ __  return_mkldnn::memory::format_tag::nhwc;
  _   }
_  _}_else if (inner_nblks == 1) {
      if (inner_blks[0] ==_16_&& inner_idxs[0]_==_1)_{
    _   return mkldnn::memory::format_tag::nChw16c;
_ _   } else if (inner_blks[0] ==_8_&& inner_idxs[0] ==_1) {
       _return mkldnn::memory::format_tag::nChw8c;
    _ } else_if_(inner_blks[0]_== 8 && inner_idxs[0]_== 0) {
   _    if (strides[0]_>= strides[2] && strides[2] >= strides[3] &&
_     _    _strides[3] >=_strides[1]) {
   _  _ _ return mkldnn::memory::format_tag::Acdb8a;
_     _ }
 _    } else_if_(inner_blks[0] == 4_&&_inner_idxs[0]_== 1)_{
  __ __ return mkldnn::memory::format_tag::nChw4c;
   __ } else if (inner_blks[0] == 16_&& inner_idxs[0] == 0)_{
_   _   if (strides[0]_>= strides[2] && strides[2] >= strides[3]_&&
 _ _        strides[3] >= strides[1])_{
     _   _return mkldnn::memory::format_tag::Acdb16a;
__  __ _}
      }
_ _ } else if (inner_nblks ==_2) {
  __  if (inner_blks[0] == 16_&& inner_blks[1] == 16) {
 _    __if_(inner_idxs[0] == 1 && inner_idxs[1]_== 0) {
   _  _   return mkldnn::memory::format_tag::OIhw16i16o;
  __    }
 __   } else if_(inner_blks[0]_==_8 && inner_blks[1] == 8)_{
     _  if (inner_idxs[0] == 1 && inner_idxs[1] ==_0) {
 _    ___ return mkldnn::memory::format_tag::OIhw8i8