|
pytorch_quantization/cuda_ext.cpython-310-x86_64-linux-gnu.so:undefinedsymbol:_ZN3c106detail1pytorch_quantization/cuda_ext.cpython-310-x86_64-linux-gnu.so:undefinedsymbol:_ZN3c106detail1报错现象解决方法pytorch_quantization/cuda_ext.cpython-310-x86_64-linux-gnu.so:undefinedsymbol:_ZN3c106detail1使用pytorch_quantization进行量化报错现象Python3.10.13|packagedbyconda-forge|(main,Dec232023,15:36:39)[GCC12.3.0]onlinuxType"help","copyright","credits"or"license"formoreinformation.>>>frompytorch_quantizationimportquant_modulesTraceback(mostrecentcalllast):File"",line1,inFile"/data/miniconda3/envs/py310_nlp/lib/python3.10/site-packages/pytorch_quantization/__init__.py",line20,infrom.quant_modulesimport*File"/data/miniconda3/envs/py310_nlp/lib/python3.10/site-packages/pytorch_quantization/quant_modules.py",line23,infrompytorch_quantizationimportnnasquant_nnFile"/data/miniconda3/envs/py310_nlp/lib/python3.10/site-packages/pytorch_quantization/nn/__init__.py",line19,infrompytorch_quantization.nn.modules.tensor_quantizerimport*File"/data/miniconda3/envs/py310_nlp/lib/python3.10/site-packages/pytorch_quantization/nn/modules/tensor_quantizer.py",line24,infrompytorch_quantization.tensor_quantimportQuantDescriptor,tensor_quant,fake_tensor_quant,scaled_e4m3File"/data/miniconda3/envs/py310_nlp/lib/python3.10/site-packages/pytorch_quantization/tensor_quant.py",line28,infrompytorch_quantizationimportcuda_extImportError:/data/miniconda3/envs/py310_nlp/lib/python3.10/site-packages/pytorch_quantization/cuda_ext.cpython-310-x86_64-linux-gnu.so:undefinedsymbol:_ZN3c106detail14torchCheckFailEPKcS2_jRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE12345678910111213141516重点错误提示:ImportError:/data/miniconda3/envs/py310_nlp/lib/python3.10/site-packages/pytorch_quantization/cuda_ext.cpython-310-x86_64-linux-gnu.so:undefinedsymbol:_ZN3c106detail14torchCheckFailEPKcS2_jRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE1重点:pytorch_quantization/cuda_ext.cpython-310-x86_64-linux-gnu.so:undefinedsymbol:_ZN3c106detail14torchCheckFailEPKcS2_jRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE1解决方法默认安装的pytorch-quantization为2.2.1版本,安装2.1.3即可正常使用pipinstallpytorch-quantization==2.1.31
|
|