I am getting this error while using round method. I printed the tensor type to check, and it prints int8 as it should be. However, error says tensor of type Char.
torch.int8
Traceback (most recent call last):
File "SCONNA.py", line 59, in <module>
uconv2d = FSUConv2duGEMM(
File "/home/sv/Desktop/Stochastic_Acc_Sim/utils/UnarySimLayers.py", line 552, in __init__
self.weight.data = SourceGen(
File "/home/sv/Desktop/Stochastic_Acc_Sim/utils/UnarySimUtils.py", line 504, in __init__
self.binary.data = self.prob.mul(self.len).round()
RuntimeError: "round" "_vml_cpu" not implemented for 'Char'
First, it doesnât really make sense to âroundâ an integral type (as rounding
an integer by definition doesnât change its value). So pytorch doesnât
implement .round() for integers.
Second, somewhere under the hood, pytorch uses âCharâ as a synonym
for int8 â perhaps a bit confusing, but they mean the same thing.
(If you do the same experiment with dtypes int16, int32, and int64,
you will get analogous error messages naming types âShort,â, âInt,â and
âLong,â respectively.)