Skip to content

Commit 587285c

Browse files
authored
Merge pull request #35 from leslie-fang-intel/leslie/update_readme
Update Readme for torch.compile return object and smoothquant import …
2 parents 9b74f44 + fa4cdf2 commit 587285c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ input = torch.randn(32,32, dtype=torch.bfloat16, device='cuda')
6262
quant_api.change_linear_weights_to_int8_dqtensors(model)
6363
6464
# compile the model to improve performance
65-
torch.compile(model, mode='max-autotune')
65+
model = torch.compile(model, mode='max-autotune')
6666
model(input)
6767
```
6868

@@ -125,7 +125,7 @@ Example
125125

126126
```
127127
import torch
128-
from torchao.smoothquant import swap_linear_with_smooth_fq_linear, smooth_fq_linear_to_inference
128+
from torchao.quantization.smoothquant import swap_linear_with_smooth_fq_linear, smooth_fq_linear_to_inference
129129
130130
# some user model
131131
model = get_model()
@@ -143,7 +143,7 @@ for i in range(calibration_amount):
143143
smooth_fq_linear_to_inference(model)
144144
145145
# compile the model to improve performance
146-
torch.compile(model, mode='max-autotune')
146+
model = torch.compile(model, mode='max-autotune')
147147
model(input)
148148
```
149149

0 commit comments

Comments
 (0)