Porting custom THCUNN function to ATen


I was following BatchNorm in ATen port to ATen and tried to follow along, however, in the BatchNormalization_updateOutput function, the arguments have an underscore in them input_. But during compilation, in nn_parse.py, the fwd_function shows as such:

BatchNormalization_updateOutput(THNNState* state, THTensor* input, THTensor* output, THTensor* weight, THTensor* bias, THTensor* running_mean, THTensor* running_var, THTensor* save_mean, THTensor* save_std, bool train, double momentum, double eps)

The underscore disappears. I am porting some of my custom THCUNN functions to ATen, but I am getting error as can’t find binding for ‘input_’ and the fwd_function also still retains the underscores. Any idea what I might be missing, or what are the steps to link the THCUNN implementations through ATen?


Interesting! I’m not an expert on ATen and TH*NN, but did you specify the function signature in nn.yaml? Afaik, the arg names in TH*NN c files shouldn’t matter.