首页 > 编程语言 >pytorch报错:Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward

pytorch报错:Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward

时间:2024-03-03 14:35:17浏览次数:15  
标签:engine execute run pytorch backward find

GPU模式下运行pytorch代码报错,pytorch为2.2.1,NVIDIA驱动版本535.161.07



File "/home/devil/anaconda3/envs/sample-factory/lib/python3.11/site-packages/torch/_tensor.py", line 522, in backward
torch.autograd.backward(
File "/home/devil/anaconda3/envs/sample-factory/lib/python3.11/site-packages/torch/autograd/init.py", line 266, in backward
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
RuntimeError: FIND was unable to find an engine to execute this computatio



注意,这个其实不是报错,应该是警告,warning,因为没有影响代码的正常运行。




外网给出的解释:

  1. 地址:

https://github.com/Megvii-BaseDetection/YOLOX/issues/1642

image


  1. 地址:

https://discuss.pytorch.org/t/runtimeerror-get-was-unable-to-find-an-engine-to-execute-this-computation/193625/6

image


  1. 地址:

https://discuss.pytorch.org/t/runtimeerror-get-was-unable-to-find-an-engine-to-execute-this-computation/193625/3

image



总结来说,这个问题的出现是因为NVIDIA驱动版本过低了,一般是因为你选择使用了最新的版本的pytorch,因而使用配套的cuda和cudnn需要更高的版本的NVIDIA驱动(假设你使用conda安装pytorch,因此cuda和cudnn版本是已设置好的,没有问题,只有问题出现在驱动上),因此解决该问题就是需要更换一个更高版本的NVIDIA驱动。


PS. 如果你是使用多人共享的环境,如服务器,更新显卡驱动明显是一个麻烦和可行性低的选择,那么你可以换一个思路,那就是换用一个低版本的pytorch,这样同样可以解决这个问题。



标签:engine,execute,run,pytorch,backward,find
From: https://www.cnblogs.com/devilmaycry812839668/p/18050006

相关文章

  • docker Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is th
    应该是docker异常关闭导致无法启动。步骤1参考《https://www.cnblogs.com/langgeligelang/p/14607658.html》执行systemctldaemon-reloadsystemctlrestartdocker如果失败,提示Authorizationnotavailable.Checkifpolkitserviceisrunningorseedebugmessagef......
  • Centos7从rpm包安装docker engine
    Centos7从rpm包安装dockerenginecentosdockerCentOS7可以安装dockerengine,但是不能安装dockerdesktop。我和系统版本是7.9.2009(Core)。一、下载rpm包rpm包有两个来源,它们的功能不同。1.dockerrpm包从网站https://download.docker.com/linux/centos/上选择CentO......
  • 深入浅出Gitlab Runner自动构建C#应用程序
    概述程序员签入代码到Gitlab之后,GitlabRunner自动从流水线领取作业。按我们编排的“作业”,流水线工作步骤如下:程序员在Windows的VisualStudio2022中签入了“解决方案A”到Gitlab;Gitlab根据我们编排的.gitlab-ci.yml创建“流水线”;GitlabRunner领取到“作业”,以指定映像......
  • Gitlab Runner自动执行Docker容器
    概述Gitlab完全可以执行dockerrun命令,本文用最简单的方式来演示。修改.gitlab-ci.yml加入第4个stage,运行dockerrun。stages:-build-docker-image-test-push-image-run-websitevariables:PAY_IMAGE_FULL_URL:docker.amihome.cn/amihome/chang......
  • Gitlab Runner自动推送Docker映像
    接上文,增加两个stage最简单的推送,其实是在dockerbuild后边带上--push的开关即可。但是不经过测试就上传,Docker仓库里很快会堆满垃圾。所以我们设计新增两个场景,经过测试之后才push映像去仓库。stages:-build-docker-image-test-push-imagevariables:......
  • Gitlab Runner自动制作C#网站项目的Docker映像
    概述代码签入Gitlab后,GitlabRunner自动执行dockerbuild,构建网站应用的Docker映像。在VisualStudio2022中创建解决方案在Gitlab中创建项目这一步省略。签入源代码到Gitlab为项目添加Dockerfile在解决方案根目录下创建“.gitlab-ci.yml”stages:-build-docke......
  • 如何安装earthengine-api
       第一篇 直接使用 pipinstallearthengine-api命令提示找不到相匹配的earthengine-api版本。发现earthengine-api只支持64位的python。 于是,去查看了我电脑的操作系统是多少位的,打开cmd,输入systeminfo 小小的脑袋大大的疑惑,电脑的操作系统是64位的呀。......
  • GitLab Runner 添加 极狐GitLab 域名 host
    本文作者徐晓伟自定义GitLab域名解析查看极狐GitLabrunner日志查看极狐GitLabRunnerPod名称[root@anolis-7-9~]#kubectl-ngitlab-testgetpod|grepgitlab-runnermy-gitlab-gitlab-runner-6fb4bf7468-nmnkp0/1Running29(62sago)......
  • springboot应用中根据特定条件使用CommandLineRunner
    PS使用SpringBoot3.1.2进行测试1.使用@ConditionalOnProperty仅当特定属性存在或具有特定值时,注释@ConditionalOnProperty才会创建bean。在此示例中,仅当或文件中的CommandLineRunner属性db.init.enabled设置为true时才会执行application.propertiesapplication.ymlpac......
  • Cause: java.sql.SQLException: Thread stack overrun: 266768 bytes used of a 2867
    ###Cause:java.sql.SQLException:Threadstackoverrun:266768bytesusedofa286720bytestack,and20000bytesneeded.Use'mysqld--thread_stack=#'tospecifyabiggerstack.;uncategorizedSQLException;SQLstate[HY000];errorcode[143......