Skip to content

Commit

Permalink
Reduce diff
Browse files Browse the repository at this point in the history
  • Loading branch information
mryab committed Jul 1, 2022
1 parent 575aa69 commit 025824d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions csrc/ops.cu
Original file line number Diff line number Diff line change
Expand Up @@ -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<<<blocks, 1024>>>(code, A, out, n);
CUDA_CHECK_RETURN(cudaPeekAtLastError());
}

template <typename T, int STOCHASTIC> void quantizeBlockwise(float * code, T *A, float *absmax, unsigned char *out, float *rand, int rand_offset, const int n)
{
int blocks = n/4096;
Expand Down

0 comments on commit 025824d

Please sign in to comment.