Skip to content

Commit d0a6666

Browse files
committed
fix: use scalar_t for reduction memory size calculation
1 parent 3df0dee commit d0a6666

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchlpc/csrc/cuda/linear_recurrence.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ void compute_linear_recurrence(const scalar_t *decays, const scalar_t *impulses,
240240

241241
// TODO: make user pass in working memory? This allows integration
242242
// with CNMeM (used by Theano)
243-
int reduction_mem_sz = 2 * n_blocks * 33 * n_dims * sizeof(float);
243+
int reduction_mem_sz = 2 * n_blocks * 33 * n_dims * sizeof(scalar_t);
244244
scalar_t *d_reduction_mem;
245245
gpuErrChk(cudaMalloc(&d_reduction_mem, reduction_mem_sz));
246246
scalar_t *d_decay_storage = &d_reduction_mem[0 * n_blocks * 33 * n_dims];

0 commit comments

Comments
 (0)