Double argument type conflict for c++ extension for torchscript

Hi,
I notice an error when i try to add a c++ extension to torchscript, i think the reason is that i have two arguments in double (since torchscript supports double not float), but after i compile them, it gives me this following error:

terminate called after throwing an instance of ‘c10::Error’
what(): Inferred operator schema for a C++ kernel function doesn’t match the expected function schema.
operator: my_namespace::linear_custom
expected schema: my_namespace::linear_custom(Tensor input, Tensor weight, Tensor bias, double alpha, double beta) → (Tensor)
registered at kernels/bindings.cpp:25
inferred schema: (Tensor _0, Tensor _1, Tensor _2, float _3, float _4) → (Tensor _0)
registered at kernels/bindings.cpp:25
reason: Type mismatch in argument 4: double vs float

I have make sure my C++ part does not have float at all…not sure why this happens

BTW previously i run this kernel successfully with pybind11 build in eager mode, im just trying to upgrading it so that i can use graph mode, so I replace the pybind part to:

TORCH_LIBRARY(my_namespace, m) {
m.def(“linear_custom(Tensor input, Tensor weight, Tensor bias, double alpha, double beta) → Tensor”, &linear_custom);
}