The error message is:
[E 03/18/22 15:45:33.085 2596499] [llvm_program.cpp:check_runtime_error@484] Assertion failure: (kernel=P2G_c56_0) Accessing field (S22place<f32>) of size (128, 128) with indices (141, 27)
which shows that some field with shape (128, 128) is accessed with out-of-boundary indices.
grid_m are the only fields with that shape, it seems that your
[base + offset] part is out-of-boundary. More specifically, considering the source of
[base + offset], your
x[p] produces a value outside [0, 127].