Skip to content

Commit 9b90b67

Browse files
committed
use torch_compile helper instead torch.compile
1 parent edf3056 commit 9b90b67

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gptqmodel/nn_modules/qlinear/torch.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from transformers import PreTrainedModel
2626

2727
from ...models._const import DEVICE, PLATFORM
28+
from ...utils.torch import torch_compile
2829

2930
logger = setup_logger()
3031

@@ -114,7 +115,7 @@ def post_init(self):
114115

115116
def optimize(self, backend: str = "inductor", mode: str = None, fullgraph: bool = False):
116117
# compile dequantize
117-
self.dequantize_weight = torch.compile(self.dequantize_weight, backend=backend, mode=mode, fullgraph=fullgraph)
118+
self.dequantize_weight = torch_compile(self.dequantize_weight, backend=backend, mode=mode, fullgraph=fullgraph)
118119

119120
#if self.adapter:
120121
# self.adapter.g_compile(backend=backend, mode=mode, fullgraph=fullgraph)

0 commit comments

Comments
 (0)