Not sure if best solution, but it yields the required result:
import torch
a = torch.tensor([1,2,3,4,5,6,7,8,9])
b = [3,2,4]
chunks = torch.split(a, b)
results = torch.tensor([ c.sum() for c in chunks ])