From 025824d29b38f6b981bbcea8a61bc23e7f2b3e02 Mon Sep 17 00:00:00 2001 From: Max Ryabinin Date: Fri, 1 Jul 2022 17:42:58 +0300 Subject: Reduce diff --- csrc/ops.cu | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'csrc/ops.cu') diff --git a/csrc/ops.cu b/csrc/ops.cu index dbb50be..40c185c 100644 --- a/csrc/ops.cu +++ b/csrc/ops.cu @@ -41,6 +41,14 @@ void quantize(float *code, float *A, unsigned char *out, int n) CUDA_CHECK_RETURN(cudaPeekAtLastError()); } +void dequantize(float *code, unsigned char *A, float *out, int n) +{ + int blocks = n/1024; + blocks = n % 1024 == 0 ? blocks : blocks + 1; + kDequantize<<>>(code, A, out, n); + CUDA_CHECK_RETURN(cudaPeekAtLastError()); +} + template void quantizeBlockwise(float * code, T *A, float *absmax, unsigned char *out, float *rand, int rand_offset, const int n) { int blocks = n/4096; -- cgit v1.2.3