             Array work = Empty(Shape({buffersize_geqrf}), dtype, device);
             T* work_ptr = static_cast<T*>(internal::GetRawOffsetData(work));
 
-            device_internals.cusolverdn_handle().Call(geqrf, m, n, r_ptr, m, tau_ptr, work_ptr, buffersize_geqrf, devInfo);
+            device_internals.cusolverdn_handle().Call(geqrf, m, n, r_ptr, m, tau_ptr, work_ptr, buffersize_geqrf, static_cast<int*>(devInfo.get()));
 
             int devInfo_h = 0;
-            CheckCudaError(cudaMemcpy(&devInfo_h, devInfo, sizeof(int), cudaMemcpyDeviceToHost));
+            Device& native_device = dynamic_cast<native::NativeDevice&>(GetDefaultContext().GetDevice({"native", 0}));
+            device.MemoryCopyTo(&devInfo_h, devInfo.get(), sizeof(int), native_device);
             if (devInfo_h != 0) {
                 throw ChainerxError{"Unsuccessfull geqrf (QR) execution. Info = ", devInfo_h};
             }

            T* r_ptr = static_cast<T*>(internal::GetRawOffsetData(R));
            T* tau_ptr = static_cast<T*>(internal::GetRawOffsetData(tau));

            int* devInfo;
            CheckCudaError(cudaMalloc(&devInfo, sizeof(int)));

            int buffersize_geqrf = 0;
            device_internals.cusolverdn_handle().Call(geqrf_bufferSize, m, n, r_ptr, n, &buffersize_geqrf);


            work = Empty(Shape({buffersize_orgqr}), dtype, device);

            device_internals.cusolverdn_handle().Call(orgqr, m, mc, mn, q_ptr, m, tau_ptr, work_ptr, buffersize_orgqr, static_cast<int*>(devInfo.get()));

            device.MemoryCopyTo(&devInfo_h, devInfo.get(), sizeof(int), native_device);
            if (devInfo_h != 0) {
                throw ChainerxError{"Unsuccessfull orgqr (QR) execution. Info = ", devInfo_h};
            }
