12

I have a question about my Stack Overflow post: WSL2: error: (-217:Gpu API call) CUDA driver version is insufficient for CUDA runtime version

I have received the message

This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. You can edit the question so it's on-topic or see if it can be answered on another Stack Exchange site, but be sure to read the on-topic page for a site before posting there.

I am not sure why the post is closed because of such comment as the question is related to a software tool called OpenCV which should be primarily used by programmers. It meet some problems when working on the WSL-2 with Cuda which is an official virtual Linux environment working on windows OS.

Can anyone point out where I can improve?

20
  • 3
    You should probably add what programming task you're performing that requires yolov4 to run. A sentence or two is enough. It can still be that it is a general setup issue of tooling and those might be off-topic, even after your explanation.
    – rene
    Commented Aug 6, 2022 at 17:18
  • 14
    Writing code that uses OpenCV is indeed on topic. Running an application that depends on it usually isn't.
    – Mat
    Commented Aug 6, 2022 at 17:46
  • 2
    as one of the close voters, to me this looked more like a question for AU.SE because they cover issues people have with CUDA on WSL
    – gnat
    Commented Aug 6, 2022 at 17:46
  • This question is mainly related to calling the DNN module of OpenCV to run the yolov4 so I believe it should be the problem of compiling the OpenCV with Cuda on WSL2. Is it on-topic or not? Commented Aug 6, 2022 at 17:55
  • 3
    @kusocodeing - if you're trying trying to create and build an OpenCV app that sounds on topic. Maybe you could edit your question to make it more clearly a programming question by including a mcve? Your initial sentence I am trying to run the yolov4 on opencv 4.6 python with cuda on WSL2 with ubuntu 20.04. sounds like you are running an app not creating one.
    – dbc
    Commented Aug 6, 2022 at 18:58
  • 2
    Also keep in mind that not everyone on Meta will be subject matter experts on OpenCV + yolov + Cuda et. al. so adding a little more explanation to your meta question might net you some additional help.
    – dbc
    Commented Aug 6, 2022 at 19:02
  • 3
    @gnat that a question is on-topic on AU doesn't make it off-topic here.
    – rene
    Commented Aug 6, 2022 at 19:21
  • what is missing where the code is generated, so there should be at least some python code
    – nbk
    Commented Aug 6, 2022 at 19:31
  • @rene that's for sure. I just couldn't see how it is appropriate here as it is hard to tell how it relates to coding
    – gnat
    Commented Aug 6, 2022 at 19:43
  • 2
    @gnat I do agree that it is not a coding problem as it works on a physical Linux machine, but it is related to OpenCV app development so is it on-topic? BTW I have uploaded some of the python code to fulfill make it more likely on-topic. Commented Aug 6, 2022 at 20:57
  • @dbc I am not sure your standard between python code and python app? As python is an interpreted language I can execute the code directly by Python without compiling, python code and python apps seem the same to me. Commented Aug 6, 2022 at 21:02
  • 1
    AU or AU.SE = Ask Ubuntu Commented Aug 7, 2022 at 1:16
  • 3
    To some degree, if you don't (or might not) have a working OpenCV / CUDA setup, that's something you should first test with a known-good example program. If it doesn't work, that's maybe something you can ask about one Stack Overflow, but getting drivers working tends to be better asked on superuser or askubuntu, if googling doesn't resolve it. If examples work in general but your code calls some API that claims to need a new driver version, that sounds more like a programming question. (With answers about setting up cutting-edge drivers sneaking in under that banner.) Commented Aug 7, 2022 at 5:17
  • 1
    @PeterCordes According to on-topic, the question covers whether software tools commonly used by programmers should be on-topic. It doesn't bound to the coding problem like syntax or the calling of function as it does mention "generally covers". I believe a general question like the setting of environment or the building of a development tool should be on-topic isn't it? Besides, I do agree it can be an AU question but I am questioning if is it a question for StackOverflow as well, because it is generally related to a common development tool. Commented Aug 7, 2022 at 13:48
  • 1
    @PeterCordes BTW, I want to say CUDA is not a driver (or it is), it is an official development tool to call the function to compute on Nvidia GPU. The error I meet as shown in the question is the version of the CUDA used to build the OpenCV does not match with the Nvidia driver version. I believe someone who has the experience to compile the OpenCV with CUDA should know what I want to ask (i.e, the CUDA version looks matched with the version on GPU driver). So I believe what I am asking is an environment setting-up problem a common-used development tool but not a driver setting-up problem. Commented Aug 7, 2022 at 20:43

1 Answer 1

4

Software installation is off topic of SO. It's not even something that only software developers do, irrespectively of what is being installed. That you are your own system administrator doesn't make it on topic either. This sites pertains to software development, coding OpenCV is fine, installing OpenCV is not fine. That seems like an arbitrary distintion, but it isn't. What makes on topic or not isn't the tool, but what you are doing with it. This site is task oriented, rather than thing oriented.

To put more context, packaging OpenCV for some platform would be on topic here, dealing with problems that the client package manager has installing opencv is not. It's like the difference between Arqade and Game Development. Yes, both are arguably about video games, but one focuses on using the games the other creating the game. We are the latter. This issue isn't about the creation of some software, but a process before that: that the tools of creation are still not correctly configured in a way that permits creation. BTW, have you tried googling a tutorial or guide about installing opencv on linux and passing through gpu's to wsl? I think your problem is between those two.

7
  • 3
    What is your standard of software? Because either OpenCV and CUDA should be an development tool in this case, which mainly provide library to call for development. If you research opencv+cuda+build on SO you can find a lot of result, that should be proved the installation of opencv is allowed in SO Commented Aug 8, 2022 at 13:32
  • 3
    @kusocodeing That off-topic questions exist on Stack Overflow does not make further off-topic questions on-topic. It just means that there are too few people curating the number of questions coming in. Commented Aug 8, 2022 at 14:51
  • 1
    @HereticMonkey As I mentioned above, according to on-topic, the question generally covers the software tools commonly used by programmers should be on-topic. I think the "generally cover" is not narrow to a coding problem because they are only "the best cases". I think the tolerance is not that solid since there is a demand for such questions and the definition of programming is quite ambiguous in fact. Commented Aug 8, 2022 at 17:30
  • Would these kind of topics have a place on meta? Or where would be the right place to discuss them within stack communities? I may run into this scenario later on and I would like to know because likely I'd have done the same
    – Sgdva
    Commented Aug 8, 2022 at 21:06
  • 1
    @Sgdva what kind of topics? Installing software? Any user focused SE could work.
    – Braiam
    Commented Aug 9, 2022 at 14:06
  • @Braiam exactly that, thanks!
    – Sgdva
    Commented Aug 9, 2022 at 14:09
  • @kusocodeing "and is" is there for a reason. That argument is programming on a boat, just because you are a programmer and use it isn't enough. Just because you are a programmer and have a problem isn't enough. It has to be a issue exclusive to the context of programming. For example, licensing questions are off topic, despite being important for selecting some stuff.
    – Braiam
    Commented Aug 9, 2022 at 14:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .