Hi @iviarcio, the OCL backend does this transformation in the below location for convolutions, did you also copy this transforms file over for your backend? Perhaps it needs to be tweaked for your usecase. I’d suggest debugging why the below code isn’t being run on your backend.

  

      github.com
  

  
    pytorch/glow/blob/778d44eff16f8dfac25503e0f917531d71bc950b/lib/Backends/OpenCL/Transforms.cpp#L62 1



      
      
            if (CN->getLayout() == NCHW) {
              continue;
            }
          
          
  // If there is no compiler controlled local memory on the device,
            // try to avoid kernels that use (additional) copies to local memory.
            if (devInfo != nullptr && devInfo->availableLocalMemory == 0) {
              continue;
            }
          
          
  auto *NR = convertConvToNCHWConv(CN, F);
            CN->getResult().replaceAllUsesOfWith(NR);
            changed = true;
            continue;
          }
          if (auto *PMN = dyn_cast<MaxPoolNode>(&node)) {
            if (cctx.compMode == CompilationMode::Train) {
              continue;
            }
          
          
  if (PMN->getLayout() == NCHW) {