Fix Undefined variable in QInterpolateBenchmark

Pull Request resolved: https://github.com/pytorch/pytorch/pull/73130
Approved by: https://github.com/malfet
This commit is contained in:
Sergii Dymchenko 2022-03-09 00:14:15 +00:00 committed by PyTorch MergeBot
parent dc38326f1d
commit 5b011fc6eb

View File

@ -44,7 +44,7 @@ class QInterpolateBenchmark(op_bench.TorchBenchmarkBase):
zero_point=zero_point,
dtype=dtype)
if not contig:
permute_dims = list(range(q_input.ndim))[::-1]
permute_dims = list(range(self.q_input.ndim))[::-1]
self.q_input = self.q_input.permute(permute_dims)
self.inputs = {