proxsuite icon indicating copy to clipboard operation
proxsuite copied to clipboard

Possible issue with batched G_ tensor in QPFunctionFn_infeas.forward

Open oomcth opened this issue 9 months ago • 4 comments

In bindings/python/proxsuite/torch/qplayer.py:

class QPFunctionFn_infeas(Function):
    @staticmethod
    def forward(ctx, Q_, p_, A_, b_, G_, l_, u_):
         n_in, nz = G_.size() # <- can't G be batched? If so, this will cause an issue.

If G_ can be batched (e.g. shape (batch_size, n_in, nz)), this line will break. Might need a shape check or to handle batching explicitly.

oomcth avatar Jun 24 '25 14:06 oomcth