From 0e3890c668c929ab1883a1ea01a0007536aef223 Mon Sep 17 00:00:00 2001 From: Hanting Zhang Date: Thu, 8 Feb 2024 22:50:55 +0000 Subject: [PATCH] no pidx --- msm/pippenger.cuh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/msm/pippenger.cuh b/msm/pippenger.cuh index 2911a38..a0a3775 100644 --- a/msm/pippenger.cuh +++ b/msm/pippenger.cuh @@ -479,7 +479,7 @@ class msm_t { size_t digits_sz = nwins * stride * sizeof(uint32_t); size_t pidx_sz = stride * sizeof(uint32_t); - size_t d_blob_sz = d_buckets_sz + d_hist_sz + temp_sz + pidx_sz + digits_sz; + size_t d_blob_sz = d_buckets_sz + d_hist_sz + temp_sz + digits_sz + pidx_sz; d_total_blob = reinterpret_cast(gpu.Dmalloc(d_blob_sz)); size_t offset = 0; @@ -491,14 +491,15 @@ class msm_t { d_temps = vec2d_t((uint2 *)&d_total_blob[offset], stride); d_scalars = (scalar_t *)&d_total_blob[offset]; offset += temp_sz; - d_pidx = (uint32_t *)&d_total_blob[offset]; - offset += pidx_sz; d_digits = vec2d_t((uint32_t *)&d_total_blob[offset], stride); + offset += digits_sz; + d_pidx = (uint32_t *)&d_total_blob[offset]; } RustError invoke(point_t &out, const scalar_t *scalars, size_t nscalars, uint32_t pidx[], bool mont = true) { // assert(this->nscalars <= nscalars); setup_scratch(nscalars); + printf("pidx is null?: %p", pidx); std::vector res(nwins); std::vector ones(gpu.sm_count() * BATCH_ADD_BLOCK_SIZE / WARP_SZ);