check failed: input.n() % BATCH_SIZE_GRANULARITY == 0
Opened this issue · 2 comments
zZH1222hui commented
xiao1874 commented
hi,I'm having the same problem, how can you fix it? thx!
kakukakujirori commented
The following worked for me:
--- a/src/Field/TCNNWP.cpp
+++ b/src/Field/TCNNWP.cpp
@@ -103,7 +103,7 @@ Tensor TCNNWP::Query(const Tensor& pts) {
auto info = torch::make_intrusive<TCNNWPInfo>();
int batch_size = pts.size(0);
- int batch_size_al = (batch_size + 127) / 128 * 128;
+ int batch_size_al = (batch_size + 255) / 256 * 256;
auto pad_opt = torch::nn::functional::PadFuncOptions({ 0LL, 0LL, 0LL, (long long) (batch_size_al - batch_size)});
Tensor input = torch::nn::functional::pad(pts, pad_opt);