cuda runtime error (801) : operation not supported
今天做了一個介面,想到模型預測佔據大量的運算,會對介面造成影響,很可能會造成介面卡死。所以另外新開一個程式去預測圖片,又考慮到如果在子程式中載入模型,那麼每次預測圖片都需要進行載入模型這個過程,太浪費時間,於是考慮在主程式中開一個執行緒載入模型,然後通過管道來講模型傳遞到子程式中,然後,程式碼執行起來後,報錯了 ,如下:
cuda runtime error (801) : operation not supported at C:\w\b\windows\pytorch\torch/csrc/generic/StorageSharing.cpp:245
THCudaCheck FAIL file=C:\w\b\windows\pytorch\torch/csrc/generic/StorageSharing.cpp line=245 error=801 : operation not supported
這個問題第一次遇見,最後找到解決方法,如下:
首先,在主程式中,我載入模型的時候程式碼如下:
net = models.resnet().to(device)
大家不用關注這裡究竟載入了什麼模型,只需要知道我在主程式中就把模型放到gpu上了,這也是報錯的原因所在,因此,我將程式碼改成下面這種:
net = models.resnet()
然後我再在子程式中將模型放到gpu上,ok,正常執行了。
2020.10.21
相關文章
- Mac新建資料夾報錯,mkdir():Operation not supportedMac
- ORA-32773: operation not supported for smallfile tablespace USERS 解決
- tidb Error: Operation aborted by user answer '' (cliutil.operation_aborted)TiDBError
- NFS mount results in "vmount: operation not permitted" errorNFSMITError
- maridb Error 'Operation DROP USER failed forErrorAI
- sqlnet.log error - Operation timed outSQLError
- [筆記].痛哉!!!Error: Can't access JTAG chain, Error: Operation failed筆記ErrorAI
- ORA-29702: error occurred in Cluster Group Service operationError
- ORA-06553:PLS-801:internal error重新編譯 降級Error編譯
- rabbitMq的status報錯Error: unable to perform an operation on node ‘rabbit……MQErrorORM
- 解決報錯error the @annotation pointcut expression is only supported at Java 5ErrorExpressJava
- UDI-03113: operation generated ORACLE error 3113OracleError
- UDE-00008: operation generated ORACLE error 31626OracleError
- An unexpected error has been detected by Java Runtime EnvironmentErrorJava
- RMAN異地恢復(ORA-06553: PLS-801: internal error [56319])Error
- ORA-29702:error occurred in Cluster Group Service operation錯誤解決Error
- 11g rac multipath asmlib ASM asm_open error Operation not permittedASMErrorMIT
- Error: Invoke-customs are only supported starting with Android O (--min-api 26)ErrorAndroidAPI
- yarn install 遇到的錯誤訊息 - Error EPERM operation not permitted, open .yarnrcYarnErrorMIT
- 解決報錯 cuDNN error: CUDNN_STATUS_NOT_SUPPORTED. This error may appear if you passed in a non-contiguous input.DNNErrorAPP
- 【踩坑】RuntimeError: CUDA error: device-side assert triggeredErrordevIDE
- DISK OPERATION ERROR,交換機級聯單模光纖鏈路故障解決Error
- libtorch使用model.forward報std::runtime_error錯誤ForwardError
- 安裝軟體提示 Runtime Error (at 28:321): Generic faiure SwbemlocatorErrorAI
- MySQL建立使用者報錯 ERROR 1396 (HY000): Operation CREATE USER failed for 'afei'@'%'MySqlErrorAI
- vue3 動態編譯元件失敗:Component provided template option but runtime compilation is not supported in this build of VueVue編譯元件IDEUI
- CUDA
- 解決The given version [xx] is not supported, only version 1 to 10 is supported in this buildUI
- Fatal NI Connect Error 12170, 'TNS-12535: TNS:operation timed outError
- ORA-06553: PLS-801: internal error [56319],以及64位oracle降級為32位的處理ErrorOracle
- cuda 流
- cmake cuda
- MEMORY_TARGET not supported on this system
- GoldenGate - What is supported and what is not ....Go
- ubuntu 14.04 安裝cuda 7.5/CUDA 8.0Ubuntu
- macOS: sudo : Operation not permittedMacMIT
- oracle redo log operationOracle Redo
- Win10系統玩遊戲提示runtime error錯誤的解決方法Win10遊戲Error