Pytorch C++/CUDA extension problem

When I write C++/CUDA extension, I use at::IntArrayRef in my C++ source code. But I build custom layer using python, I find that I do not use my C++ extension. Because int of python does not convert to at::IntArrayRef of C++. How to solve this problem?