Is I holding the indices or are the actual indices stored in b, c and d?
In the latter case, would this work?
b = 10
m, n = 5, 6
c, d = 4, 2
x = torch.zeros(b, m, n)
b_idx = torch.empty(b, 1, 1, dtype=torch.long).random_(b)
c_idx = torch.empty(c, 1, dtype=torch.long).random_(c)
d_idx = torch.empty(d, dtype=torch.long).random_(d)
v = torch.randn(b, c, d)

x[b_idx, c_idx, d_idx] += v[b_idx, c_idx, d_idx]

If not, could you post a small sample, what’s stored in I?