From 73a2d137219783e482389777300c1f77d6eac758 Mon Sep 17 00:00:00 2001 From: Ekaterina Aidova Date: Mon, 10 Jun 2024 14:50:46 +0400 Subject: [PATCH] [PT FE]: fix gptq patching for strided tensors (#24871) ### Details: - *fix reshaping of strided tensor in gptq patcher* ### Tickets: - *CVS-140119* - *CVS-143119* --- src/bindings/python/src/openvino/frontend/pytorch/gptq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bindings/python/src/openvino/frontend/pytorch/gptq.py b/src/bindings/python/src/openvino/frontend/pytorch/gptq.py index 9d02c409b0a..fcdff51f74d 100644 --- a/src/bindings/python/src/openvino/frontend/pytorch/gptq.py +++ b/src/bindings/python/src/openvino/frontend/pytorch/gptq.py @@ -32,7 +32,7 @@ def patched_forward(self, *args, **kwargs): x = args[0] dtype = x.dtype outshape = x.shape[:-1] + (self.width,) - x = x.view(-1, x.shape[-1]) + x = x.contiguous().view(-1, x.shape[-1]) groups = self.qzeros.shape[0] height = self.qweight.shape[0]