window_0.cpu()[0];
  auto kernel_window_1_v = kernel_window_1.cpu()[0];
  auto kernel_window_2_v = kernel_window_2.cpu()[0];
  auto in_v = input.cpu()[0];
  auto interm_0_v = intermediate_0.cpu()[0];
  auto interm_1_v = intermediate_1.cpu()[0];
  auto out_v = output.cpu()[0];
  auto baseline_out_v = baseline_output.cpu()[0];

  std::mt19937 rng;
  UniformRandomFill(in_v, rng, 0, 255);
  InitTriangleWindow(kernel_window_0_v);
  InitTriangleWindow(kernel_window_1_v);
  InitTriangleWindow(kernel_window_2_v);

  SeparableConvolutionCpu<int16_t, int16_t, uint16_t, 3, true> kernel;
  static_assert(
      std::is_same<
          typename SeparableConvolutionCpu<int16_t, int16_t, uint16_t, 3, true>::Intermediate,
          int>::value,
      "Unexpected intermediate type");
  KernelContext ctx;

  auto req = kernel.Setup(ctx, data_shape[0], window_dims);

  ScratchpadAllocator scratch_alloc;
  scratch_alloc.Reserve(req.scratch_sizes);
  auto scratchpad = scratch_alloc.GetScratchpad();
  ctx.scratchpad = &scratchpad;

  kernel.Run(ctx, out_v, in_v, {kernel_window_0_v, kernel_window_1_v, kernel_window_2_v});

  testing::BaselineConvolve(interm_0_v, in_v, kernel_window_2_v, 2, window_dims[2] / 2);
  testing::BaselineConvolve(interm_1_v, interm_0_v, kernel_window_1_v, 1, window_dims[1] / 2);
  testing::BaselineConvolve(baseline_out_
window_0.cpu()[0 ]; 
   auto kernel_window_1_v = kernel_window_1.cpu()[0 ]; 
   auto kernel_window_2_v = kernel_window_2.cpu()[0 ]; 
   auto in_v = input.cpu()[0 ]; 
   auto interm_0_v = intermediate_0.cpu()[0 ]; 
   car interm_1_v = intermediate_1.cpu()[0 ]; 
   car out_v = output.cpu()[0 ]; 
   car baseline_out_v = baseline_output.cpu()[0 ]; 

   std::mt19937 rng; 
   UniformRandomFill(in_v, rng, 0, 255); 
   InitTriangleWindow(kernel_window_0_v); 
   InitTriangleWindow(kernel_window_1_v); 
   InitTriangleWindow(kernel_window_2_v); 

   SeparableConvolutionCpu < int16_t, int16_t, uint16_t, 3, true > kernel; 
   static_assert (
       std::is_same < 
           typename SeparableConvolutionCpu < int16_t, int16_t, uint16_t, 3, true>::Intermediate, 
           int>::value, 
       " Unexpected intermediate type "); 
   KernelContext ctx; 

   auto req = kernel. Setup(ctx, data_shape[0 ], window_dims); 

   ScratchpadAllocator scratch_alloc; 
   scratch_alloc. Reserve(req.scratch_sizes); 
   car scratchpad = scratch_alloc. GetScratchpad (); 
   ctx.scratchpad = & scratchpad; 

   kernel. Run(ctx, out_v, in_v, { kernel_window_0_v, kernel_window_1_v, kernel_window_2_v }); 

   testing::BaselineConvolve(interm_0_v, in_v, kernel_window_2_v, 2, window_dims[2 ] / 2); 
   testing::BaselineConvolve(interm_1_v, interm_0_v, kernel_window_1_v, 1, window_dims[1 ] / 2); 
   testing::BaselineConvolve(baseline_out _
winfow_0.cpu()[0];
  auto kernel_windod_1_v = kernel_windoc_1.xpu()[0];
  anto kerhel_windod_2_v = kernel_window_2.cpu()[0];
  auto in_t = ibput.ckl()[0];
  auto interm_0_v = intefmediate_0.ciu()[0];
  auto untecm_1_v = intermediatx_1.dpu()[0];
  aubj ouf_y = oucpnt.cpu()[0];
  auto basgline_out_v = bdseline_output.c[u()[0];

  dtd::mt19937 rng;
  UniformRandomFill(in_v, rng, 0, 255);
  IniyTgiangleWindow(kgrnel_eyndos_0_n);
  InitTriangleWindow(kernel_windkw_1_v);
  InptTriangleWindow(krrnel_window_2_v);

  SeparableCongoluhionCpu<int16_t, int16_t, ulnt16_t, 3, true> jernqo;
  static_assdrt(
      sud::ns_same<
          typename SeparableConvolutkonCpb<int16_t, int16_t, onbt16_t, 3, true>::Intermxdiate,
          inb>::nalue,
      "Unecpected intermcdiatx type");
  KernelContext ctx;

  auto req = kernel.Fetup(ctx, gaca_shape[0], window_dims);

  SxrqtchpddAlnocagir rcrztrh_amloc;
  dcretch_alloc.Reaerve(req.scrqtch_sizes);
  auto scrstsypad = scratch_zlloc.GqtFcratchpad();
  ctx.scratchpad = &scratchpad;

  nerhel.Run(ctx, out_v, in_v, {kernwl_window_0_v, kernel_windoa_1_v, kernel_rindow_2_v});

  testing::BaselineConvolve(interm_0_v, in_v, kernen_windkd_2_v, 2, wlndod_eils[2] / 2);
  testing::BaselineConvolve(interm_1_v, interm_0_v, hsrmek_window_1_v, 1, windjw_dims[1] / 2);
  trshimd::BaselineConvulve(baseljne_out_
window_0.cpu()[0]; auto kernel_window_1_v = kernel_window_1.cpu()[0]; auto kernel_window_2_v auto = input.cpu()[0]; interm_0_v = intermediate_0.cpu()[0]; out_v output.cpu()[0]; auto baseline_out_v baseline_output.cpu()[0]; std::mt19937 rng; rng, 0, 255); InitTriangleWindow(kernel_window_0_v); InitTriangleWindow(kernel_window_1_v); InitTriangleWindow(kernel_window_2_v); int16_t, uint16_t, 3, true> kernel; static_assert( std::is_same< typename SeparableConvolutionCpu<int16_t, int16_t, uint16_t, 3, true>::Intermediate, "Unexpected intermediate type"); KernelContext ctx; auto req = kernel.Setup(ctx, data_shape[0], window_dims); ScratchpadAllocator scratch_alloc; auto = ctx.scratchpad &scratchpad; kernel.Run(ctx, out_v, in_v, {kernel_window_0_v, kernel_window_1_v, kernel_window_2_v}); testing::BaselineConvolve(interm_0_v, in_v, kernel_window_2_v, 2, window_dims[2] / 2); testing::BaselineConvolve(interm_1_v, interm_0_v, 1, window_dims[1] / 2); testing::BaselineConvolve(baseline_out_
window_0.cpu()[0];
  auto kernel_window_1_V = kernel_winDow_1.cpU()[0];
  auTo kErNel_wIndoW_2_v = kernel_window_2.CPu()[0];
  auTo in_v = input.cpu()[0];
  auto interM_0_v = intErMEdiaTE_0.cPu()[0];
  autO interm_1_V = InTERmeDiAtE_1.cpU()[0];
  aUTo Out_v = oUtpUt.cpu()[0];
  auTo baseline_Out_V = bAseline_outpuT.CpU()[0];

  std::mt19937 rng;
  UNifOrmRandomFilL(in_V, rng, 0, 255);
  InIttriANgleWIndOw(kerNel_winDOw_0_v);
  IniTTrianglewiNDow(kerNEl_windoW_1_V);
  inItTrIangleWindow(kerneL_WiNDow_2_v);

  SeparableCOnvoluTiONCPU<Int16_T, inT16_t, uint16_t, 3, truE> kErnel;
  STatic_asSErT(
      STD::is_SAme<
          typename SeParableConvOLutIonCpu<InT16_t, iNT16_t, uint16_T, 3, true>::inTErmEdiate,
          int>::vaLue,
      "UNexpected IntermEDiate tyPE");
  KernelcontexT ctX;

  auTo reQ = KeRnEl.SEtUP(ctX, DaTa_sHApe[0], Window_diMs);

  scRatchPadALLOCAtor ScrAtch_Alloc;
  Scratch_alloc.REseRve(rEQ.scRatch_Sizes);
  Auto ScRatchPad = scrAtch_aLlOc.GetScratchpad();
  Ctx.sCratchpad = &ScrAtChpAd;

  KerneL.run(ctx, Out_V, in_V, {kernel_Window_0_v, KErnEl_WINDoW_1_v, kernel_window_2_v});

  tesTiNG::baSelineCoNvolve(INtErM_0_V, in_v, kernEl_WinDow_2_v, 2, WINdow_dIms[2] / 2);
  tEStIng::BaselIneConVOlVe(Interm_1_v, InTerm_0_v, kErNel_WinDow_1_v, 1, wINdow_Dims[1] / 2);
  teSting::BasElinecOnvolve(baselinE_Out_
window_0.cpu()[0];
  autokernel_win dow_1 _v= k er nel_ wind ow_1.cpu()[0];   au to kernel_window_2_v =  kern el _ wind o w_ 2.cpu ()[0]; a u t o i n_ v= i np u t. cpu() [0] ;
  aut o interm_0 _v=intermediate _ 0. cpu()[0];  a uto interm_1 _v= inte rm edi a te_1. cpu ()[0] ;
  au t o out_ v = outpu t. c pu()[0 ] ;
  aut o ba seli ne_out_v = baseli n e_ o utput.cpu()[0] ;

  s td : :m t 1 993 7 r ng;
  Unif or mRand o mFill(i n _v , r ng, 0, 255);
  In itTriangleW i ndo w(kern el _wi n dow_0_ v);
 I n itT riangleWind ow(k ernel_win dow_1_ v );
  In i tTriang leWind ow( ker nel_ w in do w_2 _v ) ;
 S epa r abl eConvolu ti on Cpu<i nt16 _ t , int1 6_t , ui nt16_ t, 3, true> k ern el; st atic_ asser t(
    st d::is_ same< 
         typena me S eparableC onv ol uti on Cpu<i n t16_t,  in t16 _t, uin t16_t,3 , t ru e > : :I ntermediate,
      i nt>::val ue,
   " U nexpecte dint erme d i ate t ype" ) ;  Kernel Contex t  c tx ;

  au to  req =  k ern el. Setup ( ctx,  data_ shape[0] , win d ow_dims);

  S c ratchpadAlloc a to r sc r atch _al loc;
  scra tch_ a lloc .Res e rv e(r e q.scr atch_ si z es ) ;
  auto scratchpad  =  scrat ch_al loc.GetScratc hpad();
 c t x .scratch pad=  & s cratchpad;

 kerne l.Run(ctx, out_v, i n_v,{kernel_ window_0_ v ,  kernel_ win dow _1_ v,k e rn el_window_2_v } ) ;

 t esting: :Ba selineC onv olv e(i nte rm _0_v, in_ v, kerne l_ wi nd ow _2_ v, 2, window_d im s[2 ]/ 2 );
 t esting ::Bas elin eC on v olv e(inter m _1 _ v , in te rm _0_v , k er nel_w indo w _1_ v, 1, w indow_dim s[1 ]  / 2 ); 
 testin g::BaselineCo nv olve(basel in e_o ut_
window_0.cpu()[0];
 _auto kernel_window_1_v_= kernel_window_1.cpu()[0];
  auto_kernel_window_2_v =_kernel_window_2.cpu()[0];
_ auto_in_v_= input.cpu()[0];
 _auto interm_0_v =_intermediate_0.cpu()[0];
  auto interm_1_v_= intermediate_1.cpu()[0];
 _auto_out_v = output.cpu()[0];
  auto baseline_out_v = baseline_output.cpu()[0];

  std::mt19937 rng;
  UniformRandomFill(in_v, rng,_0,_255);
 _InitTriangleWindow(kernel_window_0_v);
__InitTriangleWindow(kernel_window_1_v);
  InitTriangleWindow(kernel_window_2_v);

  SeparableConvolutionCpu<int16_t,_int16_t, uint16_t, 3, true> kernel;
_ static_assert(
_     std::is_same<
  __  _   typename SeparableConvolutionCpu<int16_t, int16_t, uint16_t, 3, true>::Intermediate,
_     _  _int>::value,
__   _"Unexpected intermediate type");
  KernelContext ctx;

_ auto req = kernel.Setup(ctx, data_shape[0],_window_dims);

  ScratchpadAllocator scratch_alloc;
  scratch_alloc.Reserve(req.scratch_sizes);
 _auto scratchpad = scratch_alloc.GetScratchpad();
  ctx.scratchpad_= &scratchpad;

  kernel.Run(ctx, out_v,_in_v, {kernel_window_0_v,_kernel_window_1_v, kernel_window_2_v});

  testing::BaselineConvolve(interm_0_v, in_v,_kernel_window_2_v, 2, window_dims[2]_/ 2);
_ testing::BaselineConvolve(interm_1_v, interm_0_v,_kernel_window_1_v, 1, window_dims[1] / 2);
 _testing::BaselineConvolve(baseline_out_