File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
neural_compressor/torch/algorithms/weight_only Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -289,7 +289,7 @@ def pack_tensor_with_torch(self, raw_tensor):
289
289
def unpack_tensor_with_torch (self , packed_tensor ):
290
290
target_dtype = torch .int8 if not hasattr (self , "qzeros" ) or "int" not in self .dtype else torch .uint8
291
291
target_len = packed_tensor .shape [1 ] * self .n_pack
292
- unpacked_tensor = torch .zeros (packed_tensor .shape [0 ], target_len , dtype = self . compression_dtype ).to (self .device )
292
+ unpacked_tensor = torch .zeros (packed_tensor .shape [0 ], target_len , dtype = target_dtype ).to (self .device )
293
293
mask = torch .tensor (2 ** self .bits - 1 , dtype = self .compression_dtype ).to (self .device )
294
294
for j in range (packed_tensor .shape [1 ]):
295
295
for e in range (self .n_pack ):
You can’t perform that action at this time.
0 commit comments