   float *input_k = input + k*nInput;
   float *nodeGradOutput, *nodeGradWeight, *nodeGradBias;
   // reuse _multiBuffer for keeping track of which node gets gradients
-  float *nodeUpdate = nodeUpdateCuda + maxDept*k; 
+  int *nodeUpdate = nodeUpdateCuda + maxDept*k; 
   int childId = target[k] - 1;
   int parentId, parentIdx, nChildren;
   float *node;

    }
    
    // keep track of which node gets gradients
    nodeUpdate[m] = (float)parentId;
    
    n += nChildren;
    CudaAssert((n <= maxFamilyPath))

  THCudaTensor *parentChildren = (THCudaTensor*)luaT_getfieldcheckudata(L, 1, "parentChildrenCuda", "torch.CudaTensor");
  
  THCudaTensor *linearGradOutput = (THCudaTensor*)luaT_getfieldcheckudata(L, 1, "_multiBuffer", "torch.CudaTensor");
  THCudaIntTensor *nodeUpdateCuda = (THCudaIntTensor*)luaT_getfieldcheckudata(L, 1, "_nodeUpdateCuda", "torch.CudaTensor");
  THIntTensor *nodeUpdateHost = (THIntTensor*)luaT_getfieldcheckudata(L, 1, "_nodeUpdateHost", "torch.IntTensor");
  
  THCudaTensor *gradWeight = (THCudaTensor*)luaT_getfieldcheckudata(L, 1, "gradWeight", "torch.CudaTensor");
