Skip to content

Commit 025801b

Browse files
authored
[SW-223055] Cleanup fetch_from_cache (#229)
1 parent 2873510 commit 025801b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

neural_compressor/torch/algorithms/fp8_quant/_quant_common/helper_modules.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -964,17 +964,12 @@ def forward_measure(self, input, cache, *args, **kwargs):
964964
measure_output((output_cache, ), self._mod_extra_config.outputs)
965965
return output_cache
966966

967-
def fetch_from_cache(self, cache, blocks, permutations=None):
967+
def fetch_from_cache(self, cache, blocks):
968968
# TODO: Remove this workaround in next release [SW-221595]
969969
if cache.dtype != self.lp_dtype:
970970
quant_cache = self.quant_input(cache)
971971
else:
972972
quant_cache = cache
973-
if permutations:
974-
output_cache = self.orig_mod.fetch_from_cache(quant_cache, blocks, permutations)
975-
for i in range(len(output_cache)):
976-
output_cache[i] = self.dequant_output(output_cache[i])
977-
return output_cache
978973
output_cache = self.orig_mod.fetch_from_cache(quant_cache, blocks)
979974
return self.dequant_output(output_cache)
980975

0 commit comments

Comments
 (0)