submission2019 / cnn-quantization

Quantization of Convolutional Neural networks.
237 stars 59 forks source link

--device cpu uses cuda and crash #14

Open mikeseven opened 4 years ago

mikeseven commented 4 years ago

Using the example with --device cpu leads to crash: python inference/inference_sim.py -a resnet50 -b 512 -pcq_w -pcq_a -sh --qtype int4 -qw int4 --device cpu

The bug comes from calling torch.cuda.clear().

Likewise when the program finishes.

cuda device should not be called in cpu mode.