I think tensors will be automatically broadcasted in the C++ API in the same manner as in Python, won’t they?
To trigger broadcasting you could unsqueeze dimensions if necessary.
Let me know, if I misunderstood your use case.