summaryrefslogtreecommitdiff
path: root/csrc/common.h
diff options
context:
space:
mode:
authorTim Dettmers <tim.dettmers@gmail.com>2022-09-11 11:55:09 -0700
committerTim Dettmers <tim.dettmers@gmail.com>2022-09-11 11:55:09 -0700
commit19a7adca7a6c9bf7061a384d7e9d9b13676a1a88 (patch)
treec6c29473641febdcf5598fb6ce7ced5452469117 /csrc/common.h
parentf0ae860c86039d1c1e41166aaf2153a5bd9b9a89 (diff)
Fixed 2^31 max size issue for cpu blockwise quant.
Diffstat (limited to 'csrc/common.h')
-rw-r--r--csrc/common.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/csrc/common.h b/csrc/common.h
index 2f25a58..c99034e 100644
--- a/csrc/common.h
+++ b/csrc/common.h
@@ -5,18 +5,20 @@
using namespace BinSearch;
+#define BLOCK_SIZE 16384
+
struct quantize_block_args {
BinAlgo<Scalar, float, Direct2> *bin_searcher;
float *code;
float *A;
float *absmax;
unsigned char *out;
- int block_end;
- int block_idx;
- int threadidx;
+ long long block_end;
+ long long block_idx;
+ long long threadidx;
+ long long blocksize;
};
-#define BLOCK_SIZE 4096
void *quantize_block(void *arguments);