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
- tidb Error: Operation aborted by user answer '' (cliutil.operation_aborted)TiDBError
- TensorFlow 報錯 CUDA driver version is insufficient for CUDA runtime version
- NFS mount results in "vmount: operation not permitted" errorNFSMITError
- UDI-03113: operation generated ORACLE error 3113OracleError
- ORA-29702: error occurred in Cluster Group Service operationError
- rabbitMq的status報錯Error: unable to perform an operation on node ‘rabbit……MQErrorORM
- 【踩坑】RuntimeError: CUDA error: device-side assert triggeredErrordevIDE
- Error: Invoke-customs are only supported starting with Android O (--min-api 26)ErrorAndroidAPI
- ORA-29702:error occurred in Cluster Group Service operation錯誤解決Error
- 解決報錯 cuDNN error: CUDNN_STATUS_NOT_SUPPORTED. This error may appear if you passed in a non-contiguous input.DNNErrorAPP
- yarn install 遇到的錯誤訊息 - Error EPERM operation not permitted, open .yarnrcYarnErrorMIT
- vue3 動態編譯元件失敗:Component provided template option but runtime compilation is not supported in this build of VueVue編譯元件IDEUI
- OGG-15050 Error loading Java VM runtime library: (2 No such file or directory)ErrorJava
- libtorch使用model.forward報std::runtime_error錯誤ForwardError
- 安裝軟體提示 Runtime Error (at 28:321): Generic faiure SwbemlocatorErrorAI
- ORA-06553: PLS-801: internal error [56319],以及64位oracle降級為32位的處理ErrorOracle
- [Javascript] ++operationJavaScript
- MySQL建立使用者報錯 ERROR 1396 (HY000): Operation CREATE USER failed for 'afei'@'%'MySqlErrorAI
- 解決The given version [xx] is not supported, only version 1 to 10 is supported in this buildUI
- CUDA
- macOS: sudo : Operation not permittedMacMIT
- [Javascript] Encapsulate chunk operationJavaScript
- MEMORY_TARGET not supported on this system
- FSMO(Flexible Single Master Operation)FlexAST
- 3.4.3 Restoring the System to Normal OperationRESTORM
- group by event_name, operation
- Win10正式版系統開機出現Runtime Error的解決方法Win10Error
- cuda 流
- 【cuda】- 01
- cmake cuda
- #801 - 認知協作#1:語音助手Webex AssistantWeb
- Project facet Java version 1.8 is not supportedProjectJava
- KSQLException: The authentication type 10 is not supported.SQLException
- win10系統打不開驅動精靈提示runtime error怎麼解決Win10Error
- [20230103]COUNT STOPKEY operation.txtTopK
- Runtime(一)
- Runtime(二)