             T* out_ptr = static_cast<T*>(internal::GetRawOffsetData(out_contiguous));
             int work_size = 0;
             const int N = a.shape()[0];
-            device_internals.cusolverdn_handle().Call(bufsize_func, uplo, N, out_ptr, N, &work_size);
+            device_internals.cusolverdn_handle().Call(PotrfBuffersize<T>, uplo, N, out_ptr, N, &work_size);
 
             // POTRF execution
             Array work = Empty(Shape({work_size}), dtype, device);


namespace chainerx {
namespace cuda {

class CudaCholeskyKernel : public CholeskyKernel {
public:


            std::shared_ptr<void> devInfo = device.Allocate(sizeof(int));
            device_internals.cusolverdn_handle().Call(
                    Potrf<T>, uplo, N, out_ptr, N, work_ptr, work_size, static_cast<int*>(devInfo.get()));

            int devInfo_h = 0;
            Device& native_device = dynamic_cast<native::NativeDevice&>(GetDefaultContext().GetDevice({"native", 0}));
