   int i_step = blockDim.x;
   int k = blockIdx.x;
   float *gradInput_k = gradInput + k*nInput;
-  float *nodeGrad, *nodeWeight, *nodeBias;
-  float gradOutput_k = gradOutput[k];
+  float *nodeGrad, *nodeWeight;
+  float grad = gradOutput[k];
   int childId = target[k] - 1;
   int parentId, parentIdx, childIdx, nChildren;
-  //int nOutput;
   float *node;
   int n = 0;
 

    nChildren = (int)node[1];
    
    /* CAddTable + Narrow + LogSoftMax */
    // accGradParam will use this as linearGradOutput 
    // (we reuse the _multiBuffer Tensor)
    nodeGrad = logsoftOutput + maxFamilyPath*k + n; 

    for(int i = tx; i < nChildren; i+=i_step)

  if(errcode != cudaSuccess)
    THError(cudaGetErrorString(errcode));
  
  THCudaTensor_free(input);
  return 1;
}

